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.
 
 
 
 

40 lines
485 B

<template>
<view class="uom">
{{getUnitInfo(uom)}}
</view>
</template>
<script>
import {
getUnitInfo
} from '@/common/directory.js';
export default {
data() {
return {
};
},
// 此处定义传入的数据
props: {
uom: {
type: String,
default: ''
},
},
methods: {
getUnitInfo(uom) {
let item = getUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
}
}
</script>
<style>
</style>