Use v-if/v-else instead of ternery logic

This commit is contained in:
Adam Goldsmith 2021-10-18 01:01:28 -04:00
parent f33a650d64
commit 8f6989d902

View File

@ -28,11 +28,10 @@
<div v-else-if="isJobEventType(event, 'ret')"> <div v-else-if="isJobEventType(event, 'ret')">
{{ event.data.jid }}: {{ event.data.fun }} {{ event.data.jid }}: {{ event.data.fun }}
{{ event.data.fun_args }} => {{ event.data.retcode }} {{ event.data.fun_args }} => {{ event.data.retcode }}
<pre>{{ <pre v-if="typeof event.data.return === 'string'">{{
typeof event.data.return === 'string' event.data.return
? event.data.return
: JSON.stringify(event.data.return, null, 2)
}}</pre> }}</pre>
<pre v-else>{{ JSON.stringify(event.data.return, null, 2) }}</pre>
</div> </div>
</details> </details>
</details> </details>