-
+
@@ -8,6 +8,13 @@
+
+ 配置已修改,尚未保存,是否离开?
+
+
@@ -20,6 +27,9 @@ export default {
return {
changed: false,
active: 'normal',
+ modalVisible: false,
+ activeName: '',
+ oldActiveName: '',
}
},
components: {
@@ -28,26 +38,26 @@ export default {
methods: {
handleLeave(activeName, oldActiveName) {
if (this.changed) {
- this.$confirm('配置项已修改未保存,是否离开', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {})
- .catch(() => {
- return false
- })
+ this.modalVisible = true
+ this.activeName = activeName
+ this.oldActiveName = oldActiveName
+ return false
}
},
handleChange(val) {
this.changed = val
},
openModal() {
- this.modaleVisible = true
+ this.modalVisible = true
},
closeModal() {
- this.modaleVisible = false
+ this.modalVisible = false
},
+ switchTab() {
+ this.changed = false
+ this.active = this.activeName
+ this.modalVisible = false
+ }
}
}
diff --git a/src/views/games/platforms.vue b/src/views/games/platforms.vue
new file mode 100644
index 0000000..fd6e0d1
--- /dev/null
+++ b/src/views/games/platforms.vue
@@ -0,0 +1,183 @@
+