Skip to content

Commit 63cb491

Browse files
author
Tenny
committed
Squashed commit of the following:
commit a8cfad9 Author: Tenny <joel.shu@qq.com> Date: Wed Oct 23 00:14:23 2024 +0800 feat(BorderLoading): 新增边框加载自定义指令 commit af1ed9c Merge: c1e6811 3647e13 Author: Tenny <joel.shu@qq.com> Date: Tue Oct 22 22:45:10 2024 +0800 Merge branch 'HEAD' of git@github.com:DvShu/neatui-vue.git into dev commit 3647e13 Author: fly_dream <1456207945@qq.com> Date: Tue Oct 22 17:54:06 2024 +0800 Dev (#53) * fix(Theme): 增加 change 事件 * fix(Pagination): 修复点击报错 Signed-off-by: Tenny <joel.shu@qq.com> * fix(useFormReset): 增加设置函数 Signed-off-by: Tenny <joel.shu@qq.com> * refactor: 重构设置函数 Signed-off-by: Tenny <joel.shu@qq.com> * fix(Form): 表单增加 validate、validateField、clearValidate 手动验证函数 * fix(Input): 增加只允许输入数字 --------- Signed-off-by: Tenny <joel.shu@qq.com> Co-authored-by: Tenny <joel.shu@qq.com> Co-authored-by: Tenny <tenny.shu@foxmail.com> commit c1e6811 Author: Tenny <tenny.shu@foxmail.com> Date: Tue Oct 22 17:51:45 2024 +0800 fix(Input): 增加只允许输入数字 commit 20f328f Author: Tenny <tenny.shu@foxmail.com> Date: Tue Oct 22 12:18:02 2024 +0800 fix(Form): 表单增加 validate、validateField、clearValidate 手动验证函数 commit bde5454 Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 23:07:27 2024 +0800 refactor: 重构设置函数 Signed-off-by: Tenny <joel.shu@qq.com> commit 5a98d11 Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 22:59:50 2024 +0800 fix(useFormReset): 增加设置函数 Signed-off-by: Tenny <joel.shu@qq.com> commit 4291b69 Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 22:37:56 2024 +0800 fix(Pagination): 修复点击报错 Signed-off-by: Tenny <joel.shu@qq.com> commit a90e149 Merge: 07469b6 6a3edd5 Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 22:30:13 2024 +0800 Merge branch 'HEAD' of git@github.com:DvShu/neatui-vue.git into dev commit 07469b6 Merge: 6a1d70e 8b07d66 Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 22:30:09 2024 +0800 Merge branch 'dev' of git@github.com:DvShu/neatui-vue.git into dev commit 6a1d70e Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 22:23:43 2024 +0800 fix(Theme): 增加 change 事件 commit 6a3edd5 Author: fly_dream <1456207945@qq.com> Date: Mon Oct 21 11:53:11 2024 +0800 chore(main): release 0.19.4 (#52) commit 28e2b64 Merge: 1245f07 8b07d66 Author: Tenny <tenny.shu@foxmail.com> Date: Mon Oct 21 11:52:22 2024 +0800 new version commit 1245f07 Author: Tenny <tenny.shu@foxmail.com> Date: Mon Oct 21 11:52:22 2024 +0800 Squashed commit of the following: commit 8b07d66 Author: Tenny <tenny.shu@foxmail.com> Date: Mon Oct 21 11:49:52 2024 +0800 fix(SelectOri): 修复选择框 ts 类型错误 commit 2009296 Author: Tenny <tenny.shu@foxmail.com> Date: Mon Oct 21 11:48:17 2024 +0800 fix(Image): 修复无法传递自定义样式、支持自定义fallback commit 9f67504 Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 01:04:16 2024 +0800 fix(Card): 修复暗黑模式下样式显示异常 Signed-off-by: Tenny <joel.shu@qq.com> commit 011a02e Author: Tenny <joel.shu@qq.com> Date: Sun Oct 20 21:38:40 2024 +0800 fix(Button): 修复暗黑模式下样式显示异常 Signed-off-by: Tenny <joel.shu@qq.com> commit 8a9ad64 Author: Tenny <joel.shu@qq.com> Date: Sun Oct 20 18:54:39 2024 +0800 refactor(Popover): 优化代码 Signed-off-by: Tenny <joel.shu@qq.com> commit 5058450 Author: Tenny <joel.shu@qq.com> Date: Thu Oct 17 23:01:51 2024 +0800 docs: 修复文档错误 Signed-off-by: Tenny <joel.shu@qq.com> commit 8b07d66 Author: Tenny <tenny.shu@foxmail.com> Date: Mon Oct 21 11:49:52 2024 +0800 fix(SelectOri): 修复选择框 ts 类型错误 commit 2009296 Author: Tenny <tenny.shu@foxmail.com> Date: Mon Oct 21 11:48:17 2024 +0800 fix(Image): 修复无法传递自定义样式、支持自定义fallback commit 9f67504 Author: Tenny <joel.shu@qq.com> Date: Mon Oct 21 01:04:16 2024 +0800 fix(Card): 修复暗黑模式下样式显示异常 Signed-off-by: Tenny <joel.shu@qq.com> commit 011a02e Author: Tenny <joel.shu@qq.com> Date: Sun Oct 20 21:38:40 2024 +0800 fix(Button): 修复暗黑模式下样式显示异常 Signed-off-by: Tenny <joel.shu@qq.com> commit 8a9ad64 Author: Tenny <joel.shu@qq.com> Date: Sun Oct 20 18:54:39 2024 +0800 refactor(Popover): 优化代码 Signed-off-by: Tenny <joel.shu@qq.com> commit 5058450 Author: Tenny <joel.shu@qq.com> Date: Thu Oct 17 23:01:51 2024 +0800 docs: 修复文档错误 Signed-off-by: Tenny <joel.shu@qq.com> commit d8a4ad3 Author: fly_dream <1456207945@qq.com> Date: Wed Oct 9 16:34:26 2024 +0800 chore(main): release 0.19.3 (#51) commit c54b437 Merge: 58b0ba8 e250e8f Author: Tenny <tenny.shu@foxmail.com> Date: Wed Oct 9 16:33:41 2024 +0800 new version commit 58b0ba8 Author: Tenny <tenny.shu@foxmail.com> Date: Wed Oct 9 16:33:41 2024 +0800 Squashed commit of the following: commit e250e8f Author: Tenny <tenny.shu@foxmail.com> Date: Wed Oct 9 16:33:18 2024 +0800 fix(PageHeader): 修复样式错误导致无法显示标题 commit 76aba54 Author: fly_dream <1456207945@qq.com> Date: Thu Sep 26 17:55:04 2024 +0800 chore(main): release 0.19.2 (#50) commit e250e8f Author: Tenny <tenny.shu@foxmail.com> Date: Wed Oct 9 16:33:18 2024 +0800 fix(PageHeader): 修复样式错误导致无法显示标题 commit 76aba54 Author: fly_dream <1456207945@qq.com> Date: Thu Sep 26 17:55:04 2024 +0800 chore(main): release 0.19.2 (#50) commit c1a78b7 Merge: ccc31ee 3c1c96a Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 17:53:58 2024 +0800 new version commit ccc31ee Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 17:53:58 2024 +0800 Squashed commit of the following: commit 3c1c96a Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 17:53:54 2024 +0800 fix(MdInput): 修复赋予初始值时显示异常 commit 3c1c96a Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 17:53:54 2024 +0800 fix(MdInput): 修复赋予初始值时显示异常 commit 4a8a621 Author: fly_dream <1456207945@qq.com> Date: Thu Sep 26 16:46:00 2024 +0800 chore(main): release 0.19.1 (#49) commit adddc83 Merge: 7eeb70a c639207 Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 16:45:21 2024 +0800 new version commit 7eeb70a Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 16:45:21 2024 +0800 Squashed commit of the following: commit c639207 Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 16:45:16 2024 +0800 fix(MdInput): 修复样式以及输入错误 commit c639207 Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 16:45:16 2024 +0800 fix(MdInput): 修复样式以及输入错误 commit 24219fd Author: fly_dream <1456207945@qq.com> Date: Thu Sep 26 11:30:34 2024 +0800 chore(main): release 0.19.0 (#48) commit d1c960e Merge: 3191809 ab373ff Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 11:29:19 2024 +0800 new version commit 3191809 Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 11:29:19 2024 +0800 Squashed commit of the following: commit ab373ff Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 11:29:13 2024 +0800 fix: 修复 IconFont 导出错误 feat: 表单增加 label-position commit ab373ff Author: Tenny <tenny.shu@foxmail.com> Date: Thu Sep 26 11:29:13 2024 +0800 fix: 修复 IconFont 导出错误 feat: 表单增加 label-position commit 1745494 Author: fly_dream <1456207945@qq.com> Date: Wed Sep 25 12:12:56 2024 +0800 chore(main): release 0.18.1 (#47) commit e3eab5e Merge: fea13e9 041e108 Author: Tenny <tenny.shu@foxmail.com> Date: Wed Sep 25 12:12:04 2024 +0800 new version commit fea13e9 Author: Tenny <tenny.shu@foxmail.com> Date: Wed Sep 25 12:12:04 2024 +0800 Squashed commit of the following: commit 041e108 Author: Tenny <tenny.shu@foxmail.com> Date: Wed Sep 25 12:11:58 2024 +0800 fix: 修复未导出 IconFont 组件 commit 041e108 Author: Tenny <tenny.shu@foxmail.com> Date: Wed Sep 25 12:11:58 2024 +0800 fix: 修复未导出 IconFont 组件
1 parent 2b100eb commit 63cb491

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/components/form/Form.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ provide(formContext, {
9595
errors,
9696
/** 必填字段列表 */
9797
requiredKeys,
98+
labelWidth: () => props.labelWidth,
99+
labelPosition: () => props.labelPosition,
98100
});
99101
100102
provide(formDisabledContext, () => props.disabled);

src/components/form/FormItem.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<script setup lang="ts">
2121
import { Ref, computed, inject, provide } from 'vue';
2222
import { formContext, formItemDisabledContext } from '../../utils/constant';
23+
import type { MaybeRefOrGetter } from 'vue';
2324
2425
const props = withDefaults(
2526
defineProps<{
@@ -44,9 +45,13 @@ const props = withDefaults(
4445
const defaultFormCtx: {
4546
errors?: Ref<Record<string, any>>;
4647
requiredKeys?: Ref<string[]>;
48+
labelWidth: MaybeRefOrGetter<string | undefined>;
49+
labelPosition: MaybeRefOrGetter<'left' | 'right' | 'top' | undefined>;
4750
} = {
4851
errors: undefined,
4952
requiredKeys: undefined,
53+
labelWidth: () => undefined,
54+
labelPosition: () => undefined,
5055
};
5156
let { errors, requiredKeys } = inject(formContext, defaultFormCtx);
5257

0 commit comments

Comments
 (0)