fix(后台): 适配 Element Plus 2.x 弹层 API,移除订单列表冗余活动类型列

- ElPopover 仅暴露 hide(),旧 Element UI 的 doClose() 在 2.x 不存在,
  分销/会员价设置弹层改为可选链调用 hide(),避免关闭时报错。
- 会员价弹层可见性绑定由 v-model:value 改为 v-model:visible,
  并去掉编辑图标上的冗余点击赋值。
- 订单列表移除「活动类型」列(中台已不再下发 activity_type_text,恒为空)。
This commit is contained in:
吴昊天 2026-10-23 14:09:58 +08:00
parent d90135d2fc
commit 4bec49c6c2
3 changed files with 10 additions and 13 deletions

View File

@ -171,11 +171,6 @@
<span>{{ getProductTypeLabel(scope.row.product_type) }}</span>
</template>
</el-table-column>
<el-table-column label="活动类型" width="120">
<template #default="scope">
<span>{{ scope.row.activity_type_text || '--' }}</span>
</template>
</el-table-column>
<el-table-column label="商品信息" min-width="250">
<template #default="scope">
<div class="tab">

View File

@ -264,8 +264,9 @@ function brokerageTwoRowReplace(item) {
item.brokerage_two = item.brokerage_two.replace(/^-|\D/g, '');
}
function closePop() {
popoverRef_one.value.doClose();
popoverRef_two.value.doClose();
// ElPopover(Element Plus 2.x)只暴露 hide(),没有旧版 Element UI 的 doClose()
popoverRef_one.value?.hide?.();
popoverRef_two.value?.hide?.();
brokerage_two.value = '';
brokerage.value = '';
}

View File

@ -40,7 +40,7 @@
<span>付费会员价</span>
<el-popover
ref="vipSetPopover"
v-model:value="vipSetPopoverPopver"
v-model:visible="vipSetPopoverPopver"
placement="top"
width="290"
trigger="click"
@ -66,9 +66,9 @@
<el-button type="primary" class="ml-14" @click="vipSetConfirm">确认</el-button>
</div>
</div>
<template #reference
><span class="iconfont iconbianji1" @click.stop="vipSetPopoverPopver = true"></span
></template>
<template #reference>
<span class="iconfont iconbianji1"></span>
</template>
</el-popover>
</template>
<template #default="scope">
@ -189,9 +189,10 @@ function submitForm() {
disabled.value = false;
});
}
function closeVipSet(i) {
function closeVipSet() {
// ElPopover(Element Plus 2.x)只暴露 hide(),没有旧版 Element UI 的 doClose()
vipSetPopoverPopver.value = false;
vipSetPopover.value.doClose();
vipSetPopover.value?.hide?.();
vipSetType.value = 0;
vipSetNum.value = '';
}