【功能优化】现在每次点击装修组件都刷新右侧属性窗口
parent
19789fabf5
commit
757f10cbe6
|
@ -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">
|
||||||
<!-- 左侧:组件名(悬浮的小贴条) -->
|
<!-- 左侧:组件名(悬浮的小贴条) -->
|
||||||
|
|
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue