File tree Expand file tree Collapse file tree 4 files changed +32
-8
lines changed
Expand file tree Collapse file tree 4 files changed +32
-8
lines changed Original file line number Diff line number Diff line change 11<template >
2- <el-input class =" emqx-input" >
2+ <el-input ref = " input " class =" emqx-input" >
33 <template v-if =" $slots .prepend " #prepend >
44 <slot name =" prepend" ></slot >
55 </template >
1616</template >
1717
1818<script lang="ts">
19- import { defineComponent } from ' vue'
19+ import { defineComponent , ref } from ' vue'
2020import { ElInput } from ' element-plus'
2121
2222export default defineComponent ({
2323 name: ' EmqxInput' ,
2424 components: {
2525 ElInput ,
2626 },
27+ setup() {
28+ const input = ref ()
29+ return {
30+ input ,
31+ }
32+ },
2733})
2834 </script >
Original file line number Diff line number Diff line change 11<template >
2- <el-select class = " emqx- select" ref = " select" >
2+ <el-select ref = " select" class = " emqx- select" >
33 <slot ></slot >
44 </el-select >
55</template >
66
77<script lang="ts">
8- import { defineComponent } from ' vue'
8+ import { defineComponent , ref } from ' vue'
99import { ElSelect } from ' element-plus'
1010
1111export default defineComponent ({
1212 name: ' EmqxSelect' ,
1313 components: {
1414 ElSelect ,
1515 },
16+ setup() {
17+ const select = ref ()
18+ return {
19+ select ,
20+ }
21+ },
1622})
1723 </script >
Original file line number Diff line number Diff line change 11<template >
2- <el-table class =" emqx-table" >
2+ <el-table ref = " table " class =" emqx-table" >
33 <slot ></slot >
44 </el-table >
55</template >
66
77<script lang="ts">
8- import { defineComponent } from ' vue'
8+ import { defineComponent , ref } from ' vue'
99import { ElTable } from ' element-plus'
1010
1111export default defineComponent ({
1212 name: ' EmqxTable' ,
1313 components: {
1414 ElTable ,
1515 },
16+ setup() {
17+ const table = ref ()
18+ return {
19+ table ,
20+ }
21+ },
1622})
1723 </script >
Original file line number Diff line number Diff line change 11<template >
2- <el-upload class =" emqx-upload" >
2+ <el-upload ref = " upload " class =" emqx-upload" >
33 <slot ></slot >
44 <template v-if =" $slots .tip " #tip >
55 <slot name =" tip" ></slot >
88</template >
99
1010<script lang="ts">
11- import { defineComponent } from ' vue'
11+ import { defineComponent , ref } from ' vue'
1212import { ElUpload } from ' element-plus'
1313
1414export default defineComponent ({
1515 name: ' EmqxUpload' ,
1616 components: {
1717 ElUpload ,
1818 },
19+ setup() {
20+ const upload = ref ()
21+ return {
22+ upload ,
23+ }
24+ },
1925})
2026 </script >
You can’t perform that action at this time.
0 commit comments