Files
mixtape/zero.Web.UI/App/editor/fields/output.vue
T

20 lines
407 B
Vue
Raw Normal View History

2020-04-30 15:35:09 +02:00
<template>
2020-09-12 18:09:22 +02:00
<span class="ui-property-output" v-localize="output"></span>
2020-04-30 15:35:09 +02:00
</template>
<script>
export default {
2020-09-12 18:09:22 +02:00
props: {
2020-09-12 19:45:34 +02:00
value: [Object, String, Array, Number, Boolean],
2020-10-20 13:27:17 +02:00
entity: Object,
render: Function
2020-09-12 18:09:22 +02:00
},
computed: {
output()
{
2020-10-20 13:27:17 +02:00
return typeof this.render === 'function' ? this.render(this.value, this.entity) : this.value;
2020-09-12 18:09:22 +02:00
}
}
2020-04-30 15:35:09 +02:00
}
</script>