ResultSelect.vue
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<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>