fix: 过滤组件在没有视图时报错

This commit is contained in:
fit2cloud-chenyw 2021-05-19 18:00:39 +08:00
parent 1bf8fe5dff
commit abf0f7560c

View File

@ -316,7 +316,7 @@ export default {
const viewIds = this.componentData const viewIds = this.componentData
.filter(item => item.type === 'view' && item.propValue && item.propValue.viewId) .filter(item => item.type === 'view' && item.propValue && item.propValue.viewId)
.map(item => item.propValue.viewId) .map(item => item.propValue.viewId)
viewsWithIds(viewIds).then(res => { viewIds && viewIds.length > 0 && viewsWithIds(viewIds).then(res => {
const datas = res.data const datas = res.data
this.viewInfos = datas this.viewInfos = datas
}) })