Commit 529f808
authored
fix(cli): generate web-types with real props and update events for v-model bindings (#2001)
WebStorm's newer Vue schema validates `v-model:show` against a component's
declared prop and matching `update:*` event instead of accepting a literal
`v-model:show` attribute, so it warned that bindings such as `v-model:show`
were invalid (showDialog is not a valid value for v-model:show).
Translate `v-model` / `v-model:xxx` documentation entries into the underlying
prop name (`model-value` / `xxx`) and emit the companion `update:modelValue` /
`update:xxx` event in the generated web-types, so editors recognize the binding.
close #19351 parent e04e888 commit 529f808
1 file changed
Lines changed: 42 additions & 9 deletions
Lines changed: 42 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
41 | 57 | | |
42 | 58 | | |
43 | 59 | | |
| |||
84 | 100 | | |
85 | 101 | | |
86 | 102 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
96 | 123 | | |
97 | 124 | | |
98 | 125 | | |
99 | 126 | | |
100 | 127 | | |
101 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
102 | 135 | | |
103 | 136 | | |
104 | 137 | | |
| |||
0 commit comments