商品列表,状态展示优化

master
lifenlong 2021-06-23 11:46:38 +08:00
parent d5c96f66ce
commit c326431407
1 changed files with 8 additions and 45 deletions

View File

@ -239,11 +239,11 @@ export default {
width: 130,
render: (h, params) => {
if (params.row.goodsType === 'PHYSICAL_GOODS') {
return h("div", "实物商品");
return h("Tag", {props: {color: "geekblue"}},"实物商品");
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
return h("div", "虚拟商品");
return h("Tag", {props: {color: "purple"}},"虚拟商品");
} else {
return h("div", "电子卡券");
return h("Tag", {props: {color: "cyan"}},"电子卡券");
}
},
},
@ -276,32 +276,11 @@ export default {
width: 120,
render: (h, params) => {
if (params.row.isAuth == "PASS") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "审核通过",
},
}),
]);
return h("Tag", {props: {color: "green"}},"通过");
} else if (params.row.isAuth == "TOBEAUDITED") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "待审核",
},
}),
]);
return h("Tag", {props: {color: "volcano"}},"待审核");
} else if (params.row.isAuth == "REFUSE") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "审核拒绝",
},
}),
]);
return h("Tag", {props: {color: "red"}},"审核拒绝");
}
},
},
@ -312,28 +291,12 @@ export default {
sortable: false,
render: (h, params) => {
if (params.row.marketEnable == "DOWN") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "下架",
},
}),
]);
return h("Tag", {props: {color: "red"}},"下架");
} else if (params.row.marketEnable == "UPPER") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "上架",
},
}),
]);
} else {
return h("Tag", {props: {color: "green"}},"上架");
}
},
},
{
title: "操作",
key: "action",