44 lines
576 B
Vue
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> |