element-plus [bug report] cascade component, open lazyload = true, checkstrictly = true, click the raido box, and the lazyload method will be executed first

vaj7vani  于 2022-10-21  发布在  其他
关注(0)|答案(1)|浏览(151)

Element Plus version

1.0.2-beta.52

OS/Browsers version

Chrome 90.0.4430.212

Vue version

3.1.2

https://codesandbox.io/s/morning-paper-yt7re

Steps to reproduce

https://codesandbox.io/s/morning-paper-yt7re

What is Expected?

点击raido,不执行lazyLoad,选中当前列,点击每列后面图标,执行lazyLoad

What is actually happening?

点击raido框,会先执行lazyLoad方法

查看源码 cascader-panel/src/node.vue,当前节点node没有loaded,就会执行doLoad,是否应该直接执行else的方法

const handleCheck = (checked: boolean) => { if (!props.node.loaded) { doLoad() } else { doCheck(checked) !checkStrictly.value && doExpand() } }

e0bqpujr

e0bqpujr1#

Translation of this issue:

Element Plus version

1.0.2-beta.52

OS/Browsers version

Chrome 90.0.4430.212

Vue version

3.1.2

https://codesandbox.io/s/morning-paper-yt7re

Steps to reproduce

https://codesandbox.io/s/morning-paper-yt7re

What is Expected?

Click raido, do not execute lazyload, select the current column, and click the icon behind each column to execute lazyload

What is actually happening?

Click the raido box, and the lazyload method will be executed first

Check the source code cascade-panel / SRC / node.vue. If the current node node is not loaded, doload will be executed. Should else be executed directly
`

const handleCheck = (checked: boolean) => {
if (! props.node.loaded) {

doLoad()
} else {

doCheck(checked)
! checkStrictly.value && doExpand()

}
}

`

相关问题