tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.

Home Page:https://www.naiveui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

n-select组件添加失焦后更新值属性

Mobaiyufengfei opened this issue · comments

Clear and concise description of the problem

n-select可以添加一个属性让用户选择是在失焦后更新绑定值还是实时更新绑定值

Suggested solution

与n-input-number的update-value-on-input一样,为false代表失焦后更新绑定值,为true代表实时更新绑定值

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

@Mobaiyufengfei 这种是不是只适用于多选的情况下

image

期望的是多选时点击选中,但图中马赛克区域的输入框不更新, 等失焦时更新 ?

@Mobaiyufengfei 这种是不是只适用于多选的情况下

不是多选,就是我可以切换好几次我选中的select选项,这个过程中input框中显示的值是会随着更新的,但是不会触发绑定值的更新,等到我点组件外面的区域,让组件失去焦点后再更新绑定的值

@Mobaiyufengfei 这种是不是只适用于多选的情况下

不是多选,就是我可以切换好几次我选中的select选项,这个过程中input框中显示的值是会随着更新的,但是不会触发绑定值的更新,等到我点组件外面的区域,让组件失去焦点后再更新绑定的值

你这需求跟vue的双向绑定不搭,不过我觉得你可以使用自定义渲染option实现