File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed
Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change 4141
4242 <div class =" py-2" >
4343 <div class =" pb-2 text-right" >
44- <ElButton type =" primary" class =" w-40" >生成</ElButton >
44+ <ElButton
45+ type =" primary"
46+ class =" w-40"
47+ @click =" handleCreate"
48+ >生成</ElButton
49+ >
4550 </div >
4651
4752 <div class =" pb-2" >
48- <ElInput v-model =" content" type =" textarea" ></ElInput >
53+ <ElInput
54+ v-model =" content"
55+ type =" textarea"
56+ disabled
57+ :rows =" 10"
58+ ></ElInput >
4959 </div >
5060 <div class =" text-right" >
51- <ElButton type =" success" class =" w-40" >复制</ElButton >
61+ <ElButton
62+ type =" success"
63+ class =" w-40"
64+ @click =" copy(content)"
65+ ><span v-if =" !copied" >复制</span >
66+ <span v-else >已复制</span ></ElButton
67+ >
5268 </div >
5369 </div >
5470 </ElCol >
@@ -124,6 +140,12 @@ const body = ref("");
124140const footer = ref (" " );
125141
126142const content = ref (" " );
143+
144+ const { text, copy, copied, isSupported } = useClipboard ({
145+ source: content ,
146+ });
147+
148+ const handleCreate = () => {};
127149 </script >
128150<style lang="less" scoped>
129151 </style >
You can’t perform that action at this time.
0 commit comments