How to optimize the if-else Code of vue

< span VMI if = "item.abc > 0" > {{item.abc}}
< span v-else >-
can this code be simplified?

Jun.13,2022

<span>{{item.abc>0?item.abc:'-'}}</span>

consider putting the judgment logic in computed , and html just output the content directly

.
Menu