fix: Picker 组件 itemClick 事件改成驼峰式的命名 (#6453)

This commit is contained in:
meerkat 2023-03-23 20:38:13 +08:00 committed by GitHub
parent 284dd97d2a
commit c333aa8d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -41,7 +41,7 @@ export default {
}
],
onEvent: {
itemclick: {
itemClick: {
actions: [
{
actionType: 'alert',
@ -298,7 +298,7 @@ export default {
]
},
onEvent: {
itemclick: {
itemClick: {
actions: [
{
actionType: 'alert',

View File

@ -82,7 +82,7 @@ export class PickerControlPlugin extends BasePlugin {
]
},
{
eventName: 'itemclick',
eventName: 'itemClick',
eventLabel: '点击选项',
description: '选项被点击时触发',
dataSchema: [

View File

@ -763,12 +763,13 @@ test('Renderer:combo with addable & addattop & addBtn & addButtonText & addButto
fireEvent.click(
container.querySelector('.addAtTopClass .cxd-Combo-toolbar button')!
);
await wait(10);
expect(
(container.querySelector(
'.addAtTopClass .cxd-Combo-item .cxd-TextControl-input input'
) as HTMLInputElement)!.value
).toBe('');
await waitFor(() => {
expect(
(container.querySelector(
'.addAtTopClass .cxd-Combo-item .cxd-TextControl-input input'
) as HTMLInputElement)!.value
).toBe('');
});
expect(
container.querySelector('.addableClass .cxd-Combo-toolbar button')!