Skip to content

Commit 737d23f

Browse files
committed
Merge branch 'main' into i18n-dev-275
# Conflicts: # web/src/view/layout/setting/index.vue
2 parents 3965f46 + 6e38eb1 commit 737d23f

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

web/src/core/global.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ const registerIcons = async(app) => {
3131
continue
3232
}
3333
const key = `${pluginName}${iconName}`
34-
const iconComponent = createIconComponent(iconName)
34+
// 开发模式下列出所有 svg 图标,方便开发者直接查找复制使用
35+
import.meta.env.MODE == 'development' && console.log(`svg-icon-component: <${key} />`)
36+
const iconComponent = createIconComponent(key)
3537
config.logs.push({
3638
'key': key,
37-
'label': iconName,
39+
'label': key,
3840
})
3941
app.component(key, iconComponent)
4042
}

web/src/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './style/element_visiable.scss'
2+
import 'element-plus/theme-chalk/dark/css-vars.css'
23
import { createApp } from 'vue'
34
import ElementPlus from 'element-plus'
45

web/src/view/layout/setting/index.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
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>
@@ -112,10 +118,6 @@
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";
127129
import { ElMessage } from "element-plus";
128130
import {setSelfSetting} from "@/api/user";
129131
import { useI18n } from 'vue-i18n'; // added by mohamed hassan to support multilanguage
130-
132+
const { t } = useI18n() // added by mohamed hassan to support multilanguage
131133
const appStore = useAppStore();
132134
const { config, device } = storeToRefs(appStore);
133135
134-
const { t } = useI18n() // added by mohamed hassan to support multilanguage
135136
defineOptions({
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))

web/vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export default ({
9494
}),
9595
vuePlugin(),
9696
svgBuilder('./src/assets/icons/'),
97+
svgBuilder('./src/plugin/'),
9798
[Banner(`\n Build based on gin-vue-admin \n Time : ${timestamp}`)],
9899
VueFilePathPlugin("./src/pathInfo.json")
99100
],

0 commit comments

Comments
 (0)