|
|
|
@ -60,14 +60,17 @@
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
getCom: function () {
|
|
|
|
|
return () => import(`@/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/${this.url}`)
|
|
|
|
|
let _url = this.url;
|
|
|
|
|
return () => import(`@/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/${_url}`)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
initLoadModule: function () {
|
|
|
|
|
let moduleTop = this.$refs.moduleRef ? this.$refs.moduleRef.offsetTop : 0;
|
|
|
|
|
let moduleContent = document.getElementById("moduleContent");
|
|
|
|
|
let scrollTop = moduleContent.scrollTop;
|
|
|
|
|
let initVisibleBottom = document.documentElement.clientHeight;
|
|
|
|
|
if (moduleTop < initVisibleBottom) {
|
|
|
|
|
let moduleTop = this.$refs.moduleRef ? this.$refs.moduleRef.offsetTop : initVisibleBottom;
|
|
|
|
|
if (moduleTop - scrollTop < initVisibleBottom) {
|
|
|
|
|
//开始加载
|
|
|
|
|
this.url = this.getModuleUrl();
|
|
|
|
|
}
|
|
|
|
@ -123,11 +126,11 @@
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
moduleData: function (newData) {
|
|
|
|
|
this.type_id = newData.module_type_id
|
|
|
|
|
this.id = newData.module_id
|
|
|
|
|
this.module_size = newData.size
|
|
|
|
|
this.showIndex = newData.showIndex
|
|
|
|
|
this.url = this.getModuleUrl()
|
|
|
|
|
this.type_id = newData.module_type_id;
|
|
|
|
|
this.id = newData.module_id;
|
|
|
|
|
this.module_size = newData.size;
|
|
|
|
|
this.showIndex = newData.showIndex;
|
|
|
|
|
//this.url = this.getModuleUrl();
|
|
|
|
|
this.initLoadModule();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|