11<template >
2- <el-drawer v-model =" drawer" :title =" t('system.systemConfig')" direction =" rtl" :size =" width" >
2+ <el-drawer v-model =" drawer" :title =" t('system.systemConfig')" direction =" rtl" :size =" width" :show-close =" false" >
3+ <template #header >
4+ <div class =" flex justify-between items-center" >
5+ <span class =" text-lg" >{{t('system.systemConfig')}}</span >
6+ <el-button type =" primary" @click =" saveConfig" >{{ t('layout.setting.copyConfig') }}</el-button >
7+ </div >
8+ </template >
39 <div class =" flex flex-col" >
410 <div class =" mb-8" >
511 <div class =" text-gray-800 dark:text-gray-100" >{{ t('layout.setting.defaultTheme') }}</div >
112118 </div >
113119 </div >
114120
115-
116- <el-button type =" primary" class =" mt-4" @click =" copyConfig"
117- >{{ t('layout.setting.copyConfig') }}</el-button
118- >
119121 </div >
120122 </el-drawer >
121123</template >
@@ -127,11 +129,10 @@ import { ref, computed } from "vue";
127129import { ElMessage } from " element-plus" ;
128130import {setSelfSetting } from " @/api/user" ;
129131import { useI18n } from ' vue-i18n' ; // added by mohamed hassan to support multilanguage
130-
132+ const { t } = useI18n () // added by mohamed hassan to support multilanguage
131133const appStore = useAppStore ();
132134const { config , device } = storeToRefs (appStore);
133135
134- const { t } = useI18n () // added by mohamed hassan to support multilanguage
135136defineOptions ({
136137 name: " GvaSetting" ,
137138});
@@ -180,7 +181,6 @@ const saveConfig = async () => {
180181 document.execCommand("copy");
181182 document.body.removeChild(input);
182183 ElMessage.success(t('layout.setting.copyConfigSuccess'));
183- ElMessage.success("复制成功, 请自行保存到本地文件中");*/
184184 const res = await setSelfSetting(config.value)
185185 if(res.code === 0){
186186 localStorage.setItem('originSetting', JSON.stringify(config.value))
0 commit comments