<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>
