提交 36f96f26 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码 [TrainSys,网页端]

上级 4b75a467
......@@ -24,14 +24,14 @@ export const IBizSpan = defineComponent({
() => props.value,
(newVal, oldVal) => {
if (newVal !== oldVal) {
if (!newVal) {
if (newVal == null) {
text.value = '';
return;
}
if (c.valueFormat) {
text.value = dayjs(newVal).format(c.valueFormat);
} else {
text.value = newVal ? `${newVal}` : '';
text.value = `${newVal}`;
}
if (c.unitName) {
text.value += c.unitName;
......@@ -82,6 +82,12 @@ export const IBizSpan = defineComponent({
};
},
render() {
let text = '';
if (this.codeListText != null) {
text = this.codeListText as string;
} else if (this.text != null) {
text = this.text;
}
return (
<span
class={[
......@@ -90,7 +96,7 @@ export const IBizSpan = defineComponent({
this.readonly ? this.ns.m('readonly') : '',
]}
>
{this.codeListText || this.text}
{text}
</span>
);
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册