mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 08:55:52 +08:00
Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
This commit is contained in:
@@ -46,11 +46,11 @@ const app = {
|
||||
// 动态添加主界面路由,需要缓存
|
||||
updateAppRouter(state, routes) {
|
||||
state.routers.push(...routes);
|
||||
routes.forEach(route => router.addRoute(route));
|
||||
router.addRoutes(routes);
|
||||
},
|
||||
// 动态添加全局路由404、500等页面,不需要缓存
|
||||
updateDefaultRouter(state, routes) {
|
||||
routes.forEach(route => router.addRoute(route));
|
||||
router.addRoutes(routes);
|
||||
},
|
||||
setLoading(state, v) {
|
||||
state.loading = v;
|
||||
|
||||
@@ -289,8 +289,6 @@
|
||||
<FormItem
|
||||
v-for="(val, index) in item.spec_values"
|
||||
:key="index"
|
||||
:prop="'spec_values.' + index + '.value'"
|
||||
:rules="[regular.REQUIRED, regular.VARCHAR60]"
|
||||
class="sku-item-content-val flex"
|
||||
label="规格项"
|
||||
>
|
||||
@@ -311,7 +309,7 @@
|
||||
size="small"
|
||||
style="margin-left: 10px"
|
||||
type="primary"
|
||||
@click="handleCloseSkuValue(val, index)"
|
||||
@click="handleCloseSkuValue(val, index, item)"
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
@@ -1494,14 +1492,18 @@ export default {
|
||||
this.renderTableData(this.skuTableData);
|
||||
},
|
||||
/** 移除当前规格值 */
|
||||
handleCloseSkuValue(item, index) {
|
||||
handleCloseSkuValue(item, index, spec) {
|
||||
if (spec.spec_values.length <= 1) {
|
||||
this.$Message.error("至少保留一个规格值!");
|
||||
return;
|
||||
}
|
||||
this.skuInfo.forEach((i) => {
|
||||
if (i.name === item.name) {
|
||||
if (i.name === spec.name) {
|
||||
i.spec_values.splice(index, 1);
|
||||
}
|
||||
});
|
||||
this.skuTableData = this.skuTableData.filter(
|
||||
(e) => e[item.name] !== item.value
|
||||
(e) => e[spec.name] !== item.value
|
||||
);
|
||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user