File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
+ import { shallowRef } from ' vue' ;
2
3
import Comp from ' ./components/Comp.vue'
3
4
4
5
const list = [{ id: 1 }]
5
6
const bind = { }
6
7
const on = { submit : () => {} }
7
8
const select = $ref <{ id: number }>(list [0 ])
9
+ const compRef = shallowRef ()
8
10
</script >
9
11
10
12
<template >
@@ -14,6 +16,7 @@ const select = $ref<{ id: number }>(list[0])
14
16
:key =" i.id"
15
17
v-bind =" bind"
16
18
v-model:id =" i.id"
19
+ ref =" compRef"
17
20
v-loading.fullscreen.lock =" true"
18
21
v-memo =" [select?.id === i.id]"
19
22
v-on =" on"
Original file line number Diff line number Diff line change @@ -22,6 +22,26 @@ fix: |-
22
22
23
23
---
24
24
25
+ id : v-template-ref
26
+ language : html
27
+ rule :
28
+ kind : quoted_attribute_value
29
+ pattern : $VALUE
30
+ follows :
31
+ kind : attribute_name
32
+ regex : ^ref$
33
+ stopBy : end
34
+ transform :
35
+ V :
36
+ substring :
37
+ startChar : 1
38
+ endChar : -1
39
+ source : $VALUE
40
+ fix : |-
41
+ {$V}
42
+
43
+ ---
44
+
25
45
id : v-bind transform to {...props}
26
46
language : html
27
47
rule :
You can’t perform that action at this time.
0 commit comments