|
11 | 11 | <meta name="description" content="{{description}}"/> |
12 | 12 | <meta name="keywords" content="{{keywords}}"/> |
13 | 13 | <meta name="generator" content="FileCodeBox"/> |
14 | | - <meta name="template" content="Lan-V1.5.5"/> |
| 14 | + <meta name="template" content="Lan-V1.5.6"/> |
15 | 15 | <style> |
16 | 16 | .qu .el-button { |
17 | 17 | width: 100px; |
|
87 | 87 | </el-col> |
88 | 88 | </el-card> |
89 | 89 | </el-row> |
90 | | - <el-row v-else style="width:400px;height: 596px;margin: 20vh auto 0 auto"> |
| 90 | + <el-row v-else style="width:400px;height: 596px;margin: 6vh auto 0 auto"> |
91 | 91 | <el-col :span="24"> |
92 | 92 | <el-card style="padding-top: 20px"> |
93 | 93 | <el-row> |
|
133 | 133 | placeholder="请输入内容,使用按钮存入" |
134 | 134 | v-model="uploadData.text"> |
135 | 135 | </el-input> |
136 | | - <!--? <div style="height: 240px">--> |
137 | | - <!--? </div>e="height: 240px">--> |
138 | | - <!--? </div>--> |
139 | 136 | <div class="el-upload__tip"> |
140 | 137 | <el-button round @click="pageNum=0"> |
141 | 138 | <div class="el-icon-back"></div> |
|
160 | 157 | size="50%" |
161 | 158 | > |
162 | 159 | <el-card v-for="(file,index) in files" :key="index" class="box-card"> |
163 | | - <div style="cursor: pointer;text-align: left"> |
| 160 | + <div style="cursor: pointer;text-align: left;margin-left: 2rem"> |
164 | 161 | <div>取件码:${ file.code }</div> |
165 | 162 | <div>文件名:${ file.name }</div> |
166 | 163 | <div v-if="file.name==='文本分享'"> |
167 | | - <span>内 容:${ file.text }</span> |
| 164 | + <span @click="copyText(file.text,1)">内 容:${ file.text }</span> |
168 | 165 | </div> |
169 | 166 | <div v-else> |
170 | 167 | <span>链 接:</span> |
|
185 | 182 | <el-empty v-if="files.length===0" description="请上传文件"></el-empty> |
186 | 183 | <el-card style="margin-top: 0.2rem" v-for="(file,index) in files" :key="index"> |
187 | 184 | <el-row> |
188 | | - <el-col :span="20"> |
| 185 | + <el-col :span="15"> |
189 | 186 | <el-row> |
190 | 187 | <el-col :span="24" style="line-height: 45px"> |
191 | 188 | ${ file.name } |
192 | 189 | </el-col> |
193 | 190 | <el-col :span="24"> |
194 | 191 | 取件码: |
195 | | - <h1 @click="copyCode(file.code)" style="margin: 0;display: inline;cursor: pointer"> |
| 192 | + <h1 @click="copyText(file.code,0)" style="margin: 0;display: inline;cursor: pointer"> |
196 | 193 | ${ file.code } |
197 | 194 | </h1> |
198 | 195 | </el-col> |
@@ -299,10 +296,13 @@ <h1 @click="copyCode(file.code)" style="margin: 0;display: inline;cursor: pointe |
299 | 296 | }) |
300 | 297 | }) |
301 | 298 | }, |
302 | | - copyCode: function (value) { |
| 299 | + copyText: function (value, style = 1) { |
| 300 | + if (style === 0) { |
| 301 | + value = '我在分享了给你文件,取件码:${value},${window.location.href}?code=${value}'; |
| 302 | + } |
303 | 303 | const input = document.createElement('input'); |
304 | 304 | input.setAttribute('readonly', 'readonly'); |
305 | | - input.setAttribute('value', `我在${window.location.href}分享了给你文件,取件码:${value}`); |
| 305 | + input.setAttribute('value', value); |
306 | 306 | document.body.appendChild(input); |
307 | 307 | input.select(); |
308 | 308 | if (document.execCommand('copy')) { |
|
0 commit comments