fix: naive ui form reset does not meet expectations (#4569)

* fix: naive ui form reset does not meet expectations

* fix: typo
This commit is contained in:
Vben
2024-10-05 17:09:42 +08:00
committed by GitHub
parent 402eaf4275
commit d37e2f599c
13 changed files with 34 additions and 19 deletions
+2 -2
View File
@@ -3,8 +3,8 @@ import { baseRequestClient, requestClient } from '#/api/request';
export namespace AuthApi {
/** 登录接口参数 */
export interface LoginParams {
password: string;
username: string;
password?: string;
username?: string;
}
/** 登录接口返回值 */
+2 -2
View File
@@ -3,8 +3,8 @@ import { baseRequestClient, requestClient } from '#/api/request';
export namespace AuthApi {
/** 登录接口参数 */
export interface LoginParams {
password: string;
username: string;
password?: string;
username?: string;
}
/** 登录接口返回值 */
+3
View File
@@ -84,7 +84,10 @@ setupVbenForm<FormComponentType>({
Upload: NUpload,
},
config: {
// naive-ui组件不接受onChang事件,所以需要禁用
disabledOnChangeListener: true,
// naive-ui组件的空值为null,不能是undefined,否则重置表单时不生效
emptyStateValue: null,
baseModelPropName: 'value',
modelPropNameMap: {
Checkbox: 'checked',
+2 -2
View File
@@ -3,8 +3,8 @@ import { baseRequestClient, requestClient } from '#/api/request';
export namespace AuthApi {
/** 登录接口参数 */
export interface LoginParams {
password: string;
username: string;
password?: string;
username?: string;
}
/** 登录接口返回值 */