<template>
	<view class="uom">
		{{getStdPackUnit(uom)}}
	</view>
</template>


<script>
	import {
		getStdPackUnitInfo
	} from '@/common/directory.js';
	export default {
		data() {
			return {

			};
		},
		// 此处定义传入的数据
		props: {
			uom: {
				type: String,
				default: ''
			},
		},
		methods: {
			getStdPackUnit(uom) {
				let item = getStdPackUnitInfo(uom);
				if (item == '') {
					return uom;
				} else {
					return item.label
				}
			}
		}
	}
</script>


<style>
</style>
