Files
mixtape/zero.Backoffice.UI/app/editor/fields/output.vue
T

25 lines
470 B
Vue
Raw Normal View History

2021-12-09 10:51:10 +01:00
<template>
2022-01-13 23:07:34 +01:00
<span class="ui-property-output" v-localize="{ key: output, html: html }"></span>
2021-12-09 10:51:10 +01:00
</template>
<script>
export default {
props: {
2021-12-19 01:16:02 +01:00
value: Object,
2021-12-21 14:41:50 +01:00
config: Object,
2022-01-13 23:07:34 +01:00
html: {
type: Boolean,
default: false
},
2021-12-09 10:51:10 +01:00
render: Function
},
computed: {
output()
{
2021-12-21 14:41:50 +01:00
return typeof this.render === 'function' ? this.render(this.value, this.config.model) : this.value;
2021-12-09 10:51:10 +01:00
}
}
}
</script>