【功能优化】现在每次点击装修组件都刷新右侧属性窗口

pull/537/head
卢越 2024-09-04 17:40:10 +08:00
parent 19789fabf5
commit 757f10cbe6
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@
...style ...style
}" }"
> >
<component :is="component.id" :property="component.property" :component="component" /> <component :is="component.id" :property="component.property" />
</div> </div>
<div class="component-wrap"> <div class="component-wrap">
<!-- 左侧组件名悬浮的小贴条 --> <!-- 左侧组件名悬浮的小贴条 -->

View File

@ -151,8 +151,9 @@
class="m-[calc(0px-var(--el-card-padding))]" class="m-[calc(0px-var(--el-card-padding))]"
view-class="p-[var(--el-card-padding)] p-b-[calc(var(--el-card-padding)+var(--el-card-padding))] property" view-class="p-[var(--el-card-padding)] p-b-[calc(var(--el-card-padding)+var(--el-card-padding))] property"
> >
<!--这里的 key 使用时间戳是为了保证每次点击组件都进行刷新-->
<component <component
:key="selectedComponent?.uid || selectedComponent?.id" :key="selectedComponent?.uid || selectedComponent?.id + new Date().getTime() || new Date().getTime().toString()"
:is="selectedComponent?.id + 'Property'" :is="selectedComponent?.id + 'Property'"
v-model="selectedComponent.property" v-model="selectedComponent.property"
/> />