emis-app/components/tpx-text-dic/tpx-text-dic.vue
2024-05-07 13:46:42 +08:00

44 lines
576 B
Vue

<template>
<text>{{title}}</text>
</template>
<script>
export default {
computed: {
title() {
let title = this.value
!this.value && this.list && (title = '-');
if(this.value && this.list) {
title = this.list.filter(t=> t.val == this.value || this.value.indexOf(t.val) > -1).map(t=> t.title).join(",")
}
return title
}
},
props: {
value: {
},
list: {
},
},
data() {
return {
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>