Просмотр исходного кода

修复详情因加载问题导致的图片不显示

master
王饶冀 2 лет назад
Родитель
Сommit
ab051c9e20

+ 0
- 1
digital-park-web/digital-park/src/views/park-enterprises/Detail.vue Просмотреть файл

this.pageLoading = true; this.pageLoading = true;
getCompanyById(params) getCompanyById(params)
.then(res => { .then(res => {
console.log(res.data);
if (res.data.status == 0) { if (res.data.status == 0) {
this.companyInfo = res.data.data; this.companyInfo = res.data.data;
this.canEdit = this.canEdit =

+ 27
- 15
digital-park-web/digital-park/src/views/park-enterprises/components/OtherInfo.vue Просмотреть файл

default: false, default: false,
}, },
}, },
computed: {
myCompanyInfo: function () {
return this.companyInfo;
},
},
//import引入的组件需要注入到对象中才能使用 //import引入的组件需要注入到对象中才能使用
components: {}, components: {},
mixins: [uploadFile], mixins: [uploadFile],
dialogVisible: false, dialogVisible: false,
}; };
}, },
//监听属性 类似于data概念
computed: {},
//监控data中的数据变化
watch: {},
watch: {
myCompanyInfo: function (newVal) {
// console.log(JSON.stringify(newVal), "dataset---滚动组件输出");
this.initData();
},
},
//方法集合 //方法集合
methods: { methods: {
initData(){
this.uploadFileList = this.companyInfo.enterpriseFeatures
? this.companyInfo.enterpriseFeatures
: [];
if (this.companyInfo.enterpriseFeatures) {
this.uploadFileList.forEach(item => {
this.fileList.push({
url: this.formatImg(item),
});
});
}
},
formatImg, formatImg,
// 删除图片 // 删除图片
handleBeforeRemove(file, fileList) { handleBeforeRemove(file, fileList) {
}, },
//生命周期 - 创建完成(可以访问当前this实例) //生命周期 - 创建完成(可以访问当前this实例)
created() { created() {
this.uploadFileList = this.companyInfo.enterpriseFeatures
? this.companyInfo.enterpriseFeatures
: [];
if (this.companyInfo.enterpriseFeatures) {
this.uploadFileList.forEach(item => {
this.fileList.push({
url: this.formatImg(item),
});
});
}
}, },
//生命周期 - 挂载完成(可以访问DOM元素) //生命周期 - 挂载完成(可以访问DOM元素)
mounted() {},
mounted() {
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Загрузка…
Отмена
Сохранить