element-plus [Component] [select] el-select使用clearable清空后,类型变为undefined

but5z9lq  于 2个月前  发布在  其他
关注(0)|答案(4)|浏览(30)

Bug Type: Component

Environment

  • Vue Version: 3.3.4
  • Element Plus Version: 2.6.3
  • Browser / OS: chrom:114.0.5735.91
  • Build Tool: Vite

Reproduction

  • el-select

Element Plus Playground

Steps to reproduce

开始打印变量类型是string 选择一个后使用clearable清空后,类型变为undefined

What is Expected?

还是空string

What is actually happening?

变为undefined

Additional comments

(empty)

iezvtpos

iezvtpos1#

value-on-clear可以配置清空后回填什么值, :value-on-clear="''"

a5g8bdjr

a5g8bdjr2#

使用 value-on-clear
demo

a1o7rhls

a1o7rhls3#

我看这个属性在2.7.0才有,目前我们在2.6.3,必须要更新呗

irlmq6kh

irlmq6kh4#

value-on-clear可以配置清空后回填什么值, :value-on-clear="''"

好用

相关问题