diff --git a/src/components/common/custom-module/data-rendering/index.vue b/src/components/common/custom-module/data-rendering/index.vue index 1effc4fe..ee127ac2 100644 --- a/src/components/common/custom-module/data-rendering/index.vue +++ b/src/components/common/custom-module/data-rendering/index.vue @@ -120,7 +120,7 @@ watch(() => props.customList, async (val) => { const new_val = cloneDeep(val); list.value = new_val; // 判断是否有跟随的数据 - const follow_list = new_val.filter(item => item.com_data?.data_follow?.id !== ''); + const follow_list = new_val.filter(item => item.com_data.data_follow && item.com_data?.data_follow?.id !== ''); if (follow_list.length > 0) { await nextTick(); // 获取当前容器的宽度 diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue index 93f34566..3ac7eb4c 100644 --- a/src/components/model-custom/components/index.vue +++ b/src/components/model-custom/components/index.vue @@ -819,11 +819,11 @@ const start_drag_area_box = (index: number, event: MouseEvent) => { is_draggable.value = true; drag_box_bool.value = false; // 构建被跟随组件的 ID 集合 - const followerIds = new Set(diy_data.value.filter(item => item.is_hot !== '1' && item.com_data?.data_follow?.id !== '').map(item => item.com_data?.data_follow?.id)); + const followerIds = new Set(diy_data.value.filter(item => item.is_hot !== '1' && item.com_data.data_follow && item.com_data.data_follow.id !== '').map(item => item.com_data?.data_follow?.id)); const followerMap: FollowerMap = {}; // 外层取出对应的数据,避免里边循环影响性能 diy_data.value.forEach(item => { - if (item.com_data?.data_follow?.id !== '' && item.is_hot !== '1') { + if (item.com_data.data_follow && item.com_data?.data_follow?.id !== '' && item.is_hot !== '1') { followerMap[item.com_data.data_follow.id] = item; } }); diff --git a/src/views/layout/components/main/index.vue b/src/views/layout/components/main/index.vue index b0f9efea..661d9772 100644 --- a/src/views/layout/components/main/index.vue +++ b/src/views/layout/components/main/index.vue @@ -527,6 +527,19 @@ onMounted(async () => { const interval = setInterval(() => { // 获取分类 if (common_store.common.module_list.length > 0) { + common_store.common.module_list.forEach((item) => { + if (item.key == 'plugins') { + const data = [ + { key: "blog", name: "博客" }, + { key: "blog-tabs", name: "博客选项卡" }, + { key: "binding", name: "组合搭配" }, + { key: "realstore", name: "多门店" }, + { key: "shop", name: "多商户" }, + { key: "salerecords", name: "销售记录" }, + ] + item.data = item.data.concat(data); + } + }); components.value = common_store.common.module_list; clearInterval(interval); }