Commit cf256ef1 authored by salitedfish's avatar salitedfish

bug修复

parent 60787343
......@@ -108,7 +108,7 @@
{{ name }}
</div>
<div ref="btn" @click="handleClickCopy(name)" class="ml-1">
<div ref="btn" @click="handleClickCopy(name)" class="copyBtn ml-1" >
<app-icon name="icon-fuzhi" size="18px"></app-icon>
</div>
</div>
......@@ -149,7 +149,7 @@
<script lang="ts">
import Vue from "vue";
// import Clipboard from "clipboard";
import ClipboardJS from "clipboard";
import { ActionSheet } from "vant";
export default Vue.extend({
......@@ -225,23 +225,26 @@ export default Vue.extend({
}
this.$emit("cellOnChange", this.inputValue);
},
handleClickCopy(text: string | number) {
this.$util.cliboard(text);
this.$toast("复制成功");
// const btn = this.$refs.btn as HTMLElement;
// const clipboard = new Clipboard(btn);
// clipboard.on("success", function (e) {
// console.info("Action:", e.action);
// console.info("Text:", e.text);
// console.info("Trigger:", e.trigger);
// e.clearSelection();
// });
// clipboard.on("error", function (e) {
// console.error("Action:", e.action);
// console.error("Trigger:", e.trigger);
// });
async handleClickCopy(text: string | number) {
// this.$util.cliboard(text);
// this.$toast("复制成功");
// const clipboardObj = navigator.clipboard
// await clipboardObj.writeText(text.toString())
let clipboard = new ClipboardJS('.copyBtn', {
text: function() {
return text.toString();
}
});
clipboard.on("success", (e)=>{
this.$toast("复制成功~");
e.clearSelection();
});
clipboard.on("error", ()=>{
this.$toast("复制失败~");
});
},
onCancel() {},
onSelect(value: any) {
......
......@@ -5,5 +5,7 @@ export default function (text: string | number) {
ele.setAttribute('data-clipboard-text', text.toString())
document.body.appendChild(ele)
const clipboard = new ClipboardJS(ele)
// clipboard.write(text.toString())
// return new ClipboardJS(ele)
// document.body.removeChild(ele)
}
<template>
<div class="register pt-5">
<div class="closeBtnBox">
<img src="@/assets/img/closeBtn.png" class="closeBtn" @click="closeLogin"/>
</div>
<div class="flex justify-between items-center text-base">
<img src="@/assets/img/cmp_logo.png" class="h-12" alt="" />
<div class=" text-font-white header-text">注册/登录</div>
......@@ -324,6 +327,9 @@ export default Vue.extend({
sendVoice() {
return this.sendVoiceFunc(this.phone);
},
closeLogin(){
this.$router.push('/Mine')
}
},
computed: {
codeValid(): boolean {
......@@ -384,4 +390,16 @@ export default Vue.extend({
font-weight: 500;
color: #EEF1F6;
}
.closeBtnBox {
color: white;
height: 50px;
line-height: 50px;
display: flex;
align-items: center;
}
.closeBtn {
width: 40px;
text-align:center;
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -69,6 +69,7 @@ export default Vue.extend({
},
methods:{
async submitUserInfo(){
if(this.btnDisabled) return
let data = {} as any
const value = this.inputSet.value;
data[this.$route.params.type] = value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment