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

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

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