ResultSelect.vue 1.04 KB
<template>
  <MessageBox ref="popup" title="接待结果" :popupW="704" :isFooter="false" :maskBackgroundColor="maskBackgroundColor">
    <ResultList :list="list" :value="value" @change="handleChange" />
  </MessageBox>
</template>

<script>
import ResultList from './ResultList.vue'
export default {
  name: "ResultSelect",
  components: {
    ResultList
  },
  props: {
    list: {
      type: Array,
      default: () => [
        {
          icon: 'success',
          text: '结果完美,成交了',
          status: "成交"
        },
        {
          icon: 'error',
          text: '仍需努力,战败了',
          status: "战败"
        }
      ]
    },
    value: {
      type: [String, Number],
      default: -1
    },
    maskBackgroundColor: {
      type: String,
      default: 'rgba(0, 0, 0, 0.4)'
    }
  },
  methods: {
    open() {
      this.$refs.popup.open()
    },
    close() {
      this.$refs.popup.close()
    },
    handleChange(val) {
      this.$emit('input', val);
      this.$emit('change', val);
    }
  }
}
</script>