File tree 1 file changed +29
-1
lines changed
packages/vue-code-gen/src/generators
1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1322,7 +1322,10 @@ export function generate(
1322
1322
argRange ,
1323
1323
{
1324
1324
vueTag : 'template' ,
1325
- capabilities : capabilitiesSet . slotName ,
1325
+ capabilities : {
1326
+ ...capabilitiesSet . slotName ,
1327
+ completion : ! ! prop . arg ,
1328
+ } ,
1326
1329
} ,
1327
1330
false ,
1328
1331
) ;
@@ -1355,6 +1358,31 @@ export function generate(
1355
1358
} ,
1356
1359
} ) ;
1357
1360
tsCodeGen . addText ( `;\n` ) ;
1361
+
1362
+ if ( isStatic && ! prop . arg ) {
1363
+
1364
+ let offset = prop . loc . start . offset ;
1365
+
1366
+ if ( prop . loc . source . startsWith ( '#' ) )
1367
+ offset += '#' . length ;
1368
+ else if ( prop . loc . source . startsWith ( 'v-slot:' ) )
1369
+ offset += 'v-slot:' . length ;
1370
+
1371
+ tsCodeGen . addText ( varSlots ) ;
1372
+ tsCodeGen . addText ( `['` ) ;
1373
+ writeCode (
1374
+ '' ,
1375
+ { start : offset , end : offset } ,
1376
+ SourceMaps . Mode . Offset ,
1377
+ {
1378
+ vueTag : 'template' ,
1379
+ capabilities : {
1380
+ completion : true ,
1381
+ } ,
1382
+ } ,
1383
+ ) ;
1384
+ tsCodeGen . addText ( `'];\n` ) ;
1385
+ }
1358
1386
}
1359
1387
}
1360
1388
}
You can’t perform that action at this time.
0 commit comments