Skip to content

Commit

Permalink
fix(createSubmit): start 的 message 可选
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Oct 20, 2021
1 parent 4f6784d commit e3c8c55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mp/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const submit: CreateSubmitResult = createSubmit({
start(message) {
ensureInMiniProgram(mp => {
mp.showLoading({
title: message,
title: message || '',
mask: true,
})
})
Expand Down
4 changes: 2 additions & 2 deletions src/utils/createSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface CreateSubmitOptions {
*
* @param message 提示信息
*/
start(message: string): AsyncOrSync<any>
start(message?: string): AsyncOrSync<any>

/**
* 失败回调。
Expand Down Expand Up @@ -43,7 +43,7 @@ export interface SubmitActionPayload {
*
* @param message 提示信息
*/
start(message: string): Promise<any>
start(message?: string): Promise<any>

/**
* 失败提示。
Expand Down

0 comments on commit e3c8c55

Please sign in to comment.