forked from github/dataease
fix(公共连接): 移动端无法返回上一级
This commit is contained in:
parent
4a2f127b86
commit
90f52b54da
@ -14,6 +14,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
v-if="!isNewBlank"
|
v-if="!isNewBlank"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
type="button"
|
||||||
@click="back2Last"
|
@click="back2Last"
|
||||||
><span><svg-icon
|
><span><svg-icon
|
||||||
style="width: 12px;height: 12px"
|
style="width: 12px;height: 12px"
|
||||||
@ -53,6 +54,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
import { isMobile } from '@/utils'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -103,7 +105,16 @@ export default {
|
|||||||
bus.$emit('clear_panel_linkage', { viewId: 'all' })
|
bus.$emit('clear_panel_linkage', { viewId: 'all' })
|
||||||
},
|
},
|
||||||
back2Last() {
|
back2Last() {
|
||||||
|
if (isMobile()) {
|
||||||
|
let parentUrl = window.location.href
|
||||||
|
parentUrl = localStorage.getItem('beforeJumpUrl')
|
||||||
|
localStorage.removeItem('beforeJumpUrl')
|
||||||
|
window.location.href = parentUrl
|
||||||
|
window.location.reload()
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
this.$router.back(-1)
|
this.$router.back(-1)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
exportPDF() {
|
exportPDF() {
|
||||||
this.$refs['widget-div'].style.display = ''
|
this.$refs['widget-div'].style.display = ''
|
||||||
|
@ -974,6 +974,8 @@ export default {
|
|||||||
// 判断是否有公共链接ID
|
// 判断是否有公共链接ID
|
||||||
if (jumpInfo.publicJumpId) {
|
if (jumpInfo.publicJumpId) {
|
||||||
const url = '/link/' + jumpInfo.publicJumpId
|
const url = '/link/' + jumpInfo.publicJumpId
|
||||||
|
const currentUrl = window.location.href
|
||||||
|
localStorage.setItem('beforeJumpUrl', currentUrl)
|
||||||
this.windowsJump(url, jumpInfo.jumpType)
|
this.windowsJump(url, jumpInfo.jumpType)
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
Loading…
Reference in New Issue
Block a user