<template>
  <span>{{ getFromText }}</span>
</template>

<script lang="ts">
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
@Component
export default class OrderFrom extends Vue {
  txt:string='';
  sourceFrom:any={
    'ERP':'手工下单',
    'COPY':'复制',
    'MERGE':'合并',
    'SPLIT':'拆分；拆分还原',
    'MOBILE':'导入',
    'drp-s':'供销推送',
    'drp-d':'分销推送',
    'KWAISHOP':'快手；微商城',
    'PINDUODUO':'拼多多',
    'TOUTIAOFXG':'头条放心购',
    'JUSHUITAN':'聚水潭'
  }

  @Prop()
  propValue?:any

  get getFromText(){
    let t='';
    if(this.propValue){
      let arr:Array<any>=this.propValue.split(',');
      for(const item of arr){
        if(this.sourceFrom[item]){
          if(t){
            t = t + ' , ' + this.sourceFrom[item]
          }else{
            t = this.sourceFrom[item]
          }
        }
      }
    }
    return t;
  }
}
</script>

<style lang="scss" scoped>

</style>