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