@vue/language-service 1.8.19 → 1.8.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/language-blocks/en.json +136 -0
- package/data/language-blocks/fr.json +136 -0
- package/data/language-blocks/it.json +830 -0
- package/data/language-blocks/ja.json +136 -0
- package/data/language-blocks/ko.json +136 -0
- package/data/language-blocks/pt.json +136 -0
- package/data/language-blocks/zh-cn.json +136 -0
- package/data/model-modifiers/en.json +24 -0
- package/data/model-modifiers/fr.json +24 -0
- package/data/model-modifiers/it.json +140 -0
- package/data/model-modifiers/ja.json +24 -0
- package/data/model-modifiers/ko.json +24 -0
- package/data/model-modifiers/pt.json +24 -0
- package/data/model-modifiers/zh-cn.json +24 -0
- package/data/template/en.json +209 -1
- package/data/template/fr.json +209 -1
- package/data/template/it.json +1186 -0
- package/data/template/ja.json +209 -1
- package/data/template/ko.json +208 -0
- package/data/template/pt.json +208 -0
- package/data/template/zh-cn.json +208 -0
- package/out/helpers.js +6 -29
- package/out/languageService.js +19 -42
- package/out/plugins/data.js +19 -18
- package/out/plugins/vue-directive-comments.js +1 -1
- package/out/plugins/vue-extract-file.js +9 -11
- package/out/plugins/vue-template.js +8 -31
- package/out/plugins/vue-toggle-v-bind-codeaction.js +3 -3
- package/out/plugins/vue-twoslash-queries.js +1 -24
- package/out/plugins/vue.js +4 -30
- package/package.json +17 -17
|
@@ -0,0 +1,1186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1.1,
|
|
3
|
+
"tags": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Transition",
|
|
6
|
+
"description": {
|
|
7
|
+
"kind": "markdown",
|
|
8
|
+
"value": "\nProvides animated transition effects to a **single** element or component.\n\n- **Props**\n\n ```ts\n interface TransitionProps {\n /**\n * Used to automatically generate transition CSS class names.\n * e.g. `name: 'fade'` will auto expand to `.fade-enter`,\n * `.fade-enter-active`, etc.\n */\n name?: string\n /**\n * Whether to apply CSS transition classes.\n * Default: true\n */\n css?: boolean\n /**\n * Specifies the type of transition events to wait for to\n * determine transition end timing.\n * Default behavior is auto detecting the type that has\n * longer duration.\n */\n type?: 'transition' | 'animation'\n /**\n * Specifies explicit durations of the transition.\n * Default behavior is wait for the first `transitionend`\n * or `animationend` event on the root transition element.\n */\n duration?: number | { enter: number; leave: number }\n /**\n * Controls the timing sequence of leaving/entering transitions.\n * Default behavior is simultaneous.\n */\n mode?: 'in-out' | 'out-in' | 'default'\n /**\n * Whether to apply transition on initial render.\n * Default: false\n */\n appear?: boolean\n\n /**\n * Props for customizing transition classes.\n * Use kebab-case in templates, e.g. enter-from-class=\"xxx\"\n */\n enterFromClass?: string\n enterActiveClass?: string\n enterToClass?: string\n appearFromClass?: string\n appearActiveClass?: string\n appearToClass?: string\n leaveFromClass?: string\n leaveActiveClass?: string\n leaveToClass?: string\n }\n ```\n\n- **Events**\n\n - `@before-enter`\n - `@before-leave`\n - `@enter`\n - `@leave`\n - `@appear`\n - `@after-enter`\n - `@after-leave`\n - `@after-appear`\n - `@enter-cancelled`\n - `@leave-cancelled` (`v-show` only)\n - `@appear-cancelled`\n\n- **Example**\n\n Simple element:\n\n ```html\n <Transition>\n <div v-if=\"ok\">toggled content</div>\n </Transition>\n ```\n\n Forcing a transition by changing the `key` attribute:\n\n ```html\n <Transition>\n <div :key=\"text\">{{ text }}</div>\n </Transition>\n ```\n\n Dynamic component, with transition mode + animate on appear:\n\n ```html\n <Transition name=\"fade\" mode=\"out-in\" appear>\n <component :is=\"view\"></component>\n </Transition>\n ```\n\n Listening to transition events:\n\n ```html\n <Transition @after-enter=\"onTransitionComplete\">\n <div v-show=\"ok\">toggled content</div>\n </Transition>\n ```\n\n- **See also** [`<Transition>` Guide](https://it.vuejs.org/guide/built-ins/transition.html)\n"
|
|
9
|
+
},
|
|
10
|
+
"attributes": [],
|
|
11
|
+
"references": [
|
|
12
|
+
{
|
|
13
|
+
"name": "en",
|
|
14
|
+
"url": "https://vuejs.org/api/built-in-components.html#transition"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "zh-cn",
|
|
18
|
+
"url": "https://cn.vuejs.org/api/built-in-components.html#transition"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "ja",
|
|
22
|
+
"url": "https://ja.vuejs.org/api/built-in-components.html#transition"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "ua",
|
|
26
|
+
"url": "https://ua.vuejs.org/api/built-in-components.html#transition"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "fr",
|
|
30
|
+
"url": "https://fr.vuejs.org/api/built-in-components.html#transition"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "ko",
|
|
34
|
+
"url": "https://ko.vuejs.org/api/built-in-components.html#transition"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "pt",
|
|
38
|
+
"url": "https://pt.vuejs.org/api/built-in-components.html#transition"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "bn",
|
|
42
|
+
"url": "https://bn.vuejs.org/api/built-in-components.html#transition"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "it",
|
|
46
|
+
"url": "https://it.vuejs.org/api/built-in-components.html#transition"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "TransitionGroup",
|
|
52
|
+
"description": {
|
|
53
|
+
"kind": "markdown",
|
|
54
|
+
"value": "\nProvides transition effects for **multiple** elements or components in a list.\n\n- **Props**\n\n `<TransitionGroup>` accepts the same props as `<Transition>` except `mode`, plus two additional props:\n\n ```ts\n interface TransitionGroupProps extends Omit<TransitionProps, 'mode'> {\n /**\n * If not defined, renders as a fragment.\n */\n tag?: string\n /**\n * For customizing the CSS class applied during move transitions.\n * Use kebab-case in templates, e.g. move-class=\"xxx\"\n */\n moveClass?: string\n }\n ```\n\n- **Events**\n\n `<TransitionGroup>` emits the same events as `<Transition>`.\n\n- **Details**\n\n By default, `<TransitionGroup>` doesn't render a wrapper DOM element, but one can be defined via the `tag` prop.\n\n Note that every child in a `<transition-group>` must be [**uniquely keyed**](https://it.vuejs.org/guide/essentials/list.html#maintaining-state-with-key) for the animations to work properly.\n\n `<TransitionGroup>` supports moving transitions via CSS transform. When a child's position on screen has changed after an update, it will get applied a moving CSS class (auto generated from the `name` attribute or configured with the `move-class` prop). If the CSS `transform` property is \"transition-able\" when the moving class is applied, the element will be smoothly animated to its destination using the [FLIP technique](https://aerotwist.com/blog/flip-your-animations/).\n\n- **Example**\n\n ```html\n <TransitionGroup tag=\"ul\" name=\"slide\">\n <li v-for=\"item in items\" :key=\"item.id\">\n {{ item.text }}\n </li>\n </TransitionGroup>\n ```\n\n- **See also** [Guide - TransitionGroup](https://it.vuejs.org/guide/built-ins/transition-group.html)\n"
|
|
55
|
+
},
|
|
56
|
+
"attributes": [],
|
|
57
|
+
"references": [
|
|
58
|
+
{
|
|
59
|
+
"name": "en",
|
|
60
|
+
"url": "https://vuejs.org/api/built-in-components.html#transitiongroup"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "zh-cn",
|
|
64
|
+
"url": "https://cn.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "ja",
|
|
68
|
+
"url": "https://ja.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "ua",
|
|
72
|
+
"url": "https://ua.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "fr",
|
|
76
|
+
"url": "https://fr.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "ko",
|
|
80
|
+
"url": "https://ko.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "pt",
|
|
84
|
+
"url": "https://pt.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "bn",
|
|
88
|
+
"url": "https://bn.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "it",
|
|
92
|
+
"url": "https://it.vuejs.org/api/built-in-components.html#transitiongroup"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "KeepAlive",
|
|
98
|
+
"description": {
|
|
99
|
+
"kind": "markdown",
|
|
100
|
+
"value": "\nCaches dynamically toggled components wrapped inside.\n\n- **Props**\n\n ```ts\n interface KeepAliveProps {\n /**\n * If specified, only components with names matched by\n * `include` will be cached.\n */\n include?: MatchPattern\n /**\n * Any component with a name matched by `exclude` will\n * not be cached.\n */\n exclude?: MatchPattern\n /**\n * The maximum number of component instances to cache.\n */\n max?: number | string\n }\n\n type MatchPattern = string | RegExp | (string | RegExp)[]\n ```\n\n- **Details**\n\n When wrapped around a dynamic component, `<KeepAlive>` caches the inactive component instances without destroying them.\n\n There can only be one active component instance as the direct child of `<KeepAlive>` at any time.\n\n When a component is toggled inside `<KeepAlive>`, its `activated` and `deactivated` lifecycle hooks will be invoked accordingly, providing an alternative to `mounted` and `unmounted`, which are not called. This applies to the direct child of `<KeepAlive>` as well as to all of its descendants.\n\n- **Example**\n\n Utilizzo Base:\n\n ```html\n <KeepAlive>\n <component :is=\"view\"></component>\n </KeepAlive>\n ```\n\n When used with `v-if` / `v-else` branches, there must be only one component rendered at a time:\n\n ```html\n <KeepAlive>\n <comp-a v-if=\"a > 1\"></comp-a>\n <comp-b v-else></comp-b>\n </KeepAlive>\n ```\n\n Used together with `<Transition>`:\n\n ```html\n <Transition>\n <KeepAlive>\n <component :is=\"view\"></component>\n </KeepAlive>\n </Transition>\n ```\n\n Using `include` / `exclude`:\n\n ```html\n <!-- comma-delimited string -->\n <KeepAlive include=\"a,b\">\n <component :is=\"view\"></component>\n </KeepAlive>\n\n <!-- regex (use `v-bind`) -->\n <KeepAlive :include=\"/a|b/\">\n <component :is=\"view\"></component>\n </KeepAlive>\n\n <!-- Array (use `v-bind`) -->\n <KeepAlive :include=\"['a', 'b']\">\n <component :is=\"view\"></component>\n </KeepAlive>\n ```\n\n Usage with `max`:\n\n ```html\n <KeepAlive :max=\"10\">\n <component :is=\"view\"></component>\n </KeepAlive>\n ```\n\n- **See also** [Guide - KeepAlive](https://it.vuejs.org/guide/built-ins/keep-alive.html)\n"
|
|
101
|
+
},
|
|
102
|
+
"attributes": [],
|
|
103
|
+
"references": [
|
|
104
|
+
{
|
|
105
|
+
"name": "en",
|
|
106
|
+
"url": "https://vuejs.org/api/built-in-components.html#keepalive"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "zh-cn",
|
|
110
|
+
"url": "https://cn.vuejs.org/api/built-in-components.html#keepalive"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "ja",
|
|
114
|
+
"url": "https://ja.vuejs.org/api/built-in-components.html#keepalive"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "ua",
|
|
118
|
+
"url": "https://ua.vuejs.org/api/built-in-components.html#keepalive"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "fr",
|
|
122
|
+
"url": "https://fr.vuejs.org/api/built-in-components.html#keepalive"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "ko",
|
|
126
|
+
"url": "https://ko.vuejs.org/api/built-in-components.html#keepalive"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "pt",
|
|
130
|
+
"url": "https://pt.vuejs.org/api/built-in-components.html#keepalive"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "bn",
|
|
134
|
+
"url": "https://bn.vuejs.org/api/built-in-components.html#keepalive"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "it",
|
|
138
|
+
"url": "https://it.vuejs.org/api/built-in-components.html#keepalive"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "Teleport",
|
|
144
|
+
"description": {
|
|
145
|
+
"kind": "markdown",
|
|
146
|
+
"value": "\nRenders its slot content to another part of the DOM.\n\n- **Props**\n\n ```ts\n interface TeleportProps {\n /**\n * Required. Specify target container.\n * Can either be a selector or an actual element.\n */\n to: string | HTMLElement\n /**\n * When `true`, the content will remain in its original\n * location instead of moved into the target container.\n * Can be changed dynamically.\n */\n disabled?: boolean\n }\n ```\n\n- **Example**\n\n Specifying target container:\n\n ```html\n <teleport to=\"#some-id\" />\n <teleport to=\".some-class\" />\n <teleport to=\"[data-teleport]\" />\n ```\n\n Conditionally disabling:\n\n ```html\n <teleport to=\"#popup\" :disabled=\"displayVideoInline\">\n <video src=\"./my-movie.mp4\">\n </teleport>\n ```\n\n- **See also** [Guide - Teleport](https://it.vuejs.org/guide/built-ins/teleport.html)\n"
|
|
147
|
+
},
|
|
148
|
+
"attributes": [],
|
|
149
|
+
"references": [
|
|
150
|
+
{
|
|
151
|
+
"name": "en",
|
|
152
|
+
"url": "https://vuejs.org/api/built-in-components.html#teleport"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "zh-cn",
|
|
156
|
+
"url": "https://cn.vuejs.org/api/built-in-components.html#teleport"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "ja",
|
|
160
|
+
"url": "https://ja.vuejs.org/api/built-in-components.html#teleport"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "ua",
|
|
164
|
+
"url": "https://ua.vuejs.org/api/built-in-components.html#teleport"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "fr",
|
|
168
|
+
"url": "https://fr.vuejs.org/api/built-in-components.html#teleport"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "ko",
|
|
172
|
+
"url": "https://ko.vuejs.org/api/built-in-components.html#teleport"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "pt",
|
|
176
|
+
"url": "https://pt.vuejs.org/api/built-in-components.html#teleport"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "bn",
|
|
180
|
+
"url": "https://bn.vuejs.org/api/built-in-components.html#teleport"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "it",
|
|
184
|
+
"url": "https://it.vuejs.org/api/built-in-components.html#teleport"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "Suspense",
|
|
190
|
+
"description": {
|
|
191
|
+
"kind": "markdown",
|
|
192
|
+
"value": "\nUsed for orchestrating nested async dependencies in a component tree.\n\n- **Props**\n\n ```ts\n interface SuspenseProps {\n timeout?: string | number\n }\n ```\n\n- **Events**\n\n - `@resolve`\n - `@pending`\n - `@fallback`\n\n- **Details**\n\n `<Suspense>` accepts two slots: the `#default` slot and the `#fallback` slot. It will display the content of the fallback slot while rendering the default slot in memory.\n\n If it encounters async dependencies ([Async Components](https://it.vuejs.org/guide/components/async.html) and components with [`async setup()`](https://it.vuejs.org/guide/built-ins/suspense.html#async-setup)) while rendering the default slot, it will wait until all of them are resolved before displaying the default slot.\n\n- **See also** [Guide - Suspense](https://it.vuejs.org/guide/built-ins/suspense.html)\n"
|
|
193
|
+
},
|
|
194
|
+
"attributes": [],
|
|
195
|
+
"references": [
|
|
196
|
+
{
|
|
197
|
+
"name": "en",
|
|
198
|
+
"url": "https://vuejs.org/api/built-in-components.html#suspense"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "zh-cn",
|
|
202
|
+
"url": "https://cn.vuejs.org/api/built-in-components.html#suspense"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "ja",
|
|
206
|
+
"url": "https://ja.vuejs.org/api/built-in-components.html#suspense"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "ua",
|
|
210
|
+
"url": "https://ua.vuejs.org/api/built-in-components.html#suspense"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "fr",
|
|
214
|
+
"url": "https://fr.vuejs.org/api/built-in-components.html#suspense"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "ko",
|
|
218
|
+
"url": "https://ko.vuejs.org/api/built-in-components.html#suspense"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "pt",
|
|
222
|
+
"url": "https://pt.vuejs.org/api/built-in-components.html#suspense"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "bn",
|
|
226
|
+
"url": "https://bn.vuejs.org/api/built-in-components.html#suspense"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "it",
|
|
230
|
+
"url": "https://it.vuejs.org/api/built-in-components.html#suspense"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "component",
|
|
236
|
+
"description": {
|
|
237
|
+
"kind": "markdown",
|
|
238
|
+
"value": "\nA \"meta component\" for rendering dynamic components or elements.\n\n- **Props**\n\n ```ts\n interface DynamicComponentProps {\n is: string | Component\n }\n ```\n\n- **Details**\n\n The actual component to render is determined by the `is` prop.\n\n - When `is` is a string, it could be either an HTML tag name or a component's registered name.\n\n - Alternatively, `is` can also be directly bound to the definition of a component.\n\n- **Example**\n\n Rendering components by registered name (Options API):\n\n ```vue\n <script>\n import Foo from './Foo.vue'\n import Bar from './Bar.vue'\n\n export default {\n components: { Foo, Bar },\n data() {\n return {\n view: 'Foo'\n }\n }\n }\n </script>\n\n <template>\n <component :is=\"view\" />\n </template>\n ```\n\n Rendering components by definition (Composition API with `<script setup>`):\n\n ```vue\n <script setup>\n import Foo from './Foo.vue'\n import Bar from './Bar.vue'\n </script>\n\n <template>\n <component :is=\"Math.random() > 0.5 ? Foo : Bar\" />\n </template>\n ```\n\n Rendering HTML elements:\n\n ```html\n <component :is=\"href ? 'a' : 'span'\"></component>\n ```\n\n The [built-in components](./built-in-components) can all be passed to `is`, but you must register them if you want to pass them by name. For example:\n\n ```vue\n <script>\n import { Transition, TransitionGroup } from 'vue'\n\n export default {\n components: {\n Transition,\n TransitionGroup\n }\n }\n </script>\n\n <template>\n <component :is=\"isGroup ? 'TransitionGroup' : 'Transition'\">\n ...\n </component>\n </template>\n ```\n\n Registration is not required if you pass the component itself to `is` rather than its name, e.g. in `<script setup>`.\n\n If `v-model` is used on a `<component>` tag, the template compiler will expand it to a `modelValue` prop and `update:modelValue` event listener, much like it would for any other component. However, this won't be compatible with native HTML elements, such as `<input>` or `<select>`. As a result, using `v-model` with a dynamically created native element won't work:\n\n ```vue\n <script setup>\n import { ref } from 'vue'\n\n const tag = ref('input')\n const username = ref('')\n </script>\n\n <template>\n <!-- This won't work as 'input' is a native HTML element -->\n <component :is=\"tag\" v-model=\"username\" />\n </template>\n ```\n\n In practice, this edge case isn't common as native form fields are typically wrapped in components in real applications. If you do need to use a native element directly then you can split the `v-model` into an attribute and event manually.\n\n- **See also** [Dynamic Components](https://it.vuejs.org/guide/essentials/component-basics.html#dynamic-components)\n"
|
|
239
|
+
},
|
|
240
|
+
"attributes": [],
|
|
241
|
+
"references": [
|
|
242
|
+
{
|
|
243
|
+
"name": "en",
|
|
244
|
+
"url": "https://vuejs.org/api/built-in-special-elements.html#component"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "zh-cn",
|
|
248
|
+
"url": "https://cn.vuejs.org/api/built-in-special-elements.html#component"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "ja",
|
|
252
|
+
"url": "https://ja.vuejs.org/api/built-in-special-elements.html#component"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"name": "ua",
|
|
256
|
+
"url": "https://ua.vuejs.org/api/built-in-special-elements.html#component"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "fr",
|
|
260
|
+
"url": "https://fr.vuejs.org/api/built-in-special-elements.html#component"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "ko",
|
|
264
|
+
"url": "https://ko.vuejs.org/api/built-in-special-elements.html#component"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "pt",
|
|
268
|
+
"url": "https://pt.vuejs.org/api/built-in-special-elements.html#component"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "bn",
|
|
272
|
+
"url": "https://bn.vuejs.org/api/built-in-special-elements.html#component"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "it",
|
|
276
|
+
"url": "https://it.vuejs.org/api/built-in-special-elements.html#component"
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "slot",
|
|
282
|
+
"description": {
|
|
283
|
+
"kind": "markdown",
|
|
284
|
+
"value": "\nDenotes slot content outlets in templates.\n\n- **Props**\n\n ```ts\n interface SlotProps {\n /**\n * Any props passed to <slot> to passed as arguments\n * for scoped slots\n */\n [key: string]: any\n /**\n * Reserved for specifying slot name.\n */\n name?: string\n }\n ```\n\n- **Details**\n\n The `<slot>` element can use the `name` attribute to specify a slot name. When no `name` is specified, it will render the default slot. Additional attributes passed to the slot element will be passed as slot props to the scoped slot defined in the parent.\n\n The element itself will be replaced by its matched slot content.\n\n `<slot>` elements in Vue templates are compiled into JavaScript, so they are not to be confused with [native `<slot>` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot).\n\n- **See also** [Component - Slots](https://it.vuejs.org/guide/components/slots.html)\n"
|
|
285
|
+
},
|
|
286
|
+
"attributes": [],
|
|
287
|
+
"references": [
|
|
288
|
+
{
|
|
289
|
+
"name": "en",
|
|
290
|
+
"url": "https://vuejs.org/api/built-in-special-elements.html#slot"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "zh-cn",
|
|
294
|
+
"url": "https://cn.vuejs.org/api/built-in-special-elements.html#slot"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "ja",
|
|
298
|
+
"url": "https://ja.vuejs.org/api/built-in-special-elements.html#slot"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "ua",
|
|
302
|
+
"url": "https://ua.vuejs.org/api/built-in-special-elements.html#slot"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"name": "fr",
|
|
306
|
+
"url": "https://fr.vuejs.org/api/built-in-special-elements.html#slot"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "ko",
|
|
310
|
+
"url": "https://ko.vuejs.org/api/built-in-special-elements.html#slot"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "pt",
|
|
314
|
+
"url": "https://pt.vuejs.org/api/built-in-special-elements.html#slot"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "bn",
|
|
318
|
+
"url": "https://bn.vuejs.org/api/built-in-special-elements.html#slot"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "it",
|
|
322
|
+
"url": "https://it.vuejs.org/api/built-in-special-elements.html#slot"
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "template",
|
|
328
|
+
"description": {
|
|
329
|
+
"kind": "markdown",
|
|
330
|
+
"value": "\nThe `<template>` tag is used as a placeholder when we want to use a built-in directive without rendering an element in the DOM.\n\n- **Details**\n\n The special handling for `<template>` is only triggered if it is used with one of these directives:\n\n - `v-if`, `v-else-if`, or `v-else`\n - `v-for`\n - `v-slot`\n\n If none of those directives are present then it will be rendered as a [native `<template>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template) instead.\n\n A `<template>` with a `v-for` can also have a [`key` attribute](https://it.vuejs.org/api/built-in-special-attributes.html#key). All other attributes and directives will be discarded, as they aren't meaningful without a corresponding element.\n\n Single-file components use a [top-level `<template>` tag](https://it.vuejs.org/api/sfc-spec.html#language-blocks) to wrap the entire template. That usage is separate from the use of `<template>` described above. That top-level tag is not part of the template itself and doesn't support template syntax, such as directives.\n\n- **See also**\n - [Guide - `v-if` on `<template>`](https://it.vuejs.org/guide/essentials/conditional.html#v-if-on-template)\n - [Guide - `v-for` on `<template>`](https://it.vuejs.org/guide/essentials/list.html#v-for-on-template)\n - [Guide - Named slots](https://it.vuejs.org/guide/components/slots.html#named-slots)\n"
|
|
331
|
+
},
|
|
332
|
+
"attributes": [],
|
|
333
|
+
"references": [
|
|
334
|
+
{
|
|
335
|
+
"name": "en",
|
|
336
|
+
"url": "https://vuejs.org/api/built-in-special-elements.html#template"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "zh-cn",
|
|
340
|
+
"url": "https://cn.vuejs.org/api/built-in-special-elements.html#template"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"name": "ja",
|
|
344
|
+
"url": "https://ja.vuejs.org/api/built-in-special-elements.html#template"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "ua",
|
|
348
|
+
"url": "https://ua.vuejs.org/api/built-in-special-elements.html#template"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "fr",
|
|
352
|
+
"url": "https://fr.vuejs.org/api/built-in-special-elements.html#template"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "ko",
|
|
356
|
+
"url": "https://ko.vuejs.org/api/built-in-special-elements.html#template"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "pt",
|
|
360
|
+
"url": "https://pt.vuejs.org/api/built-in-special-elements.html#template"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "bn",
|
|
364
|
+
"url": "https://bn.vuejs.org/api/built-in-special-elements.html#template"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"name": "it",
|
|
368
|
+
"url": "https://it.vuejs.org/api/built-in-special-elements.html#template"
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"globalAttributes": [
|
|
374
|
+
{
|
|
375
|
+
"name": "v-text",
|
|
376
|
+
"description": {
|
|
377
|
+
"kind": "markdown",
|
|
378
|
+
"value": "\nUpdate the element's text content.\n\n- **Expects:** `string`\n\n- **Details**\n\n `v-text` works by setting the element's [textContent](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) property, so it will overwrite any existing content inside the element. If you need to update the part of `textContent`, you should use [mustache interpolations](https://it.vuejs.org/guide/essentials/template-syntax.html#text-interpolation) instead.\n\n- **Example**\n\n ```html\n <span v-text=\"msg\"></span>\n <!-- same as -->\n <span>{{msg}}</span>\n ```\n\n- **See also** [Template Syntax - Text Interpolation](https://it.vuejs.org/guide/essentials/template-syntax.html#text-interpolation)\n"
|
|
379
|
+
},
|
|
380
|
+
"references": [
|
|
381
|
+
{
|
|
382
|
+
"name": "en",
|
|
383
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-text"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "zh-cn",
|
|
387
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-text"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "ja",
|
|
391
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-text"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "ua",
|
|
395
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-text"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"name": "fr",
|
|
399
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-text"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "ko",
|
|
403
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-text"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "pt",
|
|
407
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-text"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "bn",
|
|
411
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-text"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "it",
|
|
415
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-text"
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "v-html",
|
|
421
|
+
"description": {
|
|
422
|
+
"kind": "markdown",
|
|
423
|
+
"value": "\nUpdate the element's [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML).\n\n- **Expects:** `string`\n\n- **Details**\n\n Contents of `v-html` are inserted as plain HTML - Vue template syntax will not be processed. If you find yourself trying to compose templates using `v-html`, try to rethink the solution by using components instead.\n\n ::: warning Security Note\n Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use `v-html` on trusted content and **never** on user-provided content.\n :::\n\n In [Single-File Components](https://it.vuejs.org/guide/scaling-up/sfc.html), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](./sfc-css-features#css-modules) or an additional, global `<style>` element with a manual scoping strategy such as BEM.\n\n- **Example**\n\n ```html\n <div v-html=\"html\"></div>\n ```\n\n- **See also** [Template Syntax - Raw HTML](https://it.vuejs.org/guide/essentials/template-syntax.html#raw-html)\n"
|
|
424
|
+
},
|
|
425
|
+
"references": [
|
|
426
|
+
{
|
|
427
|
+
"name": "en",
|
|
428
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-html"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"name": "zh-cn",
|
|
432
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-html"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "ja",
|
|
436
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-html"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "ua",
|
|
440
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-html"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"name": "fr",
|
|
444
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-html"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "ko",
|
|
448
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-html"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "pt",
|
|
452
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-html"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "bn",
|
|
456
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-html"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "it",
|
|
460
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-html"
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"name": "v-show",
|
|
466
|
+
"description": {
|
|
467
|
+
"kind": "markdown",
|
|
468
|
+
"value": "\nToggle the element's visibility based on the truthy-ness of the expression value.\n\n- **Expects:** `any`\n\n- **Details**\n\n `v-show` works by setting the `display` CSS property via inline styles, and will try to respect the initial `display` value when the element is visible. It also triggers transitions when its condition changes.\n\n- **See also** [Conditional Rendering - v-show](https://it.vuejs.org/guide/essentials/conditional.html#v-show)\n"
|
|
469
|
+
},
|
|
470
|
+
"references": [
|
|
471
|
+
{
|
|
472
|
+
"name": "en",
|
|
473
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-show"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "zh-cn",
|
|
477
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-show"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "ja",
|
|
481
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-show"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"name": "ua",
|
|
485
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-show"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "fr",
|
|
489
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-show"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "ko",
|
|
493
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-show"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"name": "pt",
|
|
497
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-show"
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "bn",
|
|
501
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-show"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "it",
|
|
505
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-show"
|
|
506
|
+
}
|
|
507
|
+
]
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "v-if",
|
|
511
|
+
"description": {
|
|
512
|
+
"kind": "markdown",
|
|
513
|
+
"value": "\nConditionally render an element or a template fragment based on the truthy-ness of the expression value.\n\n- **Expects:** `any`\n\n- **Details**\n\n When a `v-if` element is toggled, the element and its contained directives / components are destroyed and re-constructed. If the initial condition is falsy, then the inner content won't be rendered at all.\n\n Can be used on `<template>` to denote a conditional block containing only text or multiple elements.\n\n This directive triggers transitions when its condition changes.\n\n When used together, `v-if` has a higher priority than `v-for`. We don't recommend using these two directives together on one element — see the [list rendering guide](https://it.vuejs.org/guide/essentials/list.html#v-for-with-v-if) for details.\n\n- **See also** [Conditional Rendering - v-if](https://it.vuejs.org/guide/essentials/conditional.html#v-if)\n"
|
|
514
|
+
},
|
|
515
|
+
"references": [
|
|
516
|
+
{
|
|
517
|
+
"name": "en",
|
|
518
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-if"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"name": "zh-cn",
|
|
522
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-if"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"name": "ja",
|
|
526
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-if"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "ua",
|
|
530
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-if"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "fr",
|
|
534
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-if"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "ko",
|
|
538
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-if"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "pt",
|
|
542
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-if"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "bn",
|
|
546
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-if"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "it",
|
|
550
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-if"
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"name": "v-else",
|
|
556
|
+
"valueSet": "v",
|
|
557
|
+
"description": {
|
|
558
|
+
"kind": "markdown",
|
|
559
|
+
"value": "\nDenote the \"else block\" for `v-if` or a `v-if` / `v-else-if` chain.\n\n- **Does not expect expression**\n\n- **Details**\n\n - Restriction: previous sibling element must have `v-if` or `v-else-if`.\n\n - Can be used on `<template>` to denote a conditional block containing only text or multiple elements.\n\n- **Example**\n\n ```html\n <div v-if=\"Math.random() > 0.5\">\n Now you see me\n </div>\n <div v-else>\n Now you don't\n </div>\n ```\n\n- **See also** [Conditional Rendering - v-else](https://it.vuejs.org/guide/essentials/conditional.html#v-else)\n"
|
|
560
|
+
},
|
|
561
|
+
"references": [
|
|
562
|
+
{
|
|
563
|
+
"name": "en",
|
|
564
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-else"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "zh-cn",
|
|
568
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-else"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "ja",
|
|
572
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-else"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "ua",
|
|
576
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-else"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "fr",
|
|
580
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-else"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "ko",
|
|
584
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-else"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "pt",
|
|
588
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-else"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "bn",
|
|
592
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-else"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "it",
|
|
596
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-else"
|
|
597
|
+
}
|
|
598
|
+
]
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "v-else-if",
|
|
602
|
+
"description": {
|
|
603
|
+
"kind": "markdown",
|
|
604
|
+
"value": "\nDenote the \"else if block\" for `v-if`. Can be chained.\n\n- **Expects:** `any`\n\n- **Details**\n\n - Restriction: previous sibling element must have `v-if` or `v-else-if`.\n\n - Can be used on `<template>` to denote a conditional block containing only text or multiple elements.\n\n- **Example**\n\n ```html\n <div v-if=\"type === 'A'\">\n A\n </div>\n <div v-else-if=\"type === 'B'\">\n B\n </div>\n <div v-else-if=\"type === 'C'\">\n C\n </div>\n <div v-else>\n Not A/B/C\n </div>\n ```\n\n- **See also** [Conditional Rendering - v-else-if](https://it.vuejs.org/guide/essentials/conditional.html#v-else-if)\n"
|
|
605
|
+
},
|
|
606
|
+
"references": [
|
|
607
|
+
{
|
|
608
|
+
"name": "en",
|
|
609
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-else-if"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"name": "zh-cn",
|
|
613
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "ja",
|
|
617
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"name": "ua",
|
|
621
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"name": "fr",
|
|
625
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "ko",
|
|
629
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"name": "pt",
|
|
633
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "bn",
|
|
637
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "it",
|
|
641
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-else-if"
|
|
642
|
+
}
|
|
643
|
+
]
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "v-for",
|
|
647
|
+
"description": {
|
|
648
|
+
"kind": "markdown",
|
|
649
|
+
"value": "\nRender the element or template block multiple times based on the source data.\n\n- **Expects:** `Array | Object | number | string | Iterable`\n\n- **Details**\n\n The directive's value must use the special syntax `alias in expression` to provide an alias for the current element being iterated on:\n\n ```html\n <div v-for=\"item in items\">\n {{ item.text }}\n </div>\n ```\n\n Alternatively, you can also specify an alias for the index (or the key if used on an Object):\n\n ```html\n <div v-for=\"(item, index) in items\"></div>\n <div v-for=\"(value, key) in object\"></div>\n <div v-for=\"(value, name, index) in object\"></div>\n ```\n\n The default behavior of `v-for` will try to patch the elements in-place without moving them. To force it to reorder elements, you should provide an ordering hint with the `key` special attribute:\n\n ```html\n <div v-for=\"item in items\" :key=\"item.id\">\n {{ item.text }}\n </div>\n ```\n\n `v-for` can also work on values that implement the [Iterable Protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol), including native `Map` and `Set`.\n\n- **See also**\n - [List Rendering](https://it.vuejs.org/guide/essentials/list.html)\n"
|
|
650
|
+
},
|
|
651
|
+
"references": [
|
|
652
|
+
{
|
|
653
|
+
"name": "en",
|
|
654
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-for"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"name": "zh-cn",
|
|
658
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-for"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"name": "ja",
|
|
662
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-for"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"name": "ua",
|
|
666
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-for"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"name": "fr",
|
|
670
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-for"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"name": "ko",
|
|
674
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-for"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"name": "pt",
|
|
678
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-for"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "bn",
|
|
682
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-for"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"name": "it",
|
|
686
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-for"
|
|
687
|
+
}
|
|
688
|
+
]
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"name": "v-on",
|
|
692
|
+
"description": {
|
|
693
|
+
"kind": "markdown",
|
|
694
|
+
"value": "\nAttach an event listener to the element.\n\n- **Shorthand:** `@`\n\n- **Expects:** `Function | Inline Statement | Object (without argument)`\n\n- **Argument:** `event` (optional if using Object syntax)\n\n- **Modifiers**\n\n - `.stop` - call `event.stopPropagation()`.\n - `.prevent` - call `event.preventDefault()`.\n - `.capture` - add event listener in capture mode.\n - `.self` - only trigger handler if event was dispatched from this element.\n - `.{keyAlias}` - only trigger handler on certain keys.\n - `.once` - trigger handler at most once.\n - `.left` - only trigger handler for left button mouse events.\n - `.right` - only trigger handler for right button mouse events.\n - `.middle` - only trigger handler for middle button mouse events.\n - `.passive` - attaches a DOM event with `{ passive: true }`.\n\n- **Details**\n\n The event type is denoted by the argument. The expression can be a method name, an inline statement, or omitted if there are modifiers present.\n\n When used on a normal element, it listens to [**native DOM events**](https://developer.mozilla.org/en-US/docs/Web/Events) only. When used on a custom element component, it listens to **custom events** emitted on that child component.\n\n When listening to native DOM events, the method receives the native event as the only argument. If using inline statement, the statement has access to the special `$event` property: `v-on:click=\"handle('ok', $event)\"`.\n\n `v-on` also supports binding to an object of event / listener pairs without an argument. Note when using the object syntax, it does not support any modifiers.\n\n- **Example**\n\n ```html\n <!-- method handler -->\n <button v-on:click=\"doThis\"></button>\n\n <!-- dynamic event -->\n <button v-on:[event]=\"doThis\"></button>\n\n <!-- inline statement -->\n <button v-on:click=\"doThat('hello', $event)\"></button>\n\n <!-- shorthand -->\n <button @click=\"doThis\"></button>\n\n <!-- shorthand dynamic event -->\n <button @[event]=\"doThis\"></button>\n\n <!-- stop propagation -->\n <button @click.stop=\"doThis\"></button>\n\n <!-- prevent default -->\n <button @click.prevent=\"doThis\"></button>\n\n <!-- prevent default without expression -->\n <form @submit.prevent></form>\n\n <!-- chain modifiers -->\n <button @click.stop.prevent=\"doThis\"></button>\n\n <!-- key modifier using keyAlias -->\n <input @keyup.enter=\"onEnter\" />\n\n <!-- the click event will be triggered at most once -->\n <button v-on:click.once=\"doThis\"></button>\n\n <!-- object syntax -->\n <button v-on=\"{ mousedown: doThis, mouseup: doThat }\"></button>\n ```\n\n Listening to custom events on a child component (the handler is called when \"my-event\" is emitted on the child):\n\n ```html\n <MyComponent @my-event=\"handleThis\" />\n\n <!-- inline statement -->\n <MyComponent @my-event=\"handleThis(123, $event)\" />\n ```\n\n- **See also**\n - [Event Handling](https://it.vuejs.org/guide/essentials/event-handling.html)\n - [Components - Custom Events](https://it.vuejs.org/guide/essentials/component-basics.html#listening-to-events)\n"
|
|
695
|
+
},
|
|
696
|
+
"references": [
|
|
697
|
+
{
|
|
698
|
+
"name": "en",
|
|
699
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-on"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "zh-cn",
|
|
703
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-on"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"name": "ja",
|
|
707
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-on"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "ua",
|
|
711
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-on"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "fr",
|
|
715
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-on"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "ko",
|
|
719
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-on"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "pt",
|
|
723
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-on"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"name": "bn",
|
|
727
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-on"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"name": "it",
|
|
731
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-on"
|
|
732
|
+
}
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"name": "v-bind",
|
|
737
|
+
"description": {
|
|
738
|
+
"kind": "markdown",
|
|
739
|
+
"value": "\nDynamically bind one or more attributes, or a component prop to an expression.\n\n- **Shorthand:** `:` or `.` (when using `.prop` modifier)\n\n- **Expects:** `any (with argument) | Object (without argument)`\n\n- **Argument:** `attrOrProp (optional)`\n\n- **Modifiers**\n\n - `.camel` - transform the kebab-case attribute name into camelCase.\n - `.prop` - force a binding to be set as a DOM property. <sup class=\"vt-badge\">3.2+</sup>\n - `.attr` - force a binding to be set as a DOM attribute. <sup class=\"vt-badge\">3.2+</sup>\n\n- **Usage**\n\n When used to bind the `class` or `style` attribute, `v-bind` supports additional value types such as Array or Objects. See linked guide section below for more details.\n\n When setting a binding on an element, Vue by default checks whether the element has the key defined as a property using an `in` operator check. If the property is defined, Vue will set the value as a DOM property instead of an attribute. This should work in most cases, but you can override this behavior by explicitly using `.prop` or `.attr` modifiers. This is sometimes necessary, especially when [working with custom elements](https://it.vuejs.org/guide/extras/web-components.html#passing-dom-properties).\n\n When used for component prop binding, the prop must be properly declared in the child component.\n\n When used without an argument, can be used to bind an object containing attribute name-value pairs.\n\n- **Example**\n\n ```html\n <!-- bind an attribute -->\n <img v-bind:src=\"imageSrc\" />\n\n <!-- dynamic attribute name -->\n <button v-bind:[key]=\"value\"></button>\n\n <!-- shorthand -->\n <img :src=\"imageSrc\" />\n\n <!-- shorthand dynamic attribute name -->\n <button :[key]=\"value\"></button>\n\n <!-- with inline string concatenation -->\n <img :src=\"'/path/to/images/' + fileName\" />\n\n <!-- class binding -->\n <div :class=\"{ red: isRed }\"></div>\n <div :class=\"[classA, classB]\"></div>\n <div :class=\"[classA, { classB: isB, classC: isC }]\"></div>\n\n <!-- style binding -->\n <div :style=\"{ fontSize: size + 'px' }\"></div>\n <div :style=\"[styleObjectA, styleObjectB]\"></div>\n\n <!-- binding an object of attributes -->\n <div v-bind=\"{ id: someProp, 'other-attr': otherProp }\"></div>\n\n <!-- prop binding. \"prop\" must be declared in the child component. -->\n <MyComponent :prop=\"someThing\" />\n\n <!-- pass down parent props in common with a child component -->\n <MyComponent v-bind=\"$props\" />\n\n <!-- XLink -->\n <svg><a :xlink:special=\"foo\"></a></svg>\n ```\n\n The `.prop` modifier also has a dedicated shorthand, `.`:\n\n ```html\n <div :someProperty.prop=\"someObject\"></div>\n\n <!-- equivalent to -->\n <div .someProperty=\"someObject\"></div>\n ```\n\n The `.camel` modifier allows camelizing a `v-bind` attribute name when using in-DOM templates, e.g. the SVG `viewBox` attribute:\n\n ```html\n <svg :view-box.camel=\"viewBox\"></svg>\n ```\n\n `.camel` is not needed if you are using string templates, or pre-compiling the template with a build step.\n\n- **See also**\n - [Class and Style Bindings](https://it.vuejs.org/guide/essentials/class-and-style.html)\n - [Components - Prop Passing Details](https://it.vuejs.org/guide/components/props.html#prop-passing-details)\n"
|
|
740
|
+
},
|
|
741
|
+
"references": [
|
|
742
|
+
{
|
|
743
|
+
"name": "en",
|
|
744
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-bind"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"name": "zh-cn",
|
|
748
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-bind"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "ja",
|
|
752
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-bind"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "ua",
|
|
756
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-bind"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "fr",
|
|
760
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-bind"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "ko",
|
|
764
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-bind"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "pt",
|
|
768
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-bind"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "bn",
|
|
772
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-bind"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"name": "it",
|
|
776
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-bind"
|
|
777
|
+
}
|
|
778
|
+
]
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"name": "v-model",
|
|
782
|
+
"description": {
|
|
783
|
+
"kind": "markdown",
|
|
784
|
+
"value": "\nCreate a two-way binding on a form input element or a component.\n\n- **Expects:** varies based on value of form inputs element or output of components\n\n- **Limited to:**\n\n - `<input>`\n - `<select>`\n - `<textarea>`\n - components\n\n- **Modifiers**\n\n - [`.lazy`](https://it.vuejs.org/guide/essentials/forms.html#lazy) - listen to `change` events instead of `input`\n - [`.number`](https://it.vuejs.org/guide/essentials/forms.html#number) - cast valid input string to numbers\n - [`.trim`](https://it.vuejs.org/guide/essentials/forms.html#trim) - trim input\n\n- **See also**\n\n - [Form Input Bindings](https://it.vuejs.org/guide/essentials/forms.html)\n - [Component Events - Usage with `v-model`](https://it.vuejs.org/guide/components/v-model.html)\n"
|
|
785
|
+
},
|
|
786
|
+
"references": [
|
|
787
|
+
{
|
|
788
|
+
"name": "en",
|
|
789
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-model"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"name": "zh-cn",
|
|
793
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-model"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"name": "ja",
|
|
797
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-model"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"name": "ua",
|
|
801
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-model"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"name": "fr",
|
|
805
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-model"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "ko",
|
|
809
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-model"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"name": "pt",
|
|
813
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-model"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "bn",
|
|
817
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-model"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"name": "it",
|
|
821
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-model"
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "v-slot",
|
|
827
|
+
"description": {
|
|
828
|
+
"kind": "markdown",
|
|
829
|
+
"value": "\nDenote named slots or scoped slots that expect to receive props.\n\n- **Shorthand:** `#`\n\n- **Expects:** JavaScript expression that is valid in a function argument position, including support for destructuring. Optional - only needed if expecting props to be passed to the slot.\n\n- **Argument:** slot name (optional, defaults to `default`)\n\n- **Limited to:**\n\n - `<template>`\n - [components](https://it.vuejs.org/guide/components/slots.html#scoped-slots) (for a lone default slot with props)\n\n- **Example**\n\n ```html\n <!-- Named slots -->\n <BaseLayout>\n <template v-slot:header>\n Header content\n </template>\n\n <template v-slot:default>\n Default slot content\n </template>\n\n <template v-slot:footer>\n Footer content\n </template>\n </BaseLayout>\n\n <!-- Named slot that receives props -->\n <InfiniteScroll>\n <template v-slot:item=\"slotProps\">\n <div class=\"item\">\n {{ slotProps.item.text }}\n </div>\n </template>\n </InfiniteScroll>\n\n <!-- Default slot that receive props, with destructuring -->\n <Mouse v-slot=\"{ x, y }\">\n Mouse position: {{ x }}, {{ y }}\n </Mouse>\n ```\n\n- **See also**\n - [Components - Slots](https://it.vuejs.org/guide/components/slots.html)\n"
|
|
830
|
+
},
|
|
831
|
+
"references": [
|
|
832
|
+
{
|
|
833
|
+
"name": "en",
|
|
834
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-slot"
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "zh-cn",
|
|
838
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-slot"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"name": "ja",
|
|
842
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-slot"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"name": "ua",
|
|
846
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-slot"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"name": "fr",
|
|
850
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-slot"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"name": "ko",
|
|
854
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-slot"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"name": "pt",
|
|
858
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-slot"
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"name": "bn",
|
|
862
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-slot"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "it",
|
|
866
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-slot"
|
|
867
|
+
}
|
|
868
|
+
]
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"name": "v-pre",
|
|
872
|
+
"description": {
|
|
873
|
+
"kind": "markdown",
|
|
874
|
+
"value": "\nSkip compilation for this element and all its children.\n\n- **Does not expect expression**\n\n- **Details**\n\n Inside the element with `v-pre`, all Vue template syntax will be preserved and rendered as-is. The most common use case of this is displaying raw mustache tags.\n\n- **Example**\n\n ```html\n <span v-pre>{{ this will not be compiled }}</span>\n ```\n"
|
|
875
|
+
},
|
|
876
|
+
"references": [
|
|
877
|
+
{
|
|
878
|
+
"name": "en",
|
|
879
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-pre"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"name": "zh-cn",
|
|
883
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-pre"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "ja",
|
|
887
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-pre"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"name": "ua",
|
|
891
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-pre"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "fr",
|
|
895
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-pre"
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"name": "ko",
|
|
899
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-pre"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"name": "pt",
|
|
903
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-pre"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"name": "bn",
|
|
907
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-pre"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "it",
|
|
911
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-pre"
|
|
912
|
+
}
|
|
913
|
+
]
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"name": "v-once",
|
|
917
|
+
"description": {
|
|
918
|
+
"kind": "markdown",
|
|
919
|
+
"value": "\nRender the element and component once only, and skip future updates.\n\n- **Does not expect expression**\n\n- **Details**\n\n On subsequent re-renders, the element/component and all its children will be treated as static content and skipped. This can be used to optimize update performance.\n\n ```html\n <!-- single element -->\n <span v-once>This will never change: {{msg}}</span>\n <!-- the element have children -->\n <div v-once>\n <h1>comment</h1>\n <p>{{msg}}</p>\n </div>\n <!-- component -->\n <MyComponent v-once :comment=\"msg\"></MyComponent>\n <!-- `v-for` directive -->\n <ul>\n <li v-for=\"i in list\" v-once>{{i}}</li>\n </ul>\n ```\n\n Since 3.2, you can also memoize part of the template with invalidation conditions using [`v-memo`](#v-memo).\n\n- **See also**\n - [Data Binding Syntax - interpolations](https://it.vuejs.org/guide/essentials/template-syntax.html#text-interpolation)\n - [v-memo](#v-memo)\n"
|
|
920
|
+
},
|
|
921
|
+
"references": [
|
|
922
|
+
{
|
|
923
|
+
"name": "en",
|
|
924
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-once"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"name": "zh-cn",
|
|
928
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-once"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"name": "ja",
|
|
932
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-once"
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "ua",
|
|
936
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-once"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"name": "fr",
|
|
940
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-once"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"name": "ko",
|
|
944
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-once"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"name": "pt",
|
|
948
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-once"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"name": "bn",
|
|
952
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-once"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"name": "it",
|
|
956
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-once"
|
|
957
|
+
}
|
|
958
|
+
]
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"name": "v-memo",
|
|
962
|
+
"description": {
|
|
963
|
+
"kind": "markdown",
|
|
964
|
+
"value": "\n- **Expects:** `any[]`\n\n- **Details**\n\n Memoize a sub-tree of the template. Can be used on both elements and components. The directive expects a fixed-length array of dependency values to compare for the memoization. If every value in the array was the same as last render, then updates for the entire sub-tree will be skipped. For example:\n\n ```html\n <div v-memo=\"[valueA, valueB]\">\n ...\n </div>\n ```\n\n When the component re-renders, if both `valueA` and `valueB` remain the same, all updates for this `<div>` and its children will be skipped. In fact, even the Virtual DOM VNode creation will also be skipped since the memoized copy of the sub-tree can be reused.\n\n It is important to specify the memoization array correctly, otherwise we may skip updates that should indeed be applied. `v-memo` with an empty dependency array (`v-memo=\"[]\"`) would be functionally equivalent to `v-once`.\n\n **Usage with `v-for`**\n\n `v-memo` is provided solely for micro optimizations in performance-critical scenarios and should be rarely needed. The most common case where this may prove helpful is when rendering large `v-for` lists (where `length > 1000`):\n\n ```html\n <div v-for=\"item in list\" :key=\"item.id\" v-memo=\"[item.id === selected]\">\n <p>ID: {{ item.id }} - selected: {{ item.id === selected }}</p>\n <p>...more child nodes</p>\n </div>\n ```\n\n When the component's `selected` state changes, a large amount of VNodes will be created even though most of the items remained exactly the same. The `v-memo` usage here is essentially saying \"only update this item if it went from non-selected to selected, or the other way around\". This allows every unaffected item to reuse its previous VNode and skip diffing entirely. Note we don't need to include `item.id` in the memo dependency array here since Vue automatically infers it from the item's `:key`.\n\n :::warning\n When using `v-memo` with `v-for`, make sure they are used on the same element. **`v-memo` does not work inside `v-for`.**\n :::\n\n `v-memo` can also be used on components to manually prevent unwanted updates in certain edge cases where the child component update check has been de-optimized. But again, it is the developer's responsibility to specify correct dependency arrays to avoid skipping necessary updates.\n\n- **See also**\n - [v-once](#v-once)\n"
|
|
965
|
+
},
|
|
966
|
+
"references": [
|
|
967
|
+
{
|
|
968
|
+
"name": "en",
|
|
969
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-memo"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "zh-cn",
|
|
973
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-memo"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"name": "ja",
|
|
977
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-memo"
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"name": "ua",
|
|
981
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-memo"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"name": "fr",
|
|
985
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-memo"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "ko",
|
|
989
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-memo"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
"name": "pt",
|
|
993
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-memo"
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"name": "bn",
|
|
997
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-memo"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "it",
|
|
1001
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-memo"
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "v-cloak",
|
|
1007
|
+
"description": {
|
|
1008
|
+
"kind": "markdown",
|
|
1009
|
+
"value": "\nUsed to hide un-compiled template until it is ready.\n\n- **Does not expect expression**\n\n- **Details**\n\n **This directive is only needed in no-build-step setups.**\n\n When using in-DOM templates, there can be a \"flash of un-compiled templates\": the user may see raw mustache tags until the mounted component replaces them with rendered content.\n\n `v-cloak` will remain on the element until the associated component instance is mounted. Combined with CSS rules such as `[v-cloak] { display: none }`, it can be used to hide the raw templates until the component is ready.\n\n- **Example**\n\n ```css\n [v-cloak] {\n display: none;\n }\n ```\n\n ```html\n <div v-cloak>\n {{ message }}\n </div>\n ```\n\n The `<div>` will not be visible until the compilation is done.\n"
|
|
1010
|
+
},
|
|
1011
|
+
"references": [
|
|
1012
|
+
{
|
|
1013
|
+
"name": "en",
|
|
1014
|
+
"url": "https://vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"name": "zh-cn",
|
|
1018
|
+
"url": "https://cn.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"name": "ja",
|
|
1022
|
+
"url": "https://ja.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"name": "ua",
|
|
1026
|
+
"url": "https://ua.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"name": "fr",
|
|
1030
|
+
"url": "https://fr.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"name": "ko",
|
|
1034
|
+
"url": "https://ko.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"name": "pt",
|
|
1038
|
+
"url": "https://pt.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"name": "bn",
|
|
1042
|
+
"url": "https://bn.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"name": "it",
|
|
1046
|
+
"url": "https://it.vuejs.org/api/built-in-directives.html#v-cloak"
|
|
1047
|
+
}
|
|
1048
|
+
]
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"name": "key",
|
|
1052
|
+
"description": {
|
|
1053
|
+
"kind": "markdown",
|
|
1054
|
+
"value": "\nThe `key` special attribute is primarily used as a hint for Vue's virtual DOM algorithm to identify vnodes when diffing the new list of nodes against the old list.\n\n- **Expects:** `number | string | symbol`\n\n- **Details**\n\n Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed / destroyed.\n\n Children of the same common parent must have **unique keys**. Duplicate keys will cause render errors.\n\n The most common use case is combined with `v-for`:\n\n ```html\n <ul>\n <li v-for=\"item in items\" :key=\"item.id\">...</li>\n </ul>\n ```\n\n It can also be used to force replacement of an element/component instead of reusing it. This can be useful when you want to:\n\n - Properly trigger lifecycle hooks of a component\n - Trigger transitions\n\n For example:\n\n ```html\n <transition>\n <span :key=\"text\">{{ text }}</span>\n </transition>\n ```\n\n When `text` changes, the `<span>` will always be replaced instead of patched, so a transition will be triggered.\n\n- **See also** [Guide - List Rendering - Maintaining State with `key`](https://it.vuejs.org/guide/essentials/list.html#maintaining-state-with-key)\n"
|
|
1055
|
+
},
|
|
1056
|
+
"references": [
|
|
1057
|
+
{
|
|
1058
|
+
"name": "en",
|
|
1059
|
+
"url": "https://vuejs.org/api/built-in-special-attributes.html#key"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "zh-cn",
|
|
1063
|
+
"url": "https://cn.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "ja",
|
|
1067
|
+
"url": "https://ja.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
"name": "ua",
|
|
1071
|
+
"url": "https://ua.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"name": "fr",
|
|
1075
|
+
"url": "https://fr.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"name": "ko",
|
|
1079
|
+
"url": "https://ko.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"name": "pt",
|
|
1083
|
+
"url": "https://pt.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"name": "bn",
|
|
1087
|
+
"url": "https://bn.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"name": "it",
|
|
1091
|
+
"url": "https://it.vuejs.org/api/built-in-special-attributes.html#key"
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
"name": "ref",
|
|
1097
|
+
"description": {
|
|
1098
|
+
"kind": "markdown",
|
|
1099
|
+
"value": "\nDenotes a [template ref](https://it.vuejs.org/guide/essentials/template-refs.html).\n\n- **Expects:** `string | Function`\n\n- **Details**\n\n `ref` is used to register a reference to an element or a child component.\n\n In Options API, the reference will be registered under the component's `this.$refs` object:\n\n ```html\n <!-- stored as this.$refs.p -->\n <p ref=\"p\">hello</p>\n ```\n\n In Composition API, the reference will be stored in a ref with matching name:\n\n ```vue\n <script setup>\n import { ref } from 'vue'\n\n const p = ref()\n </script>\n\n <template>\n <p ref=\"p\">hello</p>\n </template>\n ```\n\n If used on a plain DOM element, the reference will be that element; if used on a child component, the reference will be the child component instance.\n\n Alternatively `ref` can accept a function value which provides full control over where to store the reference:\n\n ```html\n <ChildComponent :ref=\"(el) => child = el\" />\n ```\n\n An important note about the ref registration timing: because the refs themselves are created as a result of the render function, you must wait until the component is mounted before accessing them.\n\n `this.$refs` is also non-reactive, therefore you should not attempt to use it in templates for data-binding.\n\n- **See also**\n - [Guide - Template Refs](https://it.vuejs.org/guide/essentials/template-refs.html)\n - [Guide - Typing Template Refs](https://it.vuejs.org/guide/typescript/composition-api.html#typing-template-refs) <sup class=\"vt-badge ts\" />\n - [Guide - Typing Component Template Refs](https://it.vuejs.org/guide/typescript/composition-api.html#typing-component-template-refs) <sup class=\"vt-badge ts\" />\n"
|
|
1100
|
+
},
|
|
1101
|
+
"references": [
|
|
1102
|
+
{
|
|
1103
|
+
"name": "en",
|
|
1104
|
+
"url": "https://vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"name": "zh-cn",
|
|
1108
|
+
"url": "https://cn.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"name": "ja",
|
|
1112
|
+
"url": "https://ja.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"name": "ua",
|
|
1116
|
+
"url": "https://ua.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"name": "fr",
|
|
1120
|
+
"url": "https://fr.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"name": "ko",
|
|
1124
|
+
"url": "https://ko.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"name": "pt",
|
|
1128
|
+
"url": "https://pt.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "bn",
|
|
1132
|
+
"url": "https://bn.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
"name": "it",
|
|
1136
|
+
"url": "https://it.vuejs.org/api/built-in-special-attributes.html#ref"
|
|
1137
|
+
}
|
|
1138
|
+
]
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"name": "is",
|
|
1142
|
+
"description": {
|
|
1143
|
+
"kind": "markdown",
|
|
1144
|
+
"value": "\nUsed for binding [dynamic components](https://it.vuejs.org/guide/essentials/component-basics.html#dynamic-components).\n\n- **Expects:** `string | Component`\n\n- **Usage on native elements** <sup class=\"vt-badge\">3.1+</sup>\n\n When the `is` attribute is used on a native HTML element, it will be interpreted as a [Customized built-in element](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-customized-builtin-example), which is a native web platform feature.\n\n There is, however, a use case where you may need Vue to replace a native element with a Vue component, as explained in [DOM Template Parsing Caveats](https://it.vuejs.org/guide/essentials/component-basics.html#dom-template-parsing-caveats). You can prefix the value of the `is` attribute with `vue:` so that Vue will render the element as a Vue component instead:\n\n ```html\n <table>\n <tr is=\"vue:my-row-component\"></tr>\n </table>\n ```\n\n- **See also**\n\n - [Built-in Special Element - `<component>`](https://it.vuejs.org/api/built-in-special-elements.html#component)\n - [Dynamic Components](https://it.vuejs.org/guide/essentials/component-basics.html#dynamic-components)\n"
|
|
1145
|
+
},
|
|
1146
|
+
"references": [
|
|
1147
|
+
{
|
|
1148
|
+
"name": "en",
|
|
1149
|
+
"url": "https://vuejs.org/api/built-in-special-attributes.html#is"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"name": "zh-cn",
|
|
1153
|
+
"url": "https://cn.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
"name": "ja",
|
|
1157
|
+
"url": "https://ja.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"name": "ua",
|
|
1161
|
+
"url": "https://ua.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"name": "fr",
|
|
1165
|
+
"url": "https://fr.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"name": "ko",
|
|
1169
|
+
"url": "https://ko.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"name": "pt",
|
|
1173
|
+
"url": "https://pt.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
"name": "bn",
|
|
1177
|
+
"url": "https://bn.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "it",
|
|
1181
|
+
"url": "https://it.vuejs.org/api/built-in-special-attributes.html#is"
|
|
1182
|
+
}
|
|
1183
|
+
]
|
|
1184
|
+
}
|
|
1185
|
+
]
|
|
1186
|
+
}
|