refactor(seller): 商家端系统性优化与 Vue3 迁移遗留问题修复

- 清理:删除 4 个未使用依赖、约 2700 行死代码(shop/ossManage 等)、tree-table 死组件、37 处未使用 import
- ESLint 9 flat config 升级(.eslintrc.js -> eslint.config.js),修复迁移遗留的 34 处真实 bug
- axios 重构:拦截器不再吞错、refreshToken 单例共享 Promise、超时收敛、form 序列化抽公共函数、vue-router 4 失效 API 修正
- 安全:4 处 v-html 增加 xss 过滤;logout 改为精确删除 localStorage 键
- API 重复定义收敛(delSpec/insertOrUpdateSpec、getDictData、ws)
- 首屏瘦身:tinymce 懒加载(约省 7.4MB)、core-js 按需 polyfill、vendor chunk 合并、dplayer/@antv/g2 动态 import、3 张大图压缩
- 页面修复:发布商品表单布局(iview 遗留 margin 移除)、beforeVideoUpload 补定义、el-tag type 空值、lili-dialog emits 声明、消息中心布局塌陷修复与样式重构、department-choose 空值、affix-time 不再发多余店铺请求、goods/distributionGoods 去掉品牌筛选
This commit is contained in:
pikachu1995@126.com
2026-10-08 15:22:56 +08:00
parent 8484936e3d
commit 5fcc26a866
93 changed files with 651 additions and 5241 deletions

View File

@@ -36,7 +36,7 @@
@mouseup.stop
@mousemove.stop
>
<img width="17" height="17" src="../assets/styles/icons8-edit-64.png"></img>
<img width="17" height="17" src="../assets/styles/icons8-edit-64.png" />
</li>
<li class="hz-flex-img">
<img class="hz-u-img" :src="zoneForm.img" />

View File

@@ -219,7 +219,7 @@ export default {
handleAddNav() {
this.navList.list.push({ name: "", url: "", title: "" });
this.$nextTick(() => {
this.selectedNav.title = val.title;
this.selectedNav = this.navList.list[this.navList.list.length - 1];
});
},
handleMoveEnd({ newIndex, oldIndex }) {

View File

@@ -196,7 +196,7 @@ export default {
props: {
data: {
type: Object,
default: {},
default: () => ({}),
},
},
components: {

View File

@@ -131,7 +131,7 @@ export default {
props: {
data: {
type: Object,
default: {},
default: () => ({}),
},
},
data() {

View File

@@ -181,7 +181,7 @@ export default {
props: {
data: {
type: Object,
default: {},
default: () => ({}),
},
},
components: {

View File

@@ -33,7 +33,7 @@ export default {
props: {
data: {
type: Object,
default: {}
default: () => ({})
}
},
mounted() {

View File

@@ -33,7 +33,7 @@ export default {
props: {
data: {
type: Object,
default: {}
default: () => ({})
}
},
components: {},

View File

@@ -70,7 +70,7 @@ export default {
props: {
data: {
type: Object,
default: {}
default: () => ({})
}
},
data () {

View File

@@ -83,7 +83,7 @@ export default {
props: {
data: {
type: Object,
default: {},
default: () => ({}),
},
},
data() {

View File

@@ -238,7 +238,7 @@ export default {
props: {
data: {
type: Object,
default: {},
default: () => ({}),
},
},
components: {

View File

@@ -145,7 +145,6 @@ export default {
new Date().getTime()) /
1000
);
const that = this;
this.interval = setInterval(() => {
this.diffSeconds--;
}, 1000);

View File

@@ -1,250 +0,0 @@
.search {
.oss-operation {
margin-bottom: 2vh;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
button {
margin-right: 5px;
}
}
}
.none {
display: none;
}
.oss-wrapper {
display: flex;
flex-wrap: wrap;
position: relative;
}
.oss-card {
margin: 10px 20px 10px 0;
width: 290px;
:hover {
.content .other .name {
color: #1890ff;
transition: color .3s;
}
}
cursor: pointer;
.el-card__body {
padding: 0;
}
.content {
display: flex;
flex-direction: column;
:hover {
.play {
transition: opacity .3s;
opacity: 1 !important;
}
}
.img {
height: 135px;
object-fit: cover;
}
.video {
height: 135px;
position: relative;
.cover {
height: 100%;
width: 100%;
object-fit: fill;
}
.play {
position: absolute;
top: 43px;
left: 117px;
height: 50px;
width: 50px;
opacity: 0.8;
}
}
.other {
padding: 16px;
height: 135px;
.name {
font-size: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
color: rgba(0, 0, 0, .85);
font-weight: 500;
margin-bottom: 4px;
}
.key {
overflow: hidden;
text-overflow: ellipsis;
height: 45px;
word-break: break-all;
color: rgba(0, 0, 0, .45);
}
.info {
font-size: 12px;
color: rgba(0, 0, 0, .45);
overflow: hidden;
text-overflow: ellipsis;
height: 36px;
word-break: break-all;
}
}
.actions {
display: flex;
align-items: center;
height: 50px;
background: #f7f9fa;
border-top: 1px solid #e8e8e8;
i:hover {
color: #1890ff;
}
.btn {
display: flex;
justify-content: center;
width: 33.33%;
border-right: 1px solid #e8e8e8;
}
.btn-no {
display: flex;
justify-content: center;
width: 33.33%;
}
}
}
}
.oss-manage-box {
.file-list {
height: 100%;
box-sizing: border-box;
border-right: 1px solid #e5e6eb;
padding: 16px 0 24px;
}
.pic-list {
height: 100%;
box-sizing: border-box;
padding: 0 0 24px 0;
}
.img-box {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start;
align-content: flex-start;
margin-top: 20px;
.img-item {
width: 120px;
height: 158px;
box-sizing: border-box;
margin: 0 13px 8px;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
.card {
width: 120px;
height: 120px;
border-radius: 8px;
border: 2px solid transparent;
overflow: hidden;
box-sizing: border-box;
position: relative;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
.card-checkbox {
position: absolute;
top: 8px;
right: 8px;
z-index: 1000;
height: auto;
margin: 0;
.el-checkbox__label {
display: none;
}
}
&.oss-card-selectable {
cursor: pointer;
}
.preview {
width: 100%;
height: 26px;
background-color: #ffffff;
color: #666666;
position: absolute;
left: 0;
bottom: 0;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
> div {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
}
}
.card:hover,
.custom-checkbox-card-checked {
border: 2px solid #ff5c58;
}
.text {
width: 120px;
height: 36px;
cursor: pointer;
color: #252931;
font-size: 14px;
line-height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
}
}
.page-box {
display: flex;
justify-content: flex-end;
margin-top: 20px;
}
.pagination-box {
display: flex;
flex-direction: row-reverse;
}
.demo-tree-render .el-tree-node__content{
width: 94%;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -194,7 +194,6 @@ import {validateMobile} from "@/libs/validate";
import { Search } from "@element-plus/icons-vue";
import departmentChoose from "@/views/my-components/lili/department-choose";
import departmentTreeChoose from "@/views/my-components/lili/department-tree-choose";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default {
name: "clerk-manage",
@@ -202,7 +201,6 @@ export default {
Search,
departmentChoose,
departmentTreeChoose,
uploadPicInput,
},
data() {
return {

View File

@@ -448,7 +448,7 @@ export default {
selectedNodes.forEach((e) => {
let perm = {
title: e.title,
isSuper: e.isSuper ? (e.isSuper = 1) : (e.isSuper = 0) || 0,
isSuper: e.isSuper ? 1 : 0,
menuId: e.id,
roleId: this.editRolePermId,
};

View File

@@ -566,7 +566,7 @@ export default {
},
watch: {
res: {
handler: (val) => {},
handler(val) {},
deep: true,
},
},