|
|
@@ -118,6 +118,11 @@ export default { |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
myCompanyInfo: function () { |
|
|
|
return this.companyInfo; |
|
|
|
}, |
|
|
|
}, |
|
|
|
//import引入的组件需要注入到对象中才能使用 |
|
|
|
components: {}, |
|
|
|
mixins: [uploadFile], |
|
|
@@ -130,12 +135,26 @@ export default { |
|
|
|
dialogVisible: false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
//监听属性 类似于data概念 |
|
|
|
computed: {}, |
|
|
|
//监控data中的数据变化 |
|
|
|
watch: {}, |
|
|
|
watch: { |
|
|
|
myCompanyInfo: function (newVal) { |
|
|
|
// console.log(JSON.stringify(newVal), "dataset---滚动组件输出"); |
|
|
|
this.initData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//方法集合 |
|
|
|
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, |
|
|
|
// 删除图片 |
|
|
|
handleBeforeRemove(file, fileList) { |
|
|
@@ -155,19 +174,12 @@ export default { |
|
|
|
}, |
|
|
|
//生命周期 - 创建完成(可以访问当前this实例) |
|
|
|
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元素) |
|
|
|
mounted() {}, |
|
|
|
mounted() { |
|
|
|
|
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |