添加复制时提示
This commit is contained in:
1 parent
cf4297cc3c
commit
1780a0bb8b
2 files changed
+14
-2
No files matched your search
+6
-1
@@ -3,7 +3,7 @@
|
||||
<n-flex style="padding-top: 10px;">
|
||||
<n-input v-model:value="groupCode" type="text" placeholder="输入邀请码" style="flex:1">
|
||||
<template #suffix>
|
||||
<n-icon :component="CopyOutline" style="cursor: pointer;" @click='toClipboard(groupCode)' />
|
||||
<n-icon :component="CopyOutline" style="cursor: pointer;" @click='_toClipboard(groupCode)' />
|
||||
</template>
|
||||
</n-input>
|
||||
<n-flex>
|
||||
@@ -98,6 +98,11 @@ const message = useMessage()
|
||||
// const modal = useModal();
|
||||
const { toClipboard } = useClipboard();
|
||||
|
||||
const _toClipboard = async (text) => {
|
||||
await toClipboard(text)
|
||||
message.info(`已复制 ${text.length < 10 ? text : text.substring(0,7) + '...'}`)
|
||||
}
|
||||
|
||||
const setting = useSettingStore();
|
||||
const serverPort = setting.serverPort;
|
||||
const wsBaseUrl = 'ws' + "://" + location.hostname + ":" + serverPort;
|
||||
|
||||
Reference in new issue
Block a user