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.
 
 
 
 

37 lines
621 B

<template>
<view class="std_pack" v-if="dataContent.stdPackQty!=undefined">
<text>
{{Number(dataContent.stdPackQty)}}{{getStdPackUnit(dataContent.uom)}}
</text>
</view>
</template>
<script>
import {
// getStdPackUnitInfo,
getUnitInfo
} from "@/common/directory.js"
export default {
data() {
return {
};
},
// 此处定义传入的数据
props: {
dataContent: {
stdPackQty: 1000,
uom: "EA",
},
},
methods: {
getStdPackUnit(stdPackUnit) {
let std = getUnitInfo(stdPackUnit);
return std == "" ? stdPackUnit : std.label;
}
}
}
</script>
<style>
</style>