File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2+ import { shallowRef } from ' vue' ;
23import Comp from ' ./components/Comp.vue'
34
45const list = [{ id: 1 }]
56const bind = { }
67const on = { submit : () => {} }
78const select = $ref <{ id: number }>(list [0 ])
9+ const compRef = shallowRef ()
810 </script >
911
1012<template >
@@ -14,6 +16,7 @@ const select = $ref<{ id: number }>(list[0])
1416 :key =" i.id"
1517 v-bind =" bind"
1618 v-model:id =" i.id"
19+ ref =" compRef"
1720 v-loading.fullscreen.lock =" true"
1821 v-memo =" [select?.id === i.id]"
1922 v-on =" on"
Original file line number Diff line number Diff line change @@ -22,6 +22,26 @@ fix: |-
2222
2323 ---
2424
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+
2545id : v-bind transform to {...props}
2646language : html
2747rule :
You can’t perform that action at this time.
0 commit comments