Files
zhxg_app_v1.0/components/dict-status/dict-status.vue

34 lines
573 B
Vue
Raw Permalink Normal View History

2025-07-16 15:34:34 +08:00
<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>