Merge pull request #6911 from allenve/master

fix: options 有默认值时不触发autoFill
This commit is contained in:
hsm-lv 2023-05-17 20:47:46 +08:00 committed by GitHub
commit 8484ea870c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,6 +346,15 @@ export function registerOptionsControl(config: OptionsConfig) {
this.syncAutoFill(formItem.getSelectedOptions(formItem.tmpValue))
)
);
if (
options &&
formItem.tmpValue &&
formItem.getSelectedOptions(formItem.tmpValue).length
) {
this.syncAutoFill(formItem.getSelectedOptions(formItem.tmpValue));
}
// 默认全选。这里会和默认值\回填值逻辑冲突所以如果有配置source则不执行默认全选
if (
multiple &&