iframe高度优化
This commit is contained in:
@@ -5,12 +5,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||||
import PageLayout from '../page/PageLayout'
|
import {mixinDevice} from '@/utils/mixin.js'
|
||||||
import RouteView from './RouteView'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "IframePageContent",
|
name: "IframePageContent",
|
||||||
inject:['closeCurrent'],
|
inject:['closeCurrent'],
|
||||||
|
mixins: [mixinDevice],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
url: "",
|
url: "",
|
||||||
@@ -33,7 +33,11 @@
|
|||||||
goUrl () {
|
goUrl () {
|
||||||
let url = this.$route.meta.url
|
let url = this.$route.meta.url
|
||||||
this.id = this.$route.path
|
this.id = this.$route.path
|
||||||
|
if (this.isMobile()) {
|
||||||
|
this.height = 800
|
||||||
|
} else {
|
||||||
this.height = document.documentElement.clientHeight-130
|
this.height = document.documentElement.clientHeight-130
|
||||||
|
}
|
||||||
console.log("------url------"+url)
|
console.log("------url------"+url)
|
||||||
console.log("------token------"+Vue.ls.get(ACCESS_TOKEN))
|
console.log("------token------"+Vue.ls.get(ACCESS_TOKEN))
|
||||||
if (url !== null && url !== undefined) {
|
if (url !== null && url !== undefined) {
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ export const JeecgListMixin = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initScroll()
|
|
||||||
if(!this.disableMixinCreated){
|
if(!this.disableMixinCreated){
|
||||||
//console.log(' -- mixin created -- ')
|
//console.log(' -- mixin created -- ')
|
||||||
this.loadData();
|
this.loadData();
|
||||||
@@ -69,16 +68,11 @@ export const JeecgListMixin = {
|
|||||||
this.initDictConfig();
|
this.initDictConfig();
|
||||||
//初始化按钮权限
|
//初始化按钮权限
|
||||||
this.initActiveBtnStr();
|
this.initActiveBtnStr();
|
||||||
|
//初始化列表横向或纵向滚动
|
||||||
|
this.initScroll()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
initScroll() {
|
|
||||||
if (this.isMobile()) {
|
|
||||||
this.scroll.y = ''
|
|
||||||
} else {
|
|
||||||
this.scroll.y = document.documentElement.clientHeight-330
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadData(arg) {
|
loadData(arg) {
|
||||||
if(!this.url.list){
|
if(!this.url.list){
|
||||||
this.$message.error("请设置url.list属性!")
|
this.$message.error("请设置url.list属性!")
|
||||||
@@ -362,6 +356,13 @@ export const JeecgListMixin = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
initScroll() {
|
||||||
|
if (this.isMobile()) {
|
||||||
|
this.scroll.y = ''
|
||||||
|
} else {
|
||||||
|
this.scroll.y = document.documentElement.clientHeight-330
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user