34 lines
573 B
Vue
34 lines
573 B
Vue
<template>
|
|
<view>
|
|
<block v-for="(item,index) in status" :key="index">
|
|
<text v-if="values.includes(item.dictValue)">{{item.dictLabel}}</text>
|
|
</block>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "dict-status",
|
|
props: ['status', 'value'],
|
|
computed: {
|
|
values() {
|
|
if (this.value !== null && typeof this.value !== 'undefined') {
|
|
return Array.isArray(this.value) ? this.value : [String(this.value)];
|
|
} else {
|
|
return [];
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
|
|
};
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
text {
|
|
color: red;
|
|
}
|
|
</style> |