refactor(settings): 调整设置模块中的导航配置项名称

- 将 settings 模块中的 navType 配置项重命名为 topNav
- 更新 settings.js 中对应的配置项名称
- 移除 main.js 中的注释乱码内容
- 调整依赖包版本,包括 axios、follow-redirects、proxy-from-env 等
- 添加 https-proxy-agent、agent-base、debug、ms 等新的依赖包
- 修复项目名称从 his-repo 更改为 his
- 优化 main.js 中的注释国际化处理
This commit is contained in:
2026-06-04 10:59:43 +08:00
parent 110cb4143d
commit fe698b26a2
4 changed files with 99 additions and 68 deletions

View File

@@ -1,10 +1,10 @@
import {createApp, nextTick} from 'vue';
import {createApp, nextTick} from 'vue';
import VxeUIAll from 'vxe-table';
import 'vxe-table/lib/style.css';
import Cookies from 'js-cookie';
// 导入 hiprint 并挂载到全局 window 对象
// 导入 hiprint 并挂载到全局 window 对象
import {hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint';
import ElementPlus, {ElDialog, ElMessage} from 'element-plus';
@@ -16,11 +16,11 @@ import App from './App';
import store from './store';
import router from './router';
import directive from './directive'; // directive
// 注册指令
// 注册指令
import plugins from './plugins'; // plugins
import {download, downloadGet} from '@/utils/request';
// svg图标
// svg图标
import 'virtual:svg-icons-register';
import SvgIcon from '@/components/SvgIcon';
import elementIcons from '@/components/SvgIcon/svgicon';
@@ -31,54 +31,34 @@ import {addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectD
import {formatDateStr} from '@/utils/index';
// 分页组件
// 分页组件
import Pagination from '@/components/Pagination';
// 自定义表格工具组件
// 自定义表格工具组件
import RightToolbar from '@/components/RightToolbar';
// 富文本组件
// 富文本组件
import Editor from '@/components/Editor';
// 文件上传组件
// 文件上传组件
import FileUpload from '@/components/FileUpload';
// 图片上传组件
// 图片上传组件
import ImageUpload from '@/components/ImageUpload';
// 图片预览组件
// 图片预览组件
import ImagePreview from '@/components/ImagePreview';
// 自定义树选择组件
// 自定义树选择组件
import TreeSelect from '@/components/TreeSelect';
// 字典标签组件
// 字典标签组件
import DictTag from '@/components/DictTag';
// 导入请求工具
// 导入请求工具
import {registerComponents} from './template';
window.hiprint = hiprint;
// 初始化 hiprint使用默认元素类型提供器支持 table、text、image 等元素)
// 初始化 hiprintÃÆÃ¯Ã‚Ã¼Ã…ââ¬â„¢ÃƒÆÃ¤Ã‚Ã½Ã‚Ã¿ÃÆÃ§Ã¢â‚¬ÃÃ‚Ã¨ÃÆÃ©Ã‚Ã»Ã‹Å“ÃÆÃ¨Ã‚Ã®Ã‚Ã¤ÃÆÃ¥Ã¢â‚¬Ã¦Ã†ââ¬â„¢ÃƒÆÃ§Ã‚Ã´Ã‚Ã ÃÆÃ§Ã‚Ã±Ã‚Ã»ÃÆÃ¥Ã…Ã¾Ã¢â‚¬Ã¹ÃÆÃ¦Ã‚ÃÃ‚ÃÃÆÃ¤Ã‚Ã¾Ã¢â‚¬ÃºÃÆÃ¥Ã¢ââ¬Å¾Ã¢Ã‚Ã¨ÃÆÃ¯Ã‚Ã¼Ã‹ââ¬Â ÃƒÆÃ¦Ã¢â‚¬ÃÃ‚Ã¯ÃÆÃ¦Ã…ââ¬â„¢Ãƒâ€šÃ table̢̮̣ââ¬Å¡Ã¬Ã‚Átext̢̮̣ââ¬Å¡Ã¬Ã‚Áimage 等元素)
hiprint.init({
providers: [new defaultElementTypeProvider()]
});
// 延迟连接,确保 hiwebSocket 已初始化
setTimeout(() => {
if (hiprint.hiwebSocket) {
// 设置连接地址和 token
hiprint.hiwebSocket.setHost('http://localhost:17521', 'hiprint-test');
console.log('hiprint 连接地址:', hiprint.hiwebSocket.host);
// 等待连接建立
setTimeout(() => {
console.log('hiprint 连接状态:', hiprint.hiwebSocket.connected);
if (hiprint.hiwebSocket.connected) {
console.log('hiprint 客户端连接成功');
} else {
console.warn('hiprint 客户端未连接,请检查客户端是否运行');
}
}, 2000);
} else {
console.warn('hiprint.hiwebSocket 未初始化');
}
}, 500);
// Suppress Element Plus ElForm NaN width warning during vxe-table expand row teardown
@@ -106,7 +86,7 @@ console.error = (...args) => {
const app = createApp(App);
// 全局方法挂载
// 全局方法挂载
app.config.globalProperties.useDict = useDict;
app.config.globalProperties.download = download;
app.config.globalProperties.downloadGet = downloadGet;
@@ -117,7 +97,7 @@ app.config.globalProperties.addDateRange = addDateRange;
app.config.globalProperties.selectDictLabel = selectDictLabel;
app.config.globalProperties.selectDictLabels = selectDictLabels;
app.config.globalProperties.formatDateStr = formatDateStr;
// 全局组件挂载
// 全局组件挂载
app.component('DictTag', DictTag);
app.component('Pagination', Pagination);
app.component('TreeSelect', TreeSelect);
@@ -127,24 +107,23 @@ app.component('ImagePreview', ImagePreview);
app.component('RightToolbar', RightToolbar);
app.component('Editor', Editor);
app.use(registerComponents);
app.use(ElMessage);
app.use(router);
app.use(store);
app.use(plugins);
app.use(elementIcons);
app.component('SvgIcon', SvgIcon);
directive(app);
// 全局禁止点击遮罩层关闭弹窗
// 全局禁止点击遮罩层关闭弹窗
ElDialog.props.closeOnClickModal.default = false;
// 使用element-plus 并且设置全局的大小
app.use(VxeUIAll);
// ÃÆÃ¤Ã‚Ã½Ã‚Ã¿ÃÆÃ§Ã¢â‚¬ÃÃ‚Ã¨element-plus 并且设置全局的大小
app.use(ElementPlus, {
locale: zhCn,
// 支持 large、default、small
// 支持 large̢̮̣ââ¬Å¡Ã¬Ã‚Ádefault̢̮̣ââ¬Å¡Ã¬Ã‚Ásmall
size: Cookies.get('size') || 'default',
});
app.use(VxeUIAll);
// 导入公告帮助工具
// 导入公告帮助工具
import { initNoticePopupAfterLogin } from '@/utils/noticeHelper'
// Global error handler: suppress el-form teardown errors from vxe-table expand rows
@@ -166,7 +145,7 @@ window.addEventListener("error", (e) => {
if (stack.includes("form-label") || stack.includes("LabelWrap") || stack.includes("ElForm") || stack.includes("FormItem") || stack.includes("deregisterLabel")) { e.preventDefault(); return true; }
}, true);
// 应用启动后初始化公告弹窗功能
// 应用启动后初始化公告弹窗功能
nextTick(() => {
initNoticePopupAfterLogin()
})

View File

@@ -19,7 +19,7 @@ export default {
/**
* 菜单导航模式 1、纯左侧 2、混合左侧+顶部) 3、纯顶部
*/
navType: 1,
topNav: 1,
/**
* 是否显示 tagsView

View File

@@ -2,7 +2,7 @@ import defaultSettings from '@/settings'
import {useDynamicTitle} from '@/utils/dynamicTitle'
const {
sideTheme, showSettings, navType, tagsView, tagsViewPersist,
sideTheme, showSettings, topNav, tagsView, tagsViewPersist,
tagsIcon, tagsViewStyle, fixedHeader, sidebarLogo, dynamicTitle,
footerVisible, footerContent
} = defaultSettings
@@ -29,14 +29,14 @@ const useSettingsStore = defineStore(
footerContent: storageSetting.footerContent === undefined ? footerContent : storageSetting.footerContent
}),
actions: {
// 修改布局设置
// ??????
changeSetting(data) {
const { key, value } = data
if (this.hasOwnProperty(key)) {
this[key] = value
}
},
// 设置网页标题
// ??????
setTitle(title) {
this.title = title
useDynamicTitle();