|
@@ -114,20 +114,16 @@ export default {
|
114
|
114
|
}
|
115
|
115
|
},
|
116
|
116
|
watch: {
|
117
|
|
- '$route.query.id'(val) {
|
118
|
|
- // immediate: true
|
119
|
|
- this.gameId = val
|
120
|
|
- getGameDetail(val).then((res) => {
|
121
|
|
- this.gameForm = res.data
|
122
|
|
- })
|
123
|
|
- }
|
124
|
|
- },
|
125
|
|
- mounted() {
|
126
|
|
- if (this.$route?.query.id) {
|
127
|
|
- this.gameId = this.$route.query.id
|
128
|
|
- getGameDetail(this.$route.query.id).then((res) => {
|
129
|
|
- this.gameForm = res.data
|
130
|
|
- })
|
|
117
|
+ '$route.query.id': {
|
|
118
|
+ handler(val) {
|
|
119
|
+ if (val) {
|
|
120
|
+ this.gameId = val
|
|
121
|
+ getGameDetail(val).then((res) => {
|
|
122
|
+ this.gameForm = res.data
|
|
123
|
+ })
|
|
124
|
+ }
|
|
125
|
+ },
|
|
126
|
+ immediate: true
|
131
|
127
|
}
|
132
|
128
|
},
|
133
|
129
|
methods: {
|