|
@@ -320,20 +320,26 @@ import {
|
|
} from '@/api/projectIndex'
|
|
} from '@/api/projectIndex'
|
|
import '@/views/projectManage/publicCss/index.css'
|
|
import '@/views/projectManage/publicCss/index.css'
|
|
export default {
|
|
export default {
|
|
- beforeRouteLeave(to, from, next) {
|
|
|
|
- // 这里需要elementui的支持,如果使用其他界面组件自行替换即可
|
|
|
|
- this.$confirm('正在离开本页面,本页面内所有未保存数据都会丢失', '警告', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- }).then(() => {
|
|
|
|
- // 正常跳转
|
|
|
|
- next()
|
|
|
|
- }).catch(() => {
|
|
|
|
- // 如果取消跳转地址栏会变化,这时保持地址栏不变
|
|
|
|
- window.history.go(1)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ // beforeRouteLeave(to, from, next) {
|
|
|
|
+ // // this.$nextTick(() => {
|
|
|
|
+ // // // 这里需要elementui的支持,如果使用其他界面组件自行替换即可
|
|
|
|
+ // // this.$confirm('正在离开本页面,本页面内所有未保存数据都会丢失', '警告', {
|
|
|
|
+ // // distinguishCancelAndClose: true,
|
|
|
|
+ // // confirmButtonText: '确定',
|
|
|
|
+ // // cancelButtonText: '取消',
|
|
|
|
+ // // type: 'warning'
|
|
|
|
+ // // }).then(() => {
|
|
|
|
+ // // // 正常跳转
|
|
|
|
+ // // next(true)
|
|
|
|
+ // // }).catch(() => {
|
|
|
|
+ // // // 如果取消跳转地址栏会变化,这时保持地址栏不变
|
|
|
|
+ // // window.history.go(1)
|
|
|
|
+ // // })
|
|
|
|
+ // // })
|
|
|
|
+ // // next(false)
|
|
|
|
+
|
|
|
|
+ // this.$store.state.data.status = false
|
|
|
|
+ // },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
curIndex: 1,
|
|
curIndex: 1,
|
|
@@ -396,7 +402,6 @@ export default {
|
|
},
|
|
},
|
|
destroyed() {
|
|
destroyed() {
|
|
this.$store.state.data.status = false
|
|
this.$store.state.data.status = false
|
|
- this.beforeRouteLeave()
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
test2(item, e) {
|
|
test2(item, e) {
|