You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

52 lines
746 B

<template>
<view class="center" style="margin: 5rpx;">
<view :class="statusStyle(status)">
<text v-if="showDesc" >
{{statusDesc(status)}}
</text>
</view>
</view>
</template>
<script>
import {
getInventoryStatusStyle,
getInventoryStatusName
} from '@/common/directory.js';
export default {
data() {
return {
};
},
// 此处定义传入的数据
props: {
status: {
type: String,
default: "1"
},
showDesc: {
type: Boolean,
default: false
},
},
methods: {
statusStyle: function(val) {
return getInventoryStatusStyle(val);
},
statusDesc(value) {
return getInventoryStatusName(value)
}
}
}
</script>
<style lang="scss">
</style>
<style>
</style>