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.

53 lines
746 B

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