chore(seller): 清理死代码与失效机制,生产构建剥离 console

- 删除零引用组件 main-components/message-tip.vue
- 清理 113 处 no-unused-vars(重点 goodsOperationSec 20+ 项、ossManage 25 项,含死代码链级联删除;renovation 的 ModelForm 为 vue-eslint-parser 误报,保留并核实)
- stores/app.js 移除只写不读的死字段(currNavTitle/menuTheme/themeColor/isFullScreen/messageCount/currentPageName/currentPath)及失效的 cachePage/dontCache 缓存页机制(无 keep-alive 消费方),同步清理 util.js/App.vue/Main.vue/shrinkable-menu/tags-page-opened 的调用点
- 删除 30 处 console.log 调试残留;生产构建 terser 配置 drop_console 兜底
This commit is contained in:
lifenlong
2026-10-14 20:31:25 +08:00
parent 2a2c3f8174
commit 92dd179525
47 changed files with 20 additions and 1233 deletions

View File

@@ -128,7 +128,6 @@ const loading = ref(true);
const maxHeight = ref("500px");
const strict = ref(true);
const userLoading = ref(false);
const loadingEdit = ref(false);
const modalVisible = ref(false);
const selectList = ref([]);
const selectCount = ref(0);
@@ -136,7 +135,6 @@ const showParent = ref(false);
const modalTitle = ref("");
const editTitle = ref("");
const selectedRole = ref([]);
const searchKey = ref("");
const currentNodeKey = ref(null);
const treeProps = {
label: "title",
@@ -165,7 +163,6 @@ const formValidate = {
};
const submitLoading = ref(false);
const data = ref([]);
const dataEdit = ref([]);
const users = ref([]);
function init() {
@@ -254,18 +251,6 @@ function cancelSelect() {
editTitle.value = "";
selectedRole.value = [];
}
function selectTreeEdit(v) {
if (v.length > 0) {
for (const attr in v[0]) {
if (v[0][attr] == null) {
v[0][attr] = "";
}
}
const data = JSON.parse(JSON.stringify(v[0]));
form.value.parentId = data.id;
form.value.parentTitle = data.title;
}
}
function cancelAdd() {
modalVisible.value = false;
}

View File

@@ -156,7 +156,6 @@ import {
addRole as addRoleReq,
editRole,
deleteRole,
loadDepartment,
selectRoleMenu,
saveRoleMenu,
} from "@/api/index";
@@ -178,15 +177,12 @@ const rolePermsWay = ref([]);
const openLevel = ref("0");
const loading = ref(true);
const treeLoading = ref(true);
const depTreeLoading = ref(true);
const submitPermLoading = ref(false);
const submitDepLoading = ref(false);
const sortColumn = ref("");
const sortType = ref("desc");
const modalType = ref(0);
const roleModalVisible = ref(false);
const permModalVisible = ref(false);
const depModalVisible = ref(false);
const modalTitle = ref("");
const roleForm = ref({
name: "",
@@ -204,10 +200,6 @@ const pageSize = ref(20);
const total = ref(0);
const permData = ref([]);
const editRolePermId = ref("");
const selectAllFlag = ref(false);
const depData = ref([]);
const dataType = ref(0);
const editDepartments = ref([]);
const saveRoleWay = ref([]);
const permTreeKey = ref(0);
const permCheckedKeys = ref([]);
@@ -474,24 +466,6 @@ function saveRole() {
}
});
}
function loadData(item, callback) {
loadDepartment(item.id, { openDataFilter: false }).then((res) => {
if (res.success) {
res.result.forEach(function (e) {
e.checked = false;
if (e.isParent) {
e.loading = false;
e.children = [];
}
if (e.status == -1) {
e.title = "[已禁用] " + e.title;
e.disabled = true;
}
});
callback(res.result);
}
});
}
function computeExpandedKeys(level) {
const keys = [];
const walk = (nodes, depth) => {