@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,830 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1.1,
|
|
3
|
+
"tags": [
|
|
4
|
+
{
|
|
5
|
+
"name": "template",
|
|
6
|
+
"attributes": [
|
|
7
|
+
{
|
|
8
|
+
"name": "src",
|
|
9
|
+
"description": {
|
|
10
|
+
"kind": "markdown",
|
|
11
|
+
"value": "\nSe preferisci suddividere i tuoi componenti `*.vue` in file multipli, puoi utilizzare l'attributo `src` per importare un file esterno per un blocco di linguaggio:\n\n```vue\n<template src=\"./template.html\"></template>\n<style src=\"./style.css\"></style>\n<script src=\"./script.js\"></script>\n```\n\nTieni presente che gli import `src` seguono le stesse regole di risoluzione del percorso delle richieste dei moduli webpack, il che significa:\n\n- I percorsi relativi devono iniziare con `./`\n- Puoi importare risorse tramite dipendenze npm:\n\n```vue\n<!-- importa un file dal pacchetto npm \"todomvc-app-css\" installato -->\n<style src=\"todomvc-app-css/index.css\" />\n```\n\nGli import `src` funzionano anche con blocchi custom, per esempio:\n\n```vue\n<unit-test src=\"./unit-test.js\">\n</unit-test>\n```\n"
|
|
12
|
+
},
|
|
13
|
+
"references": [
|
|
14
|
+
{
|
|
15
|
+
"name": "en",
|
|
16
|
+
"url": "https://vuejs.org/api/sfc-spec.html#src-imports"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "zh-cn",
|
|
20
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "ja",
|
|
24
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#src-imports"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "ua",
|
|
28
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#src-imports"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "fr",
|
|
32
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#src-imports"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "ko",
|
|
36
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#src-imports"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "pt",
|
|
40
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#src-imports"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "bn",
|
|
44
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "it",
|
|
48
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#src-imports"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "lang",
|
|
54
|
+
"description": {
|
|
55
|
+
"kind": "markdown",
|
|
56
|
+
"value": "\nI blocchi possono dichiarare linguaggi di pre-processore utilizzando l'attributo `lang`. Il caso più comune è l'utilizzo di TypeScript per il blocco `<script>`:\n\n```html\n<script lang=\"ts\">\n // use TypeScript\n</script>\n```\n\n`lang` può essere applicato su ogni blocco - per esempio possiamo usare `<style>` con [Sass](https://sass-lang.com/) e `<template>` con [Pug](https://pugjs.org/api/getting-started.html):\n\n```html\n<template lang=\"pug\">\np {{ msg }}\n</template>\n\n<style lang=\"scss\">\n $primary-color: #333;\n body {\n color: $primary-color;\n }\n</style>\n```\n\nTieni presente che l'integrazione con diversi pre-processori può variare in base alla catena di strumenti utilizzata. Consulta la rispettiva documentazione per ulteriori esempi:\n\n- [Vite](https://vitejs.dev/guide/features.html#css-pre-processors)\n- [Vue CLI](https://cli.vuejs.org/guide/css.html#pre-processors)\n- [webpack + vue-loader](https://vue-loader.vuejs.org/guide/pre-processors.html#using-pre-processors)\n"
|
|
57
|
+
},
|
|
58
|
+
"values": [
|
|
59
|
+
{
|
|
60
|
+
"name": "html"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "pug"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"references": [
|
|
67
|
+
{
|
|
68
|
+
"name": "en",
|
|
69
|
+
"url": "https://vuejs.org/api/sfc-spec.html#pre-processors"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "zh-cn",
|
|
73
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "ja",
|
|
77
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "ua",
|
|
81
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "fr",
|
|
85
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "ko",
|
|
89
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "pt",
|
|
93
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "bn",
|
|
97
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "it",
|
|
101
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"description": {
|
|
107
|
+
"kind": "markdown",
|
|
108
|
+
"value": "\n- Ogni file `*.vue` può contenere massimo un blocco `<template>`.\n\n- I suoi contenuti verranno estratti e passati al `@vue/compiler-dom`, pre-compilati in render function di JavaScript, e collegati al componente esportato come sua opzione`render`.\n"
|
|
109
|
+
},
|
|
110
|
+
"references": [
|
|
111
|
+
{
|
|
112
|
+
"name": "en",
|
|
113
|
+
"url": "https://vuejs.org/api/sfc-spec.html#template"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "zh-cn",
|
|
117
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#template"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "ja",
|
|
121
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#template"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "ua",
|
|
125
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#template"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "fr",
|
|
129
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#template"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "ko",
|
|
133
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#template"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "pt",
|
|
137
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#template"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "bn",
|
|
141
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#template"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "it",
|
|
145
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#template"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "script",
|
|
151
|
+
"attributes": [
|
|
152
|
+
{
|
|
153
|
+
"name": "src",
|
|
154
|
+
"description": {
|
|
155
|
+
"kind": "markdown",
|
|
156
|
+
"value": "\nSe preferisci suddividere i tuoi componenti `*.vue` in file multipli, puoi utilizzare l'attributo `src` per importare un file esterno per un blocco di linguaggio:\n\n```vue\n<template src=\"./template.html\"></template>\n<style src=\"./style.css\"></style>\n<script src=\"./script.js\"></script>\n```\n\nTieni presente che gli import `src` seguono le stesse regole di risoluzione del percorso delle richieste dei moduli webpack, il che significa:\n\n- I percorsi relativi devono iniziare con `./`\n- Puoi importare risorse tramite dipendenze npm:\n\n```vue\n<!-- importa un file dal pacchetto npm \"todomvc-app-css\" installato -->\n<style src=\"todomvc-app-css/index.css\" />\n```\n\nGli import `src` funzionano anche con blocchi custom, per esempio:\n\n```vue\n<unit-test src=\"./unit-test.js\">\n</unit-test>\n```\n"
|
|
157
|
+
},
|
|
158
|
+
"references": [
|
|
159
|
+
{
|
|
160
|
+
"name": "en",
|
|
161
|
+
"url": "https://vuejs.org/api/sfc-spec.html#src-imports"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "zh-cn",
|
|
165
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "ja",
|
|
169
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#src-imports"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "ua",
|
|
173
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#src-imports"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "fr",
|
|
177
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#src-imports"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "ko",
|
|
181
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#src-imports"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "pt",
|
|
185
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#src-imports"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "bn",
|
|
189
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "it",
|
|
193
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#src-imports"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "lang",
|
|
199
|
+
"description": {
|
|
200
|
+
"kind": "markdown",
|
|
201
|
+
"value": "\nI blocchi possono dichiarare linguaggi di pre-processore utilizzando l'attributo `lang`. Il caso più comune è l'utilizzo di TypeScript per il blocco `<script>`:\n\n```html\n<script lang=\"ts\">\n // use TypeScript\n</script>\n```\n\n`lang` può essere applicato su ogni blocco - per esempio possiamo usare `<style>` con [Sass](https://sass-lang.com/) e `<template>` con [Pug](https://pugjs.org/api/getting-started.html):\n\n```html\n<template lang=\"pug\">\np {{ msg }}\n</template>\n\n<style lang=\"scss\">\n $primary-color: #333;\n body {\n color: $primary-color;\n }\n</style>\n```\n\nTieni presente che l'integrazione con diversi pre-processori può variare in base alla catena di strumenti utilizzata. Consulta la rispettiva documentazione per ulteriori esempi:\n\n- [Vite](https://vitejs.dev/guide/features.html#css-pre-processors)\n- [Vue CLI](https://cli.vuejs.org/guide/css.html#pre-processors)\n- [webpack + vue-loader](https://vue-loader.vuejs.org/guide/pre-processors.html#using-pre-processors)\n"
|
|
202
|
+
},
|
|
203
|
+
"values": [
|
|
204
|
+
{
|
|
205
|
+
"name": "ts"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "js"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "tsx"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "jsx"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"references": [
|
|
218
|
+
{
|
|
219
|
+
"name": "en",
|
|
220
|
+
"url": "https://vuejs.org/api/sfc-spec.html#pre-processors"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "zh-cn",
|
|
224
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "ja",
|
|
228
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "ua",
|
|
232
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "fr",
|
|
236
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "ko",
|
|
240
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "pt",
|
|
244
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "bn",
|
|
248
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "it",
|
|
252
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "generic"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "setup",
|
|
261
|
+
"valueSet": "v",
|
|
262
|
+
"description": {
|
|
263
|
+
"kind": "markdown",
|
|
264
|
+
"value": "\n- Ogni file `*.vue` può contenere al massimo un blocco `<script setup>` (escludendo lo `<script>` classico).\n\n- Lo script viene pre-processato e utilizzato come la funzione `setup()` del componente, il che significa che verrà eseguito **per ogni istanza del componente**. Le associazioni al livello superiore in `<script setup>` vengono automaticamente esposte al template. Per ulteriori dettagli, consulta la [documentazione dedicata a `<script setup>`](https://it.vuejs.org/api/sfc-script-setup.html).\n"
|
|
265
|
+
},
|
|
266
|
+
"references": [
|
|
267
|
+
{
|
|
268
|
+
"name": "en",
|
|
269
|
+
"url": "https://vuejs.org/api/sfc-spec.html#script-setup"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "zh-cn",
|
|
273
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#script-setup"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "ja",
|
|
277
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#script-setup"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "ua",
|
|
281
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#script-setup"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "fr",
|
|
285
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#script-setup"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "ko",
|
|
289
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#script-setup"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "pt",
|
|
293
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#script-setup"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "bn",
|
|
297
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#script-setup"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "it",
|
|
301
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#script-setup"
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"description": {
|
|
307
|
+
"kind": "markdown",
|
|
308
|
+
"value": "\n- Ogni file `*.vue` può contenere al massimo un blocco `<script>` (escludendo [`<script setup>`](https://it.vuejs.org/api/sfc-script-setup.html)).\n\n- Lo script viene eseguito come un ES Module.\n\n- Il **default export** dovrebbe essere un oggetto di opzioni del componente Vue, sia come oggetto semplice che come valore restituito da [defineComponent](https://it.vuejs.org/api/general.html#definecomponent).\n"
|
|
309
|
+
},
|
|
310
|
+
"references": [
|
|
311
|
+
{
|
|
312
|
+
"name": "en",
|
|
313
|
+
"url": "https://vuejs.org/api/sfc-spec.html#script"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"name": "zh-cn",
|
|
317
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#script"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "ja",
|
|
321
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#script"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "ua",
|
|
325
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#script"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "fr",
|
|
329
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#script"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "ko",
|
|
333
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#script"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "pt",
|
|
337
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#script"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "bn",
|
|
341
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#script"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "it",
|
|
345
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#script"
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "script setup",
|
|
351
|
+
"attributes": [],
|
|
352
|
+
"description": {
|
|
353
|
+
"kind": "markdown",
|
|
354
|
+
"value": "\n- Ogni file `*.vue` può contenere al massimo un blocco `<script setup>` (escludendo lo `<script>` classico).\n\n- Lo script viene pre-processato e utilizzato come la funzione `setup()` del componente, il che significa che verrà eseguito **per ogni istanza del componente**. Le associazioni al livello superiore in `<script setup>` vengono automaticamente esposte al template. Per ulteriori dettagli, consulta la [documentazione dedicata a `<script setup>`](https://it.vuejs.org/api/sfc-script-setup.html).\n"
|
|
355
|
+
},
|
|
356
|
+
"references": [
|
|
357
|
+
{
|
|
358
|
+
"name": "en",
|
|
359
|
+
"url": "https://vuejs.org/api/sfc-spec.html#script-setup"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "zh-cn",
|
|
363
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#script-setup"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "ja",
|
|
367
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#script-setup"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "ua",
|
|
371
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#script-setup"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "fr",
|
|
375
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#script-setup"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "ko",
|
|
379
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#script-setup"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "pt",
|
|
383
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#script-setup"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "bn",
|
|
387
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#script-setup"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "it",
|
|
391
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#script-setup"
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "style",
|
|
397
|
+
"attributes": [
|
|
398
|
+
{
|
|
399
|
+
"name": "src",
|
|
400
|
+
"description": {
|
|
401
|
+
"kind": "markdown",
|
|
402
|
+
"value": "\nSe preferisci suddividere i tuoi componenti `*.vue` in file multipli, puoi utilizzare l'attributo `src` per importare un file esterno per un blocco di linguaggio:\n\n```vue\n<template src=\"./template.html\"></template>\n<style src=\"./style.css\"></style>\n<script src=\"./script.js\"></script>\n```\n\nTieni presente che gli import `src` seguono le stesse regole di risoluzione del percorso delle richieste dei moduli webpack, il che significa:\n\n- I percorsi relativi devono iniziare con `./`\n- Puoi importare risorse tramite dipendenze npm:\n\n```vue\n<!-- importa un file dal pacchetto npm \"todomvc-app-css\" installato -->\n<style src=\"todomvc-app-css/index.css\" />\n```\n\nGli import `src` funzionano anche con blocchi custom, per esempio:\n\n```vue\n<unit-test src=\"./unit-test.js\">\n</unit-test>\n```\n"
|
|
403
|
+
},
|
|
404
|
+
"references": [
|
|
405
|
+
{
|
|
406
|
+
"name": "en",
|
|
407
|
+
"url": "https://vuejs.org/api/sfc-spec.html#src-imports"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "zh-cn",
|
|
411
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "ja",
|
|
415
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#src-imports"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "ua",
|
|
419
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#src-imports"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "fr",
|
|
423
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#src-imports"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "ko",
|
|
427
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#src-imports"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "pt",
|
|
431
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#src-imports"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "bn",
|
|
435
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "it",
|
|
439
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#src-imports"
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "lang",
|
|
445
|
+
"description": {
|
|
446
|
+
"kind": "markdown",
|
|
447
|
+
"value": "\nI blocchi possono dichiarare linguaggi di pre-processore utilizzando l'attributo `lang`. Il caso più comune è l'utilizzo di TypeScript per il blocco `<script>`:\n\n```html\n<script lang=\"ts\">\n // use TypeScript\n</script>\n```\n\n`lang` può essere applicato su ogni blocco - per esempio possiamo usare `<style>` con [Sass](https://sass-lang.com/) e `<template>` con [Pug](https://pugjs.org/api/getting-started.html):\n\n```html\n<template lang=\"pug\">\np {{ msg }}\n</template>\n\n<style lang=\"scss\">\n $primary-color: #333;\n body {\n color: $primary-color;\n }\n</style>\n```\n\nTieni presente che l'integrazione con diversi pre-processori può variare in base alla catena di strumenti utilizzata. Consulta la rispettiva documentazione per ulteriori esempi:\n\n- [Vite](https://vitejs.dev/guide/features.html#css-pre-processors)\n- [Vue CLI](https://cli.vuejs.org/guide/css.html#pre-processors)\n- [webpack + vue-loader](https://vue-loader.vuejs.org/guide/pre-processors.html#using-pre-processors)\n"
|
|
448
|
+
},
|
|
449
|
+
"values": [
|
|
450
|
+
{
|
|
451
|
+
"name": "css"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "scss"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "less"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"name": "stylus"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "postcss"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "sass"
|
|
467
|
+
}
|
|
468
|
+
],
|
|
469
|
+
"references": [
|
|
470
|
+
{
|
|
471
|
+
"name": "en",
|
|
472
|
+
"url": "https://vuejs.org/api/sfc-spec.html#pre-processors"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "zh-cn",
|
|
476
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "ja",
|
|
480
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "ua",
|
|
484
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "fr",
|
|
488
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "ko",
|
|
492
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "pt",
|
|
496
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "bn",
|
|
500
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "it",
|
|
504
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "scoped",
|
|
510
|
+
"valueSet": "v",
|
|
511
|
+
"description": {
|
|
512
|
+
"kind": "markdown",
|
|
513
|
+
"value": "\nQuando un tag `<style>` ha l'attributo `scoped`, il suo CSS verrà applicato solo agli elementi del componente corrente. Questo è simile all'incapsulamento dello stile presente in Shadow DOM. Ha alcune limitazioni, ma non richiede alcun polyfill. Ciò è ottenuto utilizzando PostCSS per trasformare quanto segue:\n\n```vue\n<style scoped>\n.example {\n color: red;\n}\n</style>\n\n<template>\n <div class=\"example\">ciao</div>\n</template>\n```\n\nIn questo:\n\n```vue\n<style>\n.example[data-v-f3f3eg9] {\n color: red;\n}\n</style>\n\n<template>\n <div class=\"example\" data-v-f3f3eg9>ciao</div>\n</template>\n```\n\n### Elementi Root dei componenti figli \n\nCon l'attributo `scoped`, gli stili del componente genitore non si propagheranno nei componenti figlio. Tuttavia, il nodo radice di un componente figlio sarà influenzato sia dagli stili scoped del genitore che da quelli del figlio. Questo è progettato in modo che il genitore possa stilizzare l'elemento radice del figlio per scopi di layout.\n\n### Selettori in profondità \n\nSe desideri che un selettore negli stili `scoped` abbia effetto anche sui componenti figlio, puoi utilizzare la pseudo-classe `:deep()`:\n\n```vue\n<style scoped>\n.a :deep(.b) {\n /* ... */\n}\n</style>\n```\n\nIl codice sopra verrà compilato in:\n\n```css\n.a[data-v-f3f3eg9] .b {\n /* ... */\n}\n```\n\n:::tip\nIl contenuto DOM creato con `v-html` non è influenzato dagli stili scoped, ma puoi comunque stilizzarlo utilizzando i selettori deep.\n:::\n\n### Selettori degli slot \n\nPer impostazione predefinita, gli stili scoped non influenzano il contenuto renderizzato da `<slot/>`, poiché sono considerati di proprietà del componente genitore che li passa. Per puntare in modo esplicito al contenuto dello slot, utilizza la pseudo-classe `:slotted`:\n\n```vue\n<style scoped>\n:slotted(div) {\n color: red;\n}\n</style>\n```\n\n### Selettori globali \n\nSe vuoi applicare una regola globalmente, puoi utilizzare la pseudo-classe `:global` anziché creare un altro blocco `<style>` (vedi sotto):\n\n```vue\n<style scoped>\n:global(.red) {\n color: red;\n}\n</style>\n```\n\n### Mixare stili locali e globali \n\nPuoi anche includere stili sia scoped che non scoped nello stesso componente:\n\n```vue\n<style>\n/* global styles */\n</style>\n\n<style scoped>\n/* local styles */\n</style>\n```\n\n### Tips per lo style scoped \n\n- **Gli stili scoped non eliminano la necessità delle classi.**. A causa del modo in cui i browser interpretano i diversi selettori CSS, `p { color: red }` sarà molto più lento quando è scoped (ossia quando è combinato con un selettore di attributo). Se invece usi classi o id, come ad esempio `.example { color: red }`, eliminerai praticamente questo impatto sulle prestazioni.\n\n- **Fai attenzione ai selettori discendenti nei componenti ricorsivi!** Per una regola CSS con il selettore `.a .b`, se l'elemento che corrisponde a `.a` contiene un componente figlio ricorsivo, allora a tutti i `.b` in quel componente figlio verrà applicata quella regola.\n"
|
|
514
|
+
},
|
|
515
|
+
"references": [
|
|
516
|
+
{
|
|
517
|
+
"name": "en",
|
|
518
|
+
"url": "https://vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"name": "zh-cn",
|
|
522
|
+
"url": "https://cn.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"name": "ja",
|
|
526
|
+
"url": "https://ja.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "ua",
|
|
530
|
+
"url": "https://ua.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "fr",
|
|
534
|
+
"url": "https://fr.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "ko",
|
|
538
|
+
"url": "https://ko.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "pt",
|
|
542
|
+
"url": "https://pt.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "bn",
|
|
546
|
+
"url": "https://bn.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "it",
|
|
550
|
+
"url": "https://it.vuejs.org/api/sfc-css-features.html#scoped-css"
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"name": "module",
|
|
556
|
+
"valueSet": "v",
|
|
557
|
+
"description": {
|
|
558
|
+
"kind": "markdown",
|
|
559
|
+
"value": "\nUn tag `<style module>` viene compilato come [moduli CSS](https://github.com/css-modules/css-modules) ed espone le classi CSS risultanti al componente come un oggetto con chiave `$style`:\n\n```vue\n<template>\n <p :class=\"$style.red\">Questo dovrebbe essere rosso</p>\n</template>\n\n<style module>\n.red {\n color: red;\n}\n</style>\n```\n\nLe classi risultanti sono hashate per evitare collisioni, ottenendo lo stesso effetto di delimitazione degli stili CSS per il solo componente corrente.\n\nFai riferimento alle [spec dei moduli CSS](https://github.com/css-modules/css-modules) per ulteriori dettagli come le [eccezioni globali](https://github.com/css-modules/css-modules#exceptions) e [composition](https://github.com/css-modules/css-modules#composition).\n\n### Nome Personalizzato per Inject \n\nPuoi personalizzare la chiave di proprietà dell'oggetto delle classi iniettate assegnando un valore all'attributo `module`:\n\n```vue\n<template>\n <p :class=\"classes.red\">rosso</p>\n</template>\n\n<style module=\"classes\">\n.red {\n color: red;\n}\n</style>\n```\n\n### Utilizzo con Composition API \n\nPuoi avere accesso alle classi iniettate in `setup()` e `<script setup>` via l'API `useCssModule`. Per i blocchi `<style module>` con nomi di iniezione custom, `useCssModule` accetta il valore corrispondente dell'attributo `module` come primo argomento:\n\n```js\nimport { useCssModule } from 'vue'\n\n// dentro lo scope setup()...\n// default, ritorna classi per <style module>\nuseCssModule()\n\n// nominate, ritorna classi per <style module=\"classes\">\nuseCssModule('classes')\n```\n"
|
|
560
|
+
},
|
|
561
|
+
"references": [
|
|
562
|
+
{
|
|
563
|
+
"name": "en",
|
|
564
|
+
"url": "https://vuejs.org/api/sfc-css-features.html#css-modules"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "zh-cn",
|
|
568
|
+
"url": "https://cn.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "ja",
|
|
572
|
+
"url": "https://ja.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "ua",
|
|
576
|
+
"url": "https://ua.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "fr",
|
|
580
|
+
"url": "https://fr.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "ko",
|
|
584
|
+
"url": "https://ko.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "pt",
|
|
588
|
+
"url": "https://pt.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "bn",
|
|
592
|
+
"url": "https://bn.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "it",
|
|
596
|
+
"url": "https://it.vuejs.org/api/sfc-css-features.html#css-modules"
|
|
597
|
+
}
|
|
598
|
+
]
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"description": {
|
|
602
|
+
"kind": "markdown",
|
|
603
|
+
"value": "\n- Un singolo file `*.vue` può contenere più tag `<style>`.\n\n- Un tag `<style>` può avere gli attributi `scoped` o `module` (guarda [Funzionalità CSS dei SFC](https://it.vuejs.org/api/sfc-css-features.html) per maggiori dettagli) per aiutare ad incapsulare gli stili all'interno del componente corrente. È possibile mescolare più tag `<style>` con diverse modalità di incapsulamento nello stesso componente.\n"
|
|
604
|
+
},
|
|
605
|
+
"references": [
|
|
606
|
+
{
|
|
607
|
+
"name": "en",
|
|
608
|
+
"url": "https://vuejs.org/api/sfc-spec.html#style"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"name": "zh-cn",
|
|
612
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#style"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"name": "ja",
|
|
616
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#style"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "ua",
|
|
620
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#style"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "fr",
|
|
624
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#style"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"name": "ko",
|
|
628
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#style"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "pt",
|
|
632
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#style"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "bn",
|
|
636
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#style"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "it",
|
|
640
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#style"
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"name": "Blocchi custom",
|
|
646
|
+
"attributes": [
|
|
647
|
+
{
|
|
648
|
+
"name": "src",
|
|
649
|
+
"description": {
|
|
650
|
+
"kind": "markdown",
|
|
651
|
+
"value": "\nSe preferisci suddividere i tuoi componenti `*.vue` in file multipli, puoi utilizzare l'attributo `src` per importare un file esterno per un blocco di linguaggio:\n\n```vue\n<template src=\"./template.html\"></template>\n<style src=\"./style.css\"></style>\n<script src=\"./script.js\"></script>\n```\n\nTieni presente che gli import `src` seguono le stesse regole di risoluzione del percorso delle richieste dei moduli webpack, il che significa:\n\n- I percorsi relativi devono iniziare con `./`\n- Puoi importare risorse tramite dipendenze npm:\n\n```vue\n<!-- importa un file dal pacchetto npm \"todomvc-app-css\" installato -->\n<style src=\"todomvc-app-css/index.css\" />\n```\n\nGli import `src` funzionano anche con blocchi custom, per esempio:\n\n```vue\n<unit-test src=\"./unit-test.js\">\n</unit-test>\n```\n"
|
|
652
|
+
},
|
|
653
|
+
"references": [
|
|
654
|
+
{
|
|
655
|
+
"name": "en",
|
|
656
|
+
"url": "https://vuejs.org/api/sfc-spec.html#src-imports"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "zh-cn",
|
|
660
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "ja",
|
|
664
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#src-imports"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "ua",
|
|
668
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#src-imports"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"name": "fr",
|
|
672
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#src-imports"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "ko",
|
|
676
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#src-imports"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "pt",
|
|
680
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#src-imports"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"name": "bn",
|
|
684
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"name": "it",
|
|
688
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#src-imports"
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
}
|
|
692
|
+
],
|
|
693
|
+
"description": {
|
|
694
|
+
"kind": "markdown",
|
|
695
|
+
"value": "\nBlocchi personalizzati aggiuntivi possono essere inclusi in un file `*.vue` per soddisfare esigenze specifiche del progetto, ad esempio un blocco `<docs>`. Alcuni esempi concreti di blocchi personalizzati includono:\n\n- [Gridsome: `<page-query>`](https://gridsome.org/docs/querying-data/)\n- [vite-plugin-vue-gql: `<gql>`](https://github.com/wheatjs/vite-plugin-vue-gql)\n- [vue-i18n: `<i18n>`](https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n#i18n-custom-block)\n\nLa gestione dei blocchi personalizzati dipenderà dagli strumenti utilizzati. Se desideri creare le tue integrazioni personalizzate per i blocchi, consulta la [sezione degli strumenti per integrazioni di blocchi personalizzati negli SFC](https://it.vuejs.org/guide/scaling-up/tooling.html#sfc-custom-block-integrations) per ulteriori dettagli.\n"
|
|
696
|
+
},
|
|
697
|
+
"references": [
|
|
698
|
+
{
|
|
699
|
+
"name": "en",
|
|
700
|
+
"url": "https://vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "zh-cn",
|
|
704
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "ja",
|
|
708
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"name": "ua",
|
|
712
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"name": "fr",
|
|
716
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "ko",
|
|
720
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"name": "pt",
|
|
724
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"name": "bn",
|
|
728
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"name": "it",
|
|
732
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#blocchi-custom"
|
|
733
|
+
}
|
|
734
|
+
]
|
|
735
|
+
}
|
|
736
|
+
],
|
|
737
|
+
"globalAttributes": [
|
|
738
|
+
{
|
|
739
|
+
"name": "lang",
|
|
740
|
+
"description": {
|
|
741
|
+
"kind": "markdown",
|
|
742
|
+
"value": "\nI blocchi possono dichiarare linguaggi di pre-processore utilizzando l'attributo `lang`. Il caso più comune è l'utilizzo di TypeScript per il blocco `<script>`:\n\n```html\n<script lang=\"ts\">\n // use TypeScript\n</script>\n```\n\n`lang` può essere applicato su ogni blocco - per esempio possiamo usare `<style>` con [Sass](https://sass-lang.com/) e `<template>` con [Pug](https://pugjs.org/api/getting-started.html):\n\n```html\n<template lang=\"pug\">\np {{ msg }}\n</template>\n\n<style lang=\"scss\">\n $primary-color: #333;\n body {\n color: $primary-color;\n }\n</style>\n```\n\nTieni presente che l'integrazione con diversi pre-processori può variare in base alla catena di strumenti utilizzata. Consulta la rispettiva documentazione per ulteriori esempi:\n\n- [Vite](https://vitejs.dev/guide/features.html#css-pre-processors)\n- [Vue CLI](https://cli.vuejs.org/guide/css.html#pre-processors)\n- [webpack + vue-loader](https://vue-loader.vuejs.org/guide/pre-processors.html#using-pre-processors)\n"
|
|
743
|
+
},
|
|
744
|
+
"values": [],
|
|
745
|
+
"references": [
|
|
746
|
+
{
|
|
747
|
+
"name": "en",
|
|
748
|
+
"url": "https://vuejs.org/api/sfc-spec.html#pre-processors"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "zh-cn",
|
|
752
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "ja",
|
|
756
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "ua",
|
|
760
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "fr",
|
|
764
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "ko",
|
|
768
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "pt",
|
|
772
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"name": "bn",
|
|
776
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"name": "it",
|
|
780
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#pre-processors"
|
|
781
|
+
}
|
|
782
|
+
]
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"name": "src",
|
|
786
|
+
"description": {
|
|
787
|
+
"kind": "markdown",
|
|
788
|
+
"value": "\nSe preferisci suddividere i tuoi componenti `*.vue` in file multipli, puoi utilizzare l'attributo `src` per importare un file esterno per un blocco di linguaggio:\n\n```vue\n<template src=\"./template.html\"></template>\n<style src=\"./style.css\"></style>\n<script src=\"./script.js\"></script>\n```\n\nTieni presente che gli import `src` seguono le stesse regole di risoluzione del percorso delle richieste dei moduli webpack, il che significa:\n\n- I percorsi relativi devono iniziare con `./`\n- Puoi importare risorse tramite dipendenze npm:\n\n```vue\n<!-- importa un file dal pacchetto npm \"todomvc-app-css\" installato -->\n<style src=\"todomvc-app-css/index.css\" />\n```\n\nGli import `src` funzionano anche con blocchi custom, per esempio:\n\n```vue\n<unit-test src=\"./unit-test.js\">\n</unit-test>\n```\n"
|
|
789
|
+
},
|
|
790
|
+
"references": [
|
|
791
|
+
{
|
|
792
|
+
"name": "en",
|
|
793
|
+
"url": "https://vuejs.org/api/sfc-spec.html#src-imports"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"name": "zh-cn",
|
|
797
|
+
"url": "https://cn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"name": "ja",
|
|
801
|
+
"url": "https://ja.vuejs.org/api/sfc-spec.html#src-imports"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"name": "ua",
|
|
805
|
+
"url": "https://ua.vuejs.org/api/sfc-spec.html#src-imports"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "fr",
|
|
809
|
+
"url": "https://fr.vuejs.org/api/sfc-spec.html#src-imports"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"name": "ko",
|
|
813
|
+
"url": "https://ko.vuejs.org/api/sfc-spec.html#src-imports"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "pt",
|
|
817
|
+
"url": "https://pt.vuejs.org/api/sfc-spec.html#src-imports"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"name": "bn",
|
|
821
|
+
"url": "https://bn.vuejs.org/api/sfc-spec.html#src-imports"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"name": "it",
|
|
825
|
+
"url": "https://it.vuejs.org/api/sfc-spec.html#src-imports"
|
|
826
|
+
}
|
|
827
|
+
]
|
|
828
|
+
}
|
|
829
|
+
]
|
|
830
|
+
}
|