<template>
	<div @click="onChange" class="orderType">
		{{propValue}}
		<div class="typeText" v-if="parentValue.isMaster===1" key="master1">主</div>
		<div class="typeText typeText2" v-else key="master2">拆</div>
	</div>
</template>

<script lang="ts">
	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
	@Component
	export default class OrderType extends Vue {
		@Prop()
		propValue : any;
		@Prop()
		parentValue : any
		value : any = '';
		@Watch('propConfig')
		propValueChange(v : any) {
			// console.log(v);
		};
		onChange(v : any, i : any) {
			// console.log(v, i);
		}
	}
</script>

<style scoped lang="scss">
	.orderType {
		.typeText {
			width: 40px;
			height: 18px;
			line-height: 18px;
			text-align: center;
			background-color: #0089ff;
			border-radius: 12px;
			color: #fff;
			font-size: 12px;
			margin-left: -10px;
		}

		.typeText2 {
			background-color: #E6A23C;
		}
	}
</style>