@@ -21,6 +21,7 @@ import {
function startApp () {
document.body.setAttribute('version', __VERSION__)
+ window.name = `msr${Date.now()}`
Vue.use(Element)
Vue.prototype.$keycloak = keycloak
@@ -791,6 +791,15 @@ export default {
this.$nextTick(() => {
this._save().finally(() => {
this.loading = false
+ if (window.opener) {
+ this.$confirm(
+ '返回节目列表?',
+ '保存成功'
+ ).then(() => {
+ window.open('javascript:;', window.opener.name)
+ window.close()
+ })
+ }
})
@@ -87,9 +87,6 @@ export default {
this.checkRatio()
window.addEventListener('resize', this.checkRatio)
},
- beforeDestroy () {
- window.removeEventListener('resize', this.checkRatio)
- },
methods: {
toggleMute () {
this.muted = !this.muted
@@ -38,7 +38,6 @@ export default {
}
beforeRouteLeave (to, from, next) {
- window.close()
next(false)