feat: 新增复制成功提示信息

This commit is contained in:
hzj 2025-10-20 10:34:40 +08:00
parent 379d6a5ba0
commit e5faf35bfd
2 changed files with 44 additions and 1 deletions

View File

@ -526,6 +526,18 @@
</div> </div>
</div> </div>
</maskLayer> </maskLayer>
<!-- 提示弹窗 -->
<div
v-show="tipShow"
style="position: fixed; top: 50vh; display: flex; justify-content: center; width: 100vw"
>
<div
style="padding: 12px; border-radius: 8px; background: rgba(0, 0, 0, 0.4); font-weight: 600"
>
Copied successfully
</div>
</div>
</div> </div>
</template> </template>
@ -550,7 +562,7 @@ import maskLayer from '../../components/MaskLayer.vue'
import { useDebounce, useThrottle } from '@/utils/useDebounce' import { useDebounce, useThrottle } from '@/utils/useDebounce'
import { getMemberProfile } from '@/api/wallet' import { getMemberProfile } from '@/api/wallet'
import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js' import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js'
import { useClipboard } from '@vueuse/core' import { set, useClipboard } from '@vueuse/core'
// vite // vite
const imageModules = import.meta.glob('@/assets/images/InvitationNewUser/*.{png,jpg,svg}', { const imageModules = import.meta.glob('@/assets/images/InvitationNewUser/*.{png,jpg,svg}', {
@ -572,6 +584,7 @@ const headerInfo = ref({})
const helpInfoShow = ref(false) // const helpInfoShow = ref(false) //
const enterCodeShow = ref(false) // const enterCodeShow = ref(false) //
const tipShow = ref(false) //
const invitationCode = ref('') // const invitationCode = ref('') //
@ -605,6 +618,11 @@ const copyCode = (text) => {
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(textArea) document.body.removeChild(textArea)
} }
tipShow.value = true
setTimeout(() => {
tipShow.value = false
}, 2000)
} }
/** /**

View File

@ -230,6 +230,25 @@
</div> </div>
</div> </div>
</maskLayer> </maskLayer>
<!-- 提示弹窗 -->
<div
v-show="tipShow"
style="
position: fixed;
top: 50vh;
display: flex;
justify-content: center;
width: 100vw;
z-index: 1000;
"
>
<div
style="padding: 12px; border-radius: 8px; background: rgba(0, 0, 0, 0.4); font-weight: 600"
>
Copied successfully
</div>
</div>
</div> </div>
</template> </template>
@ -255,6 +274,7 @@ const isInAppEnvironment = ref(false) // 检测是否在APP环境中
const maskLayerShow = ref(false) // const maskLayerShow = ref(false) //
const followingStatus = ref(false) // const followingStatus = ref(false) //
const tipShow = ref(false) //
const defaultAvatarUrl = (e) => { const defaultAvatarUrl = (e) => {
console.log('头像资源出错') console.log('头像资源出错')
@ -279,6 +299,11 @@ const copyPhone = (text) => {
document.execCommand('copy') document.execCommand('copy')
document.body.removeChild(textArea) document.body.removeChild(textArea)
} }
tipShow.value = true
setTimeout(() => {
tipShow.value = false
}, 2000)
} }
onMounted(() => { onMounted(() => {