fix: fix the problem that no reaction when copy setting config in http page
This commit is contained in:
parent
106331a1c8
commit
61e0e33c64
|
@ -108,7 +108,7 @@ watch(
|
|||
|
||||
// 拷贝
|
||||
const copyConfig = async () => {
|
||||
const { copy, copied } = useClipboard({
|
||||
const { copy, copied, isSupported } = useClipboard({
|
||||
source: `
|
||||
// 面包屑
|
||||
breadcrumb: ${appStore.getBreadcrumb},
|
||||
|
@ -171,11 +171,15 @@ theme: {
|
|||
}
|
||||
`
|
||||
})
|
||||
if (!isSupported) {
|
||||
ElMessage.error(t('setting.copyFailed'))
|
||||
} else {
|
||||
await copy()
|
||||
if (unref(copied)) {
|
||||
ElMessage.success(t('setting.copySuccess'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 清空缓存
|
||||
const clear = () => {
|
||||
|
|
|
@ -70,6 +70,7 @@ export default {
|
|||
copy: 'Copy',
|
||||
clearAndReset: 'Clear cache and reset',
|
||||
copySuccess: 'Copy success',
|
||||
copyFailed: 'Copy failed',
|
||||
footer: 'Footer'
|
||||
},
|
||||
size: {
|
||||
|
|
|
@ -70,6 +70,7 @@ export default {
|
|||
copy: '拷贝',
|
||||
clearAndReset: '清除缓存并且重置',
|
||||
copySuccess: '拷贝成功',
|
||||
copyFailed: '拷贝失败',
|
||||
footer: '页脚'
|
||||
},
|
||||
size: {
|
||||
|
|
Loading…
Reference in New Issue