diff --git a/apps/web-antd/src/api/infra/demo/demo01/index.ts b/apps/web-antd/src/api/infra/demo/demo01/index.ts
index b03a2aef..5a940a61 100644
--- a/apps/web-antd/src/api/infra/demo/demo01/index.ts
+++ b/apps/web-antd/src/api/infra/demo/demo01/index.ts
@@ -1,3 +1,5 @@
+import type { Dayjs } from 'dayjs';
+
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
@@ -7,8 +9,8 @@ export namespace Demo01ContactApi {
export interface Demo01Contact {
id: number; // 编号
name?: string; // 名字
- sex?: number; // 性别
- birthday?: Date; // 出生年
+ sex?: boolean; // 性别
+ birthday?: Dayjs | string; // 出生年
description?: string; // 简介
avatar: string; // 头像
}
diff --git a/apps/web-antd/src/utils/date.ts b/apps/web-antd/src/utils/date.ts
index 2c899a9f..537fb9e7 100644
--- a/apps/web-antd/src/utils/date.ts
+++ b/apps/web-antd/src/utils/date.ts
@@ -3,7 +3,7 @@ import dayjs from 'dayjs';
// TODO @芋艿:后续整理下 迁移至 packages/core/base/shared/src/utils/date.ts,后续删除 使用 @vben/utils 的 getRangePickerDefaultProps
/** 时间段选择器拓展 */
-export function getRangePickerDefaultProps() {
+export function getRangePickerDefaultProps(): any {
return {
showTime: {
format: 'HH:mm:ss',
diff --git a/apps/web-antd/src/views/infra/demo/general/demo01/index.vue b/apps/web-antd/src/views/infra/demo/general/demo01/index.vue
index d5136a88..bab52a84 100644
--- a/apps/web-antd/src/views/infra/demo/general/demo01/index.vue
+++ b/apps/web-antd/src/views/infra/demo/general/demo01/index.vue
@@ -1,10 +1,12 @@
@@ -128,15 +142,10 @@ onMounted(() => {
-
+
-
{
placeholder="请输入名字"
allow-clear
@press-enter="handleQuery"
- class="!w-240px"
+ class="w-full"
/>
@@ -152,7 +161,7 @@ onMounted(() => {
v-model:value="queryParams.sex"
placeholder="请选择性别"
allow-clear
- class="!w-240px"
+ class="w-full"
>
-
-
+
+
+
+
+
+
+
{
>
{{ $t('ui.actionTitle.export') }}
-
-
-
-
-
-
-
-
+
+
+
diff --git a/apps/web-antd/src/views/infra/demo/general/demo01/modules/form.vue b/apps/web-antd/src/views/infra/demo/general/demo01/modules/form.vue
index a0862b01..2064f551 100644
--- a/apps/web-antd/src/views/infra/demo/general/demo01/modules/form.vue
+++ b/apps/web-antd/src/views/infra/demo/general/demo01/modules/form.vue
@@ -26,11 +26,9 @@ import { ImageUpload } from '#/components/upload';
import { $t } from '#/locales';
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
-const emit = defineEmits(['success']); // TODO @puhui999:emit 和下面空一行?
+const emit = defineEmits(['success']);
+
const formRef = ref();
-// TODO @puhui999:labelCol、wrapperCol 直接写?不用单独定义变量,
-const labelCol = { span: 5 };
-const wrapperCol = { span: 13 };
const formData = ref>({
id: undefined,
name: undefined,
@@ -90,8 +88,7 @@ const [Modal, modalApi] = useVbenModal({
resetForm();
return;
}
-
- // 加载数据 TODO @puhui999:这里不用空行
+ // 加载数据
let data = modalApi.getData();
if (!data) {
return;
@@ -115,8 +112,8 @@ const [Modal, modalApi] = useVbenModal({
ref="formRef"
:model="formData"
:rules="rules"
- :label-col="labelCol"
- :wrapper-col="wrapperCol"
+ :label-col="{ span: 5 }"
+ :wrapper-col="{ span: 18 }"
>