121 Commits

Author SHA1 Message Date
Noblet Ouways
d1a60f599d fix(components): [tree] reconcile parent states in setCheckedKeys (#23697)
closed #22032
2026-03-03 16:49:47 +08:00
Noblet Ouways
e35eb5ad3f fix(components): [tree] focus error after switching tree (#23659)
* fix(components): [tree] focus error after switching tree

* test: set test case

* fix: test case
2026-02-25 10:07:39 +08:00
E66
b5d66fc69d fix(components): [tree] requireNodeKey arg in updateKeyChildren (#23676)
fix(components): [tree]  update `requireNodeKey` param
2026-02-22 21:12:54 +08:00
xiejiahe
8c4aaec835 fix(components): [tree] add optional chains to ensure el$ exists (#23137)
* fix(components): [tree] When a hot update occurs, the element does not exist.

* refactor: simplify

---------

Co-authored-by: Dsaquel <291874700n@gmail.com>
2025-12-18 21:35:24 +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
rzzf
d07d16dded perf(components): [tree] resolve memory leak occurring after data update (#23055) 2025-12-10 23:06:31 +01:00
rzzf
8d8174ce3a fix(components): [tree] checkbox selection wrong with disabled nodes (#22711)
* fix(components): [tree] checkbox selection wrong with disabled nodes

* fix: 19435

* refactor: remove useless code

* fix: correctly handle lazy mode and default-checked-keys

* test: update
2025-11-16 09:28:11 +08:00
Rainbow
5761f4257b fix(components): [tree] avoid having multiple nodes with highlighted states at the same time (#22748)
* fix(components): avoid having multiple nodes selected at the same time

* test: add test case

* test: update

---------

Co-authored-by: rzzf <cszhjh@gmail.com>
2025-11-11 11:25:19 +08:00
Kylin
4a4708c4a1 refactor(components): [tree] change the for loop to the find method (#22678) 2025-11-04 11:25:48 +08:00
Kylin
6c22020848 refactor(components): [tree] extract auxiliary function (#22677) 2025-11-04 10:25:25 +08:00
xingyixiang
b61d9c5b89 fix(components): [tree] optimize tree-select empty detection (#22302)
* fix(components): [tree] optimize tree-select empty detection

* test(components): [tree] render slot empty

* test(components): [tree] render slot empty
2025-10-22 10:20:41 +08:00
Zhong
a65d218e22 refactor(components): [tree] improve emit to get type hints (#22526)
* refactor(components): [tree] improve emit to get type hints

* chore: update

* fix: update

* chore: revert example

* docs: update type

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

* chore: rename event

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

---------

Co-authored-by: Dsaquel <291874700n@gmail.com>
Co-authored-by: btea <2356281422@qq.com>
2025-10-20 14:43:47 +08:00
Zhong
3538d7f9d2 improvement(components): [tree] allow null as key in setCurrentKey (#22524) 2025-10-20 09:16:15 +08:00
scvzerng
328523e291 fix(components): [tree] correct drop indicator with tree scroll offset (#21947) 2025-09-29 12:34:43 +02: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
qiang
9043e16d94 fix: the KeyboardEvent.code is always empty string on Android (#22228)
closed #20330
2025-09-21 01:23:38 +02:00
Ben Lau
64a0c61917 fix(components): [tree] correctly determine the drop type of tree node (#21717)
Co-authored-by: liubaobin <liubaobin@wps.cn>
2025-09-14 00:29:49 +02:00
Spaceman
630c18ff25 fix(components): [tree] up/down keys stop working after expanding nodes (#21526)
* fix(components): [tree] Up/Down keys stop working after expanding nodes

Fix issue #21514

* fix(components): [tree] Up/Down keys stop working after expanding nodes

* fix(components): [tree] Up/Down keys stop working after expanding nodes
2025-08-01 10:37:59 +08:00
Spaceman
719f8ed5b5 fix(components): [tree]: fix dynamic binding defaultCheckedKeys trigger rerender (#21503)
* fix(components): [tree]: Fix Dynamic Binding Expression

Fix issue #21130

* fix(components): [tree]: Fix Dynamic Binding Expression

* fix(components): [tree]: Fix Dynamic Binding Expression

* fix(components): [tree]: Fix Dynamic Binding Expression
2025-07-28 00:08:38 +02:00
Spaceman
e34cd311ef fix(components): [tree] keyboard nav broken after filter/collapse (#21377)
* fix(components): [tree] keyboard nav broken after filter/collapse

Fix issues #21376

* fix(components): [tree] keyboard nav broken after filter/collapse

* fix(components): [tree] keyboard nav broken after filter/collapse

* Update packages/components/tree/src/model/node.ts

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

* Update packages/components/tree/src/model/node.ts

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

* fix(components): [tree] keyboard nav broken after filter/collapse

* fix(components): [tree] add test cases

* fix(components): [tree] keyboard nav broken after filter/collapse

* fix(components): [tree] keyboard nav broken after filter/collapse

---------

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
2025-07-21 10:17:32 +08:00
Zhong
58a5852d2d refactor(components): improve component boolean type (#21260) 2025-07-06 14:56:17 +02:00
Noblet Ouways
c57b0cab42 refactor(components): [tree] remove ts-nocheck (#21097)
* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: fix

* chore: fix

* chore: cleanup

* chore: fix

* fix: review

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

---------

Co-authored-by: btea <2356281422@qq.com>
2025-06-24 15:01:53 +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
betavs
8f380ce884 refactor(components): standardize injection keys (#20616) 2025-06-06 14:45:39 +08:00
Anod Chow
91ffdbfca6 fix(components): [tree] filter update scheduling error (#20267)
* Update tree-store.ts

fix: the bug #20259 
Ensure the sequence for the traverse step.

* fix(components): [tree] filter update scheduling error

fix(components): [tree] fix bug #20259
Ensure the sequence for the traverse step. If call the traverse without await, the code below will run before the children had been processed, making the parent node invisible.
2025-04-27 16:47:35 +08:00
betavs
3a3db6e564 refactor(components): use built-in methods to check for undefined and null (#20537)
style(components): check the undefined type for unification
2025-04-24 22:51:58 +08:00
Noblet Ouways
938d69626f fix(components): [tree] enable ellipsis on label (#20496)
* fix(components): [tree] enable ellipsis on label

* chore: revert

* Update packages/components/tree/src/tree-node-content.vue

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

* chore: add text style in tree

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

---------

Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>
2025-04-22 16:48:23 +08:00
dopamine
d8e49e5837 fix(components): [tree] retain DOM nodes only in their intended scope (#20494)
fix(components): [tree] retain the reference to DOM nodes only in its intended scope
2025-04-22 11:23:34 +08:00
dopamine
22c3abc32d fix(components): [tree] stop propagating click event to parent node (#20506)
fix(components): [tree] stop propagating click event to parent
2025-04-21 17:19:13 +08:00
Noblet Ouways
93308e46b7 fix(components): [tree] ensure no checked nodes in regular tree (#20311)
* fix(components): [tree] ensure no checked nodes in regular tree

* chore: fixup

* fix: test
2025-04-03 17:21:07 +08: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
sea
244e811b44 chore(eslint-config): add line-between-blocks rules (#20051) 2025-03-08 08:55:02 +08:00
Noblet Ouways
0ed86e74ce feat(components): [tree/tree-select] add check-on-click-leaf attribute (#19494)
* chore: last leaf node clickable on `show-checkbox`

* chore: revert

* chore: leaf node checkable

* test: checkable by click on leaf node

* chore: test & doc

* chore: add version

* feat: handle tree-v2

* test: tree-v2
2025-02-26 21:24:58 +08:00
sea
cffc025415 fix(components): [tree-select] search solve memory leak (#19895)
* fix(components): [tree-select] search solve memory leak

* feat: update

* fix: test

* chore: update test
2025-02-20 11:37:41 +08:00
jiaxiang
d676ca4897 chore: [tree] export types (#19846)
* chore: [tree] export type and fix the type error of the docs

* revert: revert

* revert: revert
2025-02-17 09:10:47 +08:00
jiaxiang
51d3e83a51 chore(components): [tree] remove ts-nocheck and fix type error (#19777)
* chore(components): [tree] remove ts-nocheck and fix type error

* refactor: refactor

---------

Co-authored-by: btea <2356281422@qq.com>
2025-02-10 20:51:10 +08:00
jiaxiang
a5f77e6e31 chore: [tree] remove unused arg (#19255) 2025-01-16 10:44:46 +08:00
qiang
343cacf5cc fix(components): numpadEnter does not work like the Enter (#18855) 2024-11-14 21:14:51 +08:00
jiaxiang
dab6b73040 refactor: replace type checking with built-in functions (#18720)
* refactor: replace typeof string with the built-in isString

* refactor: replace typeof boolean with the built-in isBoolean

* refactor: replace typeof undefined with the built-in isUndefined

* chore: style

* chore: style
2024-10-31 09:21:21 +08:00
jiaxiang
36bd70670e refactor: replace typeof fn with the built-in isFunction (#18705) 2024-10-30 08:42:04 +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
momei
dc7a7aa91b fix(components): [tree] highlight the corresponding node after data reset (#18578)
* fix(components): [tree] keep it highlighted when the tree reset

* fix(components): [tree] add test case
2024-10-23 12:26:07 +08:00
xuan
27bdf1f076 fix(components): [el-tree-select] fix lazy and multiple select node (#17903)
* fix(components): [el-tree-select] fix lazy and multiple select node

1.Fix the issue where non-leaf nodes cannot be selected when using lazy and multiple together.

2. Since the original code did not handle the selection of non-leaf nodes before expanding
lazy-loaded child nodes, additional processing was added to link the selection of parent and child
nodes.

3. Because the time required for lazyLoad after nodeExpand cannot be predicted, the triggering time
of the node-expand event in the tree has been adjusted to occur within the callback of the expand
function. This change only affects the timing when using lazyLoad.

BREAKING CHANGE :
no

closed closed Fixes #17232

* fix: test typecheck

* fix: onNodeExpand event and update function name
2024-09-01 20:59:31 +08:00
dopamine
8618a6bcd0 refactor: import shared utilities from @element-plus/utils (#18048)
chore: import shared utilities from `@element-plus/utils`
2024-08-29 09:04:03 +08:00
Simon He
4984d1b014 fix(components): tree nodesMap leak (#10195)
Co-authored-by: qiang <qw13131wang@gmail.com>
2024-08-18 15:27:34 +08:00
sea
b93e59b065 fix(components): [tree] FireFox dargging dataTransfer judge (#17849)
* feat(components): [tree] FireFox dargging dataTransfer judge

* feat: add remark
2024-08-14 11:47:26 +08:00
betavs
8c9165a93a fix(components): [tree] instance type missing (#17882) 2024-08-13 20:28:52 +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
xuan
9f891192e6 fix(components): [tree] check isLeaf using lazy and default-expand-all (#17585)
fix(components): check isLeaf using lazy and default-expand-all

Fixes the issue where the isLeaf parameter was not checked when using lazy and default-expand-all.

In the current implementation, when default-expand-all is set to true and lazy loading is enabled,
the ElTree component expands nodes without considering the isLeaf parameter. This can lead to
unnecessary loading of leaf nodes.

This fix adds a check for the isLeaf parameter to prevent loading children for nodes marked as leaf
nodes.

This fix improves performance and avoids unnecessary network requests or data processing for nodes
already known to be leaf nodes.

BREAKING CHANGE :
There are no breaking changes introduced by this fix.

closed None.
2024-08-06 16:56:01 +08:00
btea
0484b80e78 fix(components): [tree]calling method to expand node accordion mode fail (#17441) 2024-07-19 15:20:47 +08:00