Skip to content

Commit

Permalink
优化属性面板
Browse files Browse the repository at this point in the history
  • Loading branch information
xilanhuaweidapao committed Oct 9, 2024
1 parent f8f8e2f commit 50960c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/attribute-panel/AttributePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
<div class="sm-component-attribute-panel__content">
<slot></slot>
<div v-if="$scopedSlots && Object.keys($scopedSlots).length && attributes">
<div v-if="$scopedSlots && Object.keys($scopedSlots).length && Object.keys(attributes).length">
<ul>
<li v-for="(value, key, index) in attributes" :key="index" class="content">
<div class="left ellipsis" :title="key" style="{width: 110}">{{ key }}</div>
Expand All @@ -27,8 +27,8 @@
</li>
</ul>
</div>
<sm-table-popup v-if="!$slots.default && !($scopedSlots && Object.keys($scopedSlots).length) && attributes" v-bind="tablePopupProps" class="sm-component-attribute-panel__self-content" />
<sm-empty v-if="!$slots.default && !attributes" />
<sm-table-popup v-if="!$slots.default && !($scopedSlots && Object.keys($scopedSlots).length) && Object.keys(attributes).length" v-bind="tablePopupProps" class="sm-component-attribute-panel__self-content" />
<sm-empty v-if="!$slots.default && !Object.keys(attributes).length" />
</div>
</div>
</template>
Expand Down

0 comments on commit 50960c3

Please sign in to comment.