|
@ -55,7 +55,7 @@ export default defineComponent({ |
|
|
vLoading: propTypes.bool.def(false), |
|
|
vLoading: propTypes.bool.def(false), |
|
|
labelPosition: propTypes.string.def('left'), |
|
|
labelPosition: propTypes.string.def('left'), |
|
|
}, |
|
|
}, |
|
|
emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onFocus','onEnter','hiddenFilterButton','changeDialogWidth','onInput'], |
|
|
emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onSubmit', 'onBlur','onFocus','onEnter','hiddenFilterButton','changeDialogWidth','onInput'], |
|
|
setup(props, { slots, expose, emit }) { |
|
|
setup(props, { slots, expose, emit }) { |
|
|
// element form 实例 |
|
|
// element form 实例 |
|
|
const elFormRef = ref<ComponentRef<typeof ElForm>>() |
|
|
const elFormRef = ref<ComponentRef<typeof ElForm>>() |
|
@ -196,6 +196,10 @@ export default defineComponent({ |
|
|
const onChange = (field, cur) => { |
|
|
const onChange = (field, cur) => { |
|
|
emit('onChange', field, cur) |
|
|
emit('onChange', field, cur) |
|
|
} |
|
|
} |
|
|
|
|
|
const onSubmit = (event) => { |
|
|
|
|
|
emit('onSubmit', event) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 监听失去焦点 |
|
|
* 监听失去焦点 |
|
|
* @param field 当前操作字段 |
|
|
* @param field 当前操作字段 |
|
@ -461,6 +465,7 @@ export default defineComponent({ |
|
|
class={prefixCls} |
|
|
class={prefixCls} |
|
|
v-loading={props.vLoading} |
|
|
v-loading={props.vLoading} |
|
|
label-position={props.labelPosition} |
|
|
label-position={props.labelPosition} |
|
|
|
|
|
onSubmit={(e)=>{onSubmit(e)}} |
|
|
> |
|
|
> |
|
|
{{ |
|
|
{{ |
|
|
// 如果需要自定义,就什么都不渲染,而是提供默认插槽 |
|
|
// 如果需要自定义,就什么都不渲染,而是提供默认插槽 |
|
|