style: 调整 vxeTable 弃用的参数名,修改个人信息增加成功提示

This commit is contained in:
写意 2025-04-16 21:52:30 +08:00
parent b5c04181c3
commit 1c0fb8f50a
3 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import App from '/@/App.vue';
import { App } from 'vue';
// VXETable
import VxeUITable from 'vxe-table';
import VXETablePluginElement from 'vxe-table-plugin-element';
@ -12,13 +12,13 @@ import ExcelJS from 'exceljs';
import { useThemeConfig } from '/@/stores/themeConfig';
const vxeSize: VxeComponentSizeType = useThemeConfig().themeConfig.globalComponentSize == 'small' ? 'mini' : useThemeConfig().themeConfig.globalComponentSize == 'default' ? 'small' : 'medium';
export const setupVXETable = (app: App) => {
export const setupVXETable = (app: App<Element>) => {
// 加载插件
VxeUITable.use(VXETablePluginElement);
VxeUITable.use(VXETablePluginExportXLSX, { ExcelJS: ExcelJS });
VxeUITable.setTheme('light'); // 主题颜色
// VXETable全局配置https://vxetable.cn/v4.7/#/table/start/global
VxeUITable.setConfig({
theme: 'light', // 主题颜色
size: vxeSize, // 全局尺寸mini、small、medium/default
i18n: (key, args) => i18n.global.t(key, args),
// i18n: (key, args) => i18n.global.t(key, args),
@ -79,11 +79,11 @@ export const setupVXETable = (app: App) => {
resizeConfig: {
refreshDelay: 300, // 配置项调整后刷新延迟时间
},
scrollX: {
virtualXConfig: {
enabled: true, // 是否默认开启横向虚拟滚动
gt: 30, // 指定大于指定列时自动启动横向虚拟滚动
},
scrollY: {
virtualYConfig: {
scrollToTopOnChange: true, // 当数据源被更改时,自动将纵向滚动条滚动到顶部
enabled: true, // 是否默认开启纵向虚拟滚动
gt: 50, // 当数据大于指定数量时自动触发启用虚拟滚动

View File

@ -356,5 +356,6 @@ export default {
successCopy: '复制成功',
sysMessage: '系统消息',
idleTimeoutMessage: '长时间未操作,已退出系统。',
successSave: '保存成功',
},
};

View File

@ -286,6 +286,7 @@ const submitUserBase = () => {
type: 'warning',
}).then(async () => {
await getAPI(SysUserApi).apiSysUserUpdateBaseInfoPost(state.ruleFormBase);
ElMessage.success(t('message.list.successSave'));
});
});
};