commit
738deab843
|
@ -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 = () => {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { ElSwitch } from 'element-plus'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { useAppStore } from '@/store/modules/app'
|
import { useAppStore } from '@/store/modules/app'
|
||||||
import { computed, ref, watch } from 'vue'
|
import { computed, ref, watch } from 'vue'
|
||||||
|
import { setCssVar } from '@/utils'
|
||||||
import { useDesign } from '@/hooks/web/useDesign'
|
import { useDesign } from '@/hooks/web/useDesign'
|
||||||
|
|
||||||
const { getPrefixCls } = useDesign()
|
const { getPrefixCls } = useDesign()
|
||||||
|
@ -59,6 +60,8 @@ const localeChange = (show: boolean) => {
|
||||||
const tagsView = ref(appStore.getTagsView)
|
const tagsView = ref(appStore.getTagsView)
|
||||||
|
|
||||||
const tagsViewChange = (show: boolean) => {
|
const tagsViewChange = (show: boolean) => {
|
||||||
|
// 切换标签栏显示时,同步切换标签栏的高度
|
||||||
|
setCssVar('--tags-view-height', show ? '35px' : '0px')
|
||||||
appStore.setTagsView(show)
|
appStore.setTagsView(show)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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