File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 14
14
/>
15
15
<div style =" margin : 20px ;" />
16
16
<el-button type =" primary" @click =" get_cipher" >获取密文</el-button >
17
- <div style =" margin : 10px ;" />
18
- <el-text class =" mx-1" style =" margin : 5px ;" >密文:{{ cipher }}</el-text >
17
+ <el-button v-if =" cipher" type =" primary" @click =" copy_cipher" >复制密文</el-button >
18
+ <!-- <div style="margin: 10px;" /> -->
19
+ <!-- <el-text class="mx-1" style="margin: 5px;">密文:{{ cipher }}</el-text> -->
19
20
<div style =" margin : 10px ;" />
20
21
<el-text class =" mx-1" style =" margin : 5px ;" >Share</el-text >
21
22
<el-input
@@ -113,6 +114,15 @@ async function get_cipher() {
113
114
}
114
115
}
115
116
117
+ function copy_cipher() {
118
+ navigator .clipboard .writeText (cipher .value )
119
+ ElNotification ({
120
+ title: ' 复制成功' ,
121
+ position: ' bottom-right' ,
122
+ type: ' success'
123
+ })
124
+ }
125
+
116
126
const handleUpload = (file ) => {
117
127
const reader = new FileReader ()
118
128
reader .onload = (e ) => {
You can’t perform that action at this time.
0 commit comments