Browse Source

fix: 处理创建分组后,预览不显示的bug

奔跑的面条 2 năm trước cách đây
mục cha
commit
c1af34e1e9
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      src/views/preview/components/PreviewRenderList/index.vue

+ 4 - 2
src/views/preview/components/PreviewRenderList/index.vue

@@ -2,7 +2,7 @@
   <div
     class="chart-item"
     v-for="(item, index) in localStorageInfo.componentList"
-    :class="animationsClass(item.styles.animations)"
+    :class="[animationsClass(item.styles.animations), !item.isGroup && 'hidden']"
     :key="item.id"
     :style="{
       ...getComponentAttrStyle(item.attr, index),
@@ -78,6 +78,8 @@ onMounted(() => {
 <style lang="scss" scoped>
 .chart-item {
   position: absolute;
-  overflow: hidden;
+  &.hidden {
+    overflow: hidden;
+  }
 }
 </style>