|
|
@@ -102,13 +102,15 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
show: false,
|
|
|
- nowChoose: []
|
|
|
+ nowChoose: [],
|
|
|
+ buy: false
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- init() {
|
|
|
+ init(type) {
|
|
|
this.nowChoose = [...this.chooseIds];
|
|
|
this.show = true;
|
|
|
+ this.buy = type === 'buy';
|
|
|
},
|
|
|
choose(id, used = false) {
|
|
|
if (used) {
|
|
|
@@ -128,6 +130,9 @@ export default {
|
|
|
submit() {
|
|
|
this.$emit('update:chooseIds', this.nowChoose);
|
|
|
this.show = false;
|
|
|
+ if (this.buy) {
|
|
|
+ this.$emit('buy');
|
|
|
+ }
|
|
|
},
|
|
|
getChart(index) {
|
|
|
const list = ['A', 'B', 'C', 'D', 'E', 'F'];
|