From 77bf4f20575dbad892d5434f77f4e39168fe26cb Mon Sep 17 00:00:00 2001 From: chenos Date: Thu, 7 Apr 2022 08:10:58 +0800 Subject: [PATCH] fix: update env.example --- .env.example | 16 ++++++++++++++++ .../client/src/block-provider/hooks/index.ts | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 7593bd26f1..bb54dc9cb9 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,21 @@ +NOCOBASE_ENV=development +API_PORT=3000 + +# api base path endpoint for app(web) +API_BASE_PATH=/api/ + +# api server access point for app(web when build) +API_BASE_URL= + DB_DIALECT=sqlite +# DB_HOST=localhost +# DB_PORT=5432 +# DB_DATABASE=postgres +# DB_USER=nocobase +# DB_PASSWORD=nocobase +# DB_LOG_SQL=on + # STORAGE (Initialization only) # local or ali-oss diff --git a/packages/client/src/block-provider/hooks/index.ts b/packages/client/src/block-provider/hooks/index.ts index 30cd1ebcd8..733af14dd6 100644 --- a/packages/client/src/block-provider/hooks/index.ts +++ b/packages/client/src/block-provider/hooks/index.ts @@ -42,13 +42,13 @@ export const useCreateActionProps = () => { }); __parent?.service?.refresh?.(); setVisible?.(false); - const onSuccess = field?.decoratorProps?.onSuccess; - if (!onSuccess) { + if (visible !== undefined) { return; } + const onSuccess = field?.decoratorProps?.onSuccess; if (typeof onSuccess === 'function') { onSuccess({ form }); - } else if (visible === undefined) { + } else { Modal.success({ title: onSuccess?.successMessage || t('Submitted successfully!'), onOk: async () => {