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 copyConfig = async () => {
|
||||||
const { copy, copied } = useClipboard({
|
const { copy, copied, isSupported } = useClipboard({
|
||||||
source: `
|
source: `
|
||||||
// 面包屑
|
// 面包屑
|
||||||
breadcrumb: ${appStore.getBreadcrumb},
|
breadcrumb: ${appStore.getBreadcrumb},
|
||||||
|
@ -171,11 +171,15 @@ theme: {
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
if (!isSupported) {
|
||||||
|
ElMessage.error(t('setting.copyFailed'))
|
||||||
|
} else {
|
||||||
await copy()
|
await copy()
|
||||||
if (unref(copied)) {
|
if (unref(copied)) {
|
||||||
ElMessage.success(t('setting.copySuccess'))
|
ElMessage.success(t('setting.copySuccess'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 清空缓存
|
// 清空缓存
|
||||||
const clear = () => {
|
const clear = () => {
|
||||||
|
|
|
@ -70,6 +70,7 @@ export default {
|
||||||
copy: 'Copy',
|
copy: 'Copy',
|
||||||
clearAndReset: 'Clear cache and reset',
|
clearAndReset: 'Clear cache and reset',
|
||||||
copySuccess: 'Copy success',
|
copySuccess: 'Copy success',
|
||||||
|
copyFailed: 'Copy failed',
|
||||||
footer: 'Footer'
|
footer: 'Footer'
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
|
|
|
@ -70,6 +70,7 @@ export default {
|
||||||
copy: '拷贝',
|
copy: '拷贝',
|
||||||
clearAndReset: '清除缓存并且重置',
|
clearAndReset: '清除缓存并且重置',
|
||||||
copySuccess: '拷贝成功',
|
copySuccess: '拷贝成功',
|
||||||
|
copyFailed: '拷贝失败',
|
||||||
footer: '页脚'
|
footer: '页脚'
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
|
|
Loading…
Reference in New Issue