【发布时间】:2023-02-06 06:41:14
【问题描述】:
我有一个自定义实体 enterprise,它已分配给 product.extensions.myPlugin.enterpriseId。
现在我想在Shopware Vue-Component sw-entity-single-select中选择enterprise被sw-inherit-wrapper包装:
<sw-inherit-wrapper
v-model="product.extensions.myPlugin.enterpriseId"
:has-parent="false"
:inherited-value="null">
<template #content="{currentValue, updateCurrentValue, isInherited}">
<sw-entity-single-select
class="enterprise-name"
:key="isInherited"
:value="currentValue"
entity="enterprise"
:placeholder="$tc('inputEnterprise.placeholder')"
show-clearable-button
allow-entity-creation
:entity-creation-label="$tc('inputEnterprise.labelCreation')"
@change="updateCurrentValue"></sw-entity-single-select>
</template>
</sw-inherit-wrapper>
该模板是模态的一部分。
在选择来自给定列表的enterprise,<sw-entity-single-select__selection-text>不更新.
跳出进入模板(关闭并重新打开父模态),enterprise 被设置并打印在<sw-entity-single-select__selection-text> 上。
因此,实体扩展已更新,但<sw-entity-single-select__selection-text> 中的属性 currentValue 未更新
例如,我关注sw_product_basic_form_manufacturer_field
问题:为什么财产currentValue未在<sw-entity-single-select> 中选择更新从它的列表中?
【问题讨论】: