[amis-saas-7496]transfer select 虚拟滚动字段配置

Change-Id: Iffae5ffe5fc23be6d903c5ed2b6c9ffb305745c6
This commit is contained in:
tooeast 2022-11-18 17:34:53 +08:00
parent c6199b8f24
commit 957c53c528
4 changed files with 40 additions and 1 deletions

View File

@ -312,7 +312,9 @@ export class SelectControlPlugin extends BasePlugin {
'开启后当选项值未匹配到当前options中的选项时选项文本飘红'
),
name: 'showInvalidMatch'
})
}),
getSchemaTpl('virtualThreshold'),
getSchemaTpl('virtualItemHeight')
]
},
getSchemaTpl('status', {isFormItem: true}),

View File

@ -336,6 +336,13 @@ export class TabsTransferPlugin extends BasePlugin {
})
]
},
{
title: '高级',
body: [
getSchemaTpl('virtualThreshold'),
getSchemaTpl('virtualItemHeight')
]
},
getSchemaTpl('status', {isFormItem: true})
])
},

View File

@ -330,6 +330,13 @@ export class TransferPlugin extends BasePlugin {
}
]
},
{
title: '高级',
body: [
getSchemaTpl('virtualThreshold'),
getSchemaTpl('virtualItemHeight')
]
},
getSchemaTpl('status', {isFormItem: true}),
getSchemaTpl('validation', {tag: ValidatorTag.MultiSelect})
])

View File

@ -1187,3 +1187,26 @@ setSchemaTpl(
});
}
);
setSchemaTpl('virtualThreshold', {
name: 'virtualThreshold',
type: 'input-number',
min: 1,
step: 1,
precision: 0,
label: tipedLabel(
'虚拟列表阈值',
'当选项数量超过阈值后,会开启虚拟列表以优化性能'
),
pipeOut: (value: any) => value || undefined
});
setSchemaTpl('virtualItemHeight', {
name: 'itemHeight',
type: 'input-number',
min: 1,
step: 1,
precision: 0,
label: tipedLabel('选项高度', '开启虚拟列表时每个选项的高度'),
pipeOut: (value: any) => value || undefined
});