mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [timepicker] fix disabled props (#23022)
* fix(components): [timepicker] fix `disabled` attrs Change 'disabled' prop to an object with type and default. * fix: image test checks --------- Co-authored-by: huangjunfeng <huangjunfeng@jilinxiangyun.com>
This commit is contained in:
@@ -334,6 +334,11 @@ describe('Image.vue', () => {
|
||||
}
|
||||
const wrapper = mount(() => <Image {...props} />)
|
||||
await flushPromises()
|
||||
// Manually trigger the load event if necessary
|
||||
const img = wrapper.find('img')
|
||||
if (img.exists()) {
|
||||
await img.trigger('load')
|
||||
}
|
||||
expect(wrapper.find('.el-image__inner').exists()).toBe(true)
|
||||
expect(handleLoad).toBeCalled()
|
||||
})
|
||||
|
||||
@@ -123,7 +123,10 @@ export const timePickerDefaultProps = buildProps({
|
||||
/**
|
||||
* @description whether TimePicker is disabled
|
||||
*/
|
||||
disabled: Boolean,
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: undefined,
|
||||
},
|
||||
/**
|
||||
* @description placeholder in non-range mode
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user