pms-aomei/src/components/noTemplateComponents/textOnlyComponent.js

24 lines
574 B
JavaScript
Raw Normal View History

2023-03-28 16:19:25 +08:00
export default {
props: {
modelValue: {
type: String | Number,
required: true,
},
useBuiltin: {
type: Boolean,
default: true,
},
},
data() {
return {
orderStatusMap: ["等待", "确认", "生产", "暂停", "结束", "接受", "拒绝"],
};
},
render: function (h) {
return h(
"span",
{ style: { display: "block", marginTop: "0" } },
this.useBuiltin ? this.orderStatusMap[this.modelValue] ?? "-" : this.modelValue.toString().trim() === "" ? "-" : this.modelValue.toString()
);
},
};