商品列表,状态展示优化

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