mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2026-02-08 02:34:27 +08:00
v3.14.0 更新;【新增】EasyExcel重磅升级为FastExcel;【新增】使用最强Argon2算法作为密码存储;【新增】大家吐槽的数据字典改为可重复;【新增】前端布局再增加多种样式;【优化】升级SaToken到最新版本;【优化】token使用Sa-Token的Bearer类型;【优化】优化其他
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<a-drawer :title="$t('setting.title')" placement="right" :width="410" :open="visible" @close="close">
|
||||
<a-drawer :title="$t('setting.title')" placement="right" :width="450" :open="visible" @close="close">
|
||||
<a-form layout="horizontal" :label-col="{ span: 8 }">
|
||||
<a-form-item label="语言/Language">
|
||||
<a-select v-model:value="formState.language" @change="changeLanguage" style="width: 120px">
|
||||
@@ -47,6 +47,10 @@
|
||||
<a-input-number @change="changeSideMenuWidth" v-model:value="formState.sideMenuWidth" :min="1" />
|
||||
像素(px)
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.table.yHeight')">
|
||||
<a-input-number @change="changeTableYHeight" v-model:value="formState.tableYHeight" :min="100" />
|
||||
像素(px)
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.page.width')" v-if="formState.layout === LAYOUT_ENUM.TOP.value">
|
||||
<a-input @change="changePageWidth" v-model:value="formState.pageWidth" />
|
||||
像素(px)或者 百分比
|
||||
@@ -70,6 +74,12 @@
|
||||
<a-radio-button value="light">Light</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.pagetag.location')">
|
||||
<a-radio-group v-model:value="formState.pageTagLocation" button-style="solid" @change="changePageTagLocation">
|
||||
<a-radio-button value="top">顶部</a-radio-button>
|
||||
<a-radio-button value="center">中部</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.pagetag.style')">
|
||||
<a-radio-group v-model:value="formState.pageTagStyle" button-style="solid" @change="changePageTagStyle">
|
||||
<a-radio-button value="default">默认</a-radio-button>
|
||||
@@ -81,7 +91,13 @@
|
||||
<a-switch @change="changePageTagFlag" v-model:checked="formState.pageTagFlag" checked-children="显示" un-checked-children="隐藏" />
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.bread')">
|
||||
<a-switch @change="changeBreadCrumbFlag" v-model:checked="formState.breadCrumbFlag" checked-children="显示" un-checked-children="隐藏" />
|
||||
<a-switch
|
||||
@change="changeBreadCrumbFlag"
|
||||
:disabled="formState.pageTagLocation === 'top'"
|
||||
v-model:checked="formState.breadCrumbFlag"
|
||||
checked-children="显示"
|
||||
un-checked-children="隐藏"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('setting.footer')">
|
||||
<a-switch @change="changeFooterFlag" v-model:checked="formState.footerFlag" checked-children="显示" un-checked-children="隐藏" />
|
||||
@@ -111,7 +127,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, h } from 'vue';
|
||||
import { ref, reactive, h, watch } from 'vue';
|
||||
import { i18nList } from '/@/i18n/index';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import localStorageKeyConst from '/@/constants/local-storage-key-const';
|
||||
@@ -186,6 +202,8 @@
|
||||
colorIndex: appConfigStore.colorIndex,
|
||||
// 侧边菜单宽度
|
||||
sideMenuWidth: appConfigStore.sideMenuWidth,
|
||||
// 表格高度
|
||||
tableYHeight: appConfigStore.tableYHeight,
|
||||
// 菜单主题
|
||||
sideMenuTheme: appConfigStore.sideMenuTheme,
|
||||
// 页面紧凑
|
||||
@@ -206,10 +224,26 @@
|
||||
helpDocExpandFlag: appConfigStore.helpDocExpandFlag,
|
||||
// 水印
|
||||
watermarkFlag: appConfigStore.watermarkFlag,
|
||||
//标签页位置
|
||||
pageTagLocation: appConfigStore.pageTagLocation,
|
||||
};
|
||||
|
||||
let formState = reactive({ ...formValue });
|
||||
|
||||
watch(
|
||||
() => formState.pageTagLocation,
|
||||
() => {
|
||||
if (formState.pageTagLocation === 'top') {
|
||||
formState.breadCrumbFlag = false;
|
||||
} else {
|
||||
formState.breadCrumbFlag = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
|
||||
const { locale } = useI18n();
|
||||
function changeLanguage(languageValue) {
|
||||
locale.value = languageValue;
|
||||
@@ -218,6 +252,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
function changePageTagLocation(e) {
|
||||
appConfigStore.$patch({
|
||||
pageTagLocation: e.target.value,
|
||||
});
|
||||
}
|
||||
|
||||
function changeLayout(e) {
|
||||
appConfigStore.$patch({
|
||||
layout: e.target.value,
|
||||
@@ -236,6 +276,12 @@
|
||||
sideMenuWidth: value,
|
||||
});
|
||||
}
|
||||
function changeTableYHeight(value) {
|
||||
appConfigStore.$patch({
|
||||
tableYHeight: value,
|
||||
});
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
function changePageWidth(e) {
|
||||
appConfigStore.$patch({
|
||||
|
||||
Reference in New Issue
Block a user