ViewUI icon indicating copy to clipboard operation
ViewUI copied to clipboard

[Bug Report]Cascader组件中的value为Number增加filterable之后选择报错

Open yanglisunny opened this issue 5 years ago • 2 comments

Environment

win7 chrome81 vue2.5.2

Reproduction link

https://run.iviewui.com/Mi3KJmlp

Steps to reproduce

搜索北京 , 然后选择北京

What is expected?

选中北京

What is actually happening?

报错

yanglisunny avatar Apr 24 '20 08:04 yanglisunny

https://github.com/view-design/ViewUI/blob/fbff33d45ec8861d955c6963f658268e1ea51a5e/src/components/cascader/cascader.vue#L355 这里简单的将收集到的值拼接成了string(https://github.com/view-design/ViewUI/blob/fbff33d45ec8861d955c6963f658268e1ea51a5e/src/components/cascader/cascader.vue#L228
然后做了split,数据类型都成string了,如果之前是number,会对应不上(或者报错);只能自己将数据(value)统一string(没有既存在number又存在string的情况下)

(话说value直接存成数组再直接取出来用不好么。。。)

youzai0401 avatar Sep 26 '21 09:09 youzai0401

这个问题官方还没处理 @icarusion
data 数据第一级搜索会报错,超过第一级没这个问题

pangxieju avatar Dec 21 '21 07:12 pangxieju