移动端V1.0
This commit is contained in:
34
components/dict-status/dict-status.vue
Normal file
34
components/dict-status/dict-status.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<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>
|
Reference in New Issue
Block a user