|
@@ -0,0 +1,51 @@
|
|
|
+<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 {
|
|
|
+ position: relative;
|
|
|
+ color: #0089ff;
|
|
|
+ cursor: pointer;
|
|
|
+ .typeText {
|
|
|
+ position: absolute;
|
|
|
+ top: 8px;
|
|
|
+ right: -6px;
|
|
|
+ width: 40px;
|
|
|
+ height: 18px;
|
|
|
+ line-height: 18px;
|
|
|
+ text-align: center;
|
|
|
+ background-color: #0089ff;
|
|
|
+ border-radius: 12px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .typeText2 {
|
|
|
+ background-color: #E6A23C;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|