126 Commits

Author SHA1 Message Date
leihaohao
91b46a7594 fix(components): [form/form-item] initial value and reset func (#23597)
* fix(components): [form][form-item] initial value and reset func

* fix: resetFields

* fix: coderabbitai

* fix: resetFields

* fix: coderabbitai

* fix: resetFields

* fix: setInitialValues

* chore: simplify

* docs: better doc

* chore: sync doc

Co-authored-by: btea <2356281422@qq.com>

* docs: update

* docs: update

---------

Co-authored-by: Dsaquel <291874700n@gmail.com>
Co-authored-by: btea <2356281422@qq.com>
2026-02-27 11:22:32 +08:00
Noblet Ouways
aef049776f fix(components): [form] support nested FormRules (#23668) 2026-02-26 10:12:26 +08:00
snowbitx
5ea2563107 refactor(components): [form/form-item] use type-based definitions (#23483)
* refactor(components): [form] use type-based definitions

* fix: add export

* fix: add type
2026-01-20 15:35:38 +08:00
lw56777
36471cbedd feat(components): [form] add setInitialValues and setInitialValue function (#23013)
* feat: setInitialFields

* Remove '@eslint/markdown' dependency

Removed '@eslint/markdown' dependency from package.json

* Remove '@eslint/markdown' from pnpm-lock.yaml

Removed '@eslint/markdown' dependency from lock file.

* fix(components): expose setInitialValue alias

* fix: test

* fix: Nitpick comments

* docs(components): add setInitialValues and setInitialValue API docs

* fix: docs[form] setInitialValue

* fix: typecheck

* Update docs/en-US/component/form.md

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>

* fix: test

* fix: test

* fix: test lg

* Update docs/en-US/component/form.md

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>

* fix: update initValue

* fix: form.vue

* fix: form description

* chore: sync comment

* chore: format

---------

Co-authored-by: lw567 <liwei567@example.com>
Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
Co-authored-by: Dsaquel <291874700n@gmail.com>
2026-01-07 21:17:46 +08:00
dopamine
0ca1570aa1 chore: upgrade to Vue 3.5 (#22096)
* chore: upgrade deps

* chore: replace __ExtractPublicPropTypes with ExtractPublicPropTypes

* fix: get rid of type errors

* fix: resolve test errors with @vue/test-utils v2.4.6

* fix: resolve test errors with Vue 3.5.22

* ci: set pnpm flag

* chore: update the Vue peer dependency version

* Apply suggestion from @tolking

Co-authored-by: qiang <qw13131wang@gmail.com>

* docs: update example code

Co-authored-by: warmthsea <2586244885@qq.com>

* chore: remove csstype (#22487)

* chore: fix merge code type error

* chore: fix test:ssr error

- Cannot read properties of undefined (reading 'getSSRProps')

* chore: fix typecheck:vitest error

* chore: update pnpm yaml file

* test: fix collapse accordion error

* chore: update deps

* chore: fix type error

* chore: lock file

* chore: sync change

sync with the remove of vue macro

* refactor: use computed instead of eagerComputed

* fix: timeline.test.tsx typecheck

* chore: clean lock file

try dont throw CodeFactor issues in ci

did:
- rm pnpm-lock.yaml
- rm -rf ./**/node_modules
- pnpm store prune
- pnpm cache delete
- pnpm install

Also stay in 3.1.0 for vue-tsc in order to avoid the warnings of
template refs, see https://github.com/vuejs/language-tools/issues/5815

* chore: format code

---------

Co-authored-by: Dsaquel <291874700n@gmail.com>
Co-authored-by: qiang <qw13131wang@gmail.com>
Co-authored-by: warmthsea <2586244885@qq.com>
Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>
Co-authored-by: btea <2356281422@qq.com>
2025-12-16 09:34:03 +08:00
btea
2d64179491 refactor!: the disabled value of component has the highest priority (#18739)
* refactor!: the disabled value of component has the highest priority

* fix: update

* fix: compatible with switch loading

* feat: apply to cascader, select, select-v2

* fix: update

* fix: update selectv2

* fix: update autocomplete

* fix: date-picker-panel

* fix: update rate/slider/upload

* fix: slider error

* fix: update checkbox

* fix: checkbox error
2025-12-01 21:20:57 +08:00
rzzf
1859f5137e fix(utils): [addUnit] handle 0 value correctly (#22808)
* fix(utils): [addUnit] handle 0 value correctly

* fix: provide example

* fix: update

* fix: update

* test: update case name

* fix: update

Co-authored-by: Dsaquel <291874700n@gmail.com>

* fix: update

Co-authored-by: btea <2356281422@qq.com>

---------

Co-authored-by: Dsaquel <291874700n@gmail.com>
Co-authored-by: btea <2356281422@qq.com>
2025-11-18 16:29:01 +08:00
Kylin
246f6bd1c9 refactor(components): [form] remove unnecessary non-empty assertions (#22660) 2025-11-03 15:44:35 +08:00
一只前端汪
7c16480bcd refactor(style): Update Eslint to V9 and Prettier to V3 (#21949)
* refactor(style): Update Eslint to V9 and Prettier to V3

* fix: vscode color

* fix: vscode color

* chore: remove Useless dependence and old config file

* chore: format

* Merge branch 'dev' into eslintV9

* fix: fix

* fix: ssr test

* fix: ssr test

* fix: use defineConfig

* fix: prettier format and ignore docs dist

* fix: index.mjs => index.js

* fix: Vscode color

* fix: prettier ignore global.d.ts

* fix: format

---------

Co-authored-by: 2586740555 <15972343+CYJ090915@user.noreply.gitee.com>
2025-09-29 14:14:30 +08:00
Noblet Ouways
2ede13c098 fix(components): [form-item] dynamically toggle form item slot (#22344)
fix(components): [form] dynamically toggle the form item slot

closed #18978
2025-09-28 23:49:41 +08:00
Kylin
f429c38d93 perf(components): [form] optimize search for obj with certain attribute (#21996) 2025-09-02 09:20:04 +08:00
Rainbow
01dcccdfc3 fix(components): [form] inline-message of form-item defaults to undefined (#21944)
* fix(components): [form] inline-message of form-item should be Boolean

* fix: update

* fix: update

* docs: inline-message of form-item defaults to undefined
2025-08-30 00:09:38 +02:00
qiang
6847d4fbb0 chore(hooks): [useLocale] autocomplete locale field keys (#21876) 2025-08-24 00:03:46 +02:00
Zhong
09df413426 refactor(components): [form] enhance scrollIntoViewOptions type (#21552) 2025-07-31 09:20:07 +08:00
xingyixiang
be98423b29 fix(components): [form] maximum recursive updates exceeded (#21391) 2025-07-23 16:28:00 +08:00
snowbitx
ec59698157 fix(components): [form] avoid reset manual errors (#21368)
* fix: #21365

* fix: #21365 add test case
2025-07-16 22:40:08 +08:00
yuhengshen
cfc661c626 feat(types): [components] add public prop types (#21222)
* feat(types): [utils] add ExtractPublicPropTypes type

* feat(types): [components] add props public type

* chore(types): use type-only import for Prop from 'vue'

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>

---------

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
2025-07-07 00:51:32 +08:00
Noblet Ouways
2f17df1209 style(eslint-config): newline before import type (#21036)
* perf: change to import-x

* feat: add rules

* chore: fix rule

* chore: fix

* chore: fix

* chore: fix

* style: `pnpm lint:fix`

* Revert "style: `pnpm lint:fix`"

This reverts commit db0116a288.

* Revert "chore: fix"

This reverts commit 69c82a90c0.

* chore: fix

* style: `pnpm lint:fix`

* fix: lint

* chore: `pnpm format`
2025-06-16 15:37:12 +08:00
qiang
9539c19b40 style(eslint-config): add rules to restrict the imports of element-plus (#20959)
* style(eslint-config): add rules to restrict the imports of element-plus

* chore: added validation for tsx files

* chore: revert the shell
2025-06-13 17:07:39 +08:00
xingyixiang
bb5930e8b7 feat(components): [form] export getField (#20981)
* feat(components): [form] export getField

* fix(components): [form] test

* feat(components): [form] export getField

* Update packages/components/form/src/utils.ts

Co-authored-by: btea <2356281422@qq.com>

* feat(components): [form] export getField

* feat(components): [form] export getField

---------

Co-authored-by: btea <2356281422@qq.com>
2025-06-12 22:33:29 +08:00
betavs
cbc11e601d fix(components): [form] the validate function is executed repeatedly (#19345) 2025-06-07 10:30:26 +08:00
sea
2c29081621 fix(hooks): [use-focus-controller] form-disabled-status not trigger blur (#20891)
* fix(components): [input] form-disabled-status blur not validate

* fix: update hooks

Co-authored-by: xingyixiang <452282988@qq.com>

* test: add form disabled case

* fix: test import

* Update packages/hooks/use-focus-controller/index.ts

Co-authored-by: btea <2356281422@qq.com>

* refactor: import path

---------

Co-authored-by: xingyixiang <452282988@qq.com>
Co-authored-by: btea <2356281422@qq.com>
2025-06-04 10:44:53 +08:00
Noblet Ouways
bae467696d test(components): [form] add missing async keyword (#20906) 2025-06-02 20:21:53 +08:00
betavs
8b4a21136b fix(components): [form-item] cannot be set to div tag for rendering (#20608) 2025-06-01 18:31:49 +08:00
btea
8399c0076c test(components): [form] scrollToError scroll to correct form item (#20848) 2025-05-26 09:20:44 +08:00
btea
c29eac5f81 fix(components): [form] scrollToError scroll to correct position (#20826)
* fix(components): [form] `scrollToError` scroll to correct position

* fix: update

* fix: update

* fix: update

* fix: revert

* fix: set scrollIntoViewOptions default to true

* Update packages/components/form/src/form.vue

Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>

* fix: update

* fix: update class

---------

Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>
2025-05-23 15:52:55 +08:00
btea
3e81fdd36c chore: remove todo comment (#20614) 2025-05-02 15:29:02 +08:00
w2xi
0eb0eae70b refactor(components): [form] make exposed fields reactive (#20567)
fix(components): [form] make exposed `fields` reactive (close #20566)
2025-05-01 16:59:27 +08:00
w2xi
aa8fce48bf chore: [form-item] redundant type assertion (#20300) 2025-03-30 12:47:57 +00:00
dopamine
7be4a3765e chore: emits smaller declaration files (#20109)
* Revert "fix(types): packing unexpected types (#19419)"

This reverts commit 13506ffb81.

* Revert "chore: add explicit type annoation (#19352)"

* fix(typescript): borken import paths in declaration files

* chore: emits smaller declaration files
2025-03-18 10:08:44 +08:00
Noblet Ouways
536548e753 fix(components): [form] on post rules update reset field (#19129)
* fix(components): [form] track rules on post update

closed #19109

* fix(components): [form] ensure reset field state if no rules

closed #19128

* test: add validate on rule change case

* chore: on rules update reset field error

* chore: fixup

---------

Co-authored-by: btea <2356281422@qq.com>
2025-01-06 22:58:08 +08:00
dopamine
e9f3fdd529 chore: [form] organize test-related files into test folder (#19145) 2024-12-06 07:56:29 +08:00
jiaxiang
10fcc59ed4 refactor: replace Array.isArray with the built-in isArray (#18671)
chore(components): [descriptions] isArray replace Array.isArray
2024-10-28 15:36:44 +08:00
btea
4f380a6911 chore: upgrade vitest (#18099)
* chore: upgrade vitest

* chore: update
2024-08-31 16:18:56 +08:00
dopamine
79938178dd build: use vue-tsc to generate dts (#16111)
* build: use vue-tsc to generate dts

* reduce inline type declaration

* fix: type checking failed

* apply suggestions from code review

* address PR comments
2024-08-07 12:01:46 +08:00
星如雨
91ee8606fb feat(components): [form-item]: add label-position prop (#17111)
* feat(components): [form-item]: add `label-position` prop

* docs(components): form-item label-position docs

* test(components): form-item

closed form-item label-position test

* Update docs/en-US/component/form.md

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/form.md

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/form.md

Co-authored-by: btea <2356281422@qq.com>

* fix(components): form-item line-height is overridden by the form style
fix(components): form-item label-position style is invalid when label-width is auto

* docs(components):  update form and form-item alignment examples

* Update docs/en-US/component/form.md

Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>

* Update docs/en-US/component/form.md

Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>

---------

Co-authored-by: btea <2356281422@qq.com>
Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
2024-06-24 16:43:02 +08:00
sea / 神秘海
1fdbfd07fa feat(components): [form] export fields (#16755)
* feat(components): [form] export fields

* docs: format

* feat: add test

* Update packages/components/form/src/form.vue

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/form.md

Co-authored-by: btea <2356281422@qq.com>

* Update form.md

---------

Co-authored-by: btea <2356281422@qq.com>
2024-05-07 22:42:51 +08:00
kooriookami
29ae802fae chore(components): fix test warning (#16688) 2024-04-28 14:56:16 +08:00
一只前端汪
00231a5ddd test(components): [form] add validate callback call order test (#16669) 2024-04-26 14:33:59 +08:00
sea / 神秘海
901d6eb65b feat(components): [form] add validate callback promise type (#16652) 2024-04-26 09:54:29 +08:00
otto
434c8d26df fix(components): Add missing export (#16323)
* fix(components): Add missing export

* fix(components): Add missing export

* fix(components): Add missing blank line.
2024-04-25 21:18:05 +08:00
kooriookami
bd1613d599 feat(hooks): add use-aria hooks (#16598)
* feat(hooks): add use-aria hooks

* feat(components): update

* feat(hooks): update

* feat(hooks): update
2024-04-23 13:56:44 +08:00
云淡然
736dfa631f feat(components): [form] FormContext adds the getField method (#14930)
* feat(components): [form] FormContext adds the getField method

* feat(components): [form-item] FormItemContext adds the fieldValue prop

* chore: update FormContext.getField return type
2023-12-31 09:39:31 +09:00
Chen juan
99e8736c6a feat(components): [form-item]Label attribute for judging modification (#14344) 2023-09-21 11:27:15 +08:00
Wu Rui
3c1bd4efc6 fix(components): [form] improve types (#14062)
* fix(components): [form] improve types

* docs: update form

* fix: consider RegExp

* chore: update jsdoc
2023-08-30 13:31:10 +00:00
btea
8c81272851 Revert "refactor(components): [form-label-wrap] use getStyle method (… (#14106)
Revert "refactor(components): [form-label-wrap] use getStyle method (#13913)"

This reverts commit c6a6d9bc6e.
2023-08-26 14:15:27 +08:00
Jackie
9b75335c39 docs(components): [form] modify props description (#13950)
* docs(components): [form] update prop's type

* fix(components): [form] modify props description

---------

Co-authored-by: lvjiaqi <lvjiaqi@itcast.cn>
2023-08-11 21:17:53 +08:00
tiansQAQ
c6a6d9bc6e refactor(components): [form-label-wrap] use getStyle method (#13913) 2023-08-09 20:52:03 +08:00
Wu Rui
01f74e7536 fix(components): [form] improve types (#12549)
* fix(components): [form] improve types

* fix(components): [form] improve FormRules type, support object and array

* fix(components): [form] improve FormRules type with comment

* fix(components): [form] allow number as key in FormRules type

* chore(components): [form] fix FormRules type example

* chore: remove extra import

* chore: update form/custom-validation and form/validation examples

* chore(components): [form] update example
2023-06-11 20:36:27 +08:00
wzc520pyfm
5d0fa75793 docs(components): [form] use new display tag (#13007)
* docs(components): [form] use new display tag

* refactor(components): [form] update boolean default of attribute
2023-06-03 10:57:02 +09:00