Skip to content

Commit

Permalink
fix(uni): missing onSubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulLyoko committed Oct 14, 2022
1 parent 617240d commit a7ea26a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/uni/composables/use-crud/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export function useCrud<T extends Data = Data, P extends Data = Data>(options: U
modelValue: crudState.formData,
formType: crudState.formType,
// 事件
"onUpdate:modelValue": (form: T) => (crudState.formData = form)
"onUpdate:modelValue": (form: T) => (crudState.formData = form),
onSubmit: handleSubmit
}));

/** 使用一些默认的生命周期 */
Expand Down
2 changes: 1 addition & 1 deletion packages/uni/composables/use-crud/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface CrudOption<T, P> extends _CrudOption<T, P> {
/** 搜索栏绑定的字段 */
searchKey: string;
/** 跳转到表单页的路径 */
formPath: string;
formPath: string | string[];
/** 跳转到表单携带的参数,默认为整个表单 */
formKeys: string;
/** 是否携带分页参数 */
Expand Down

0 comments on commit a7ea26a

Please sign in to comment.