【问题标题】:How to give the user the ability to edit already selected data in the vue-select component?如何让用户能够在 vue-select 组件中编辑已经选择的数据?
【发布时间】:2019-08-20 01:44:10
【问题描述】:

我有 vue-select 组件:https://sagalbot.github.io/vue-select/ 我想让我的用户能够编辑已经选择的数据,我在文档中没有找到这样的机会,也许有人处理过这个组件并会告诉。

<v-select :options="myOptions" taggable v-model="value" </v-select>

enter image description here

【问题讨论】:

  • 为什么有人要编辑选定的数据?即使您输入了一些内容,您也只能从定义的列表中选择值。
  • 因为不仅有列表中的值,还有用户可以输入的值
  • 好的,我会在下面发布答案。

标签: javascript vue.js vue-component


【解决方案1】:

维护者回答说现在没有这种可能了。

https://github.com/sagalbot/vue-select/issues/806

【讨论】:

    【解决方案2】:

    该功能称为“标记”,Vue Select 通过 taggable 属性支持它:

    <v-select taggable></v-select>
    

    它也在文档中,如果您想查看并了解更多信息:Vue Select - Tagging

    【讨论】:

    • 我使用可标记的。见上文^^
    猜你喜欢
    • 2015-11-02
    • 2019-05-27
    • 1970-01-01
    • 1970-01-01
    • 2020-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-29
    相关资源
    最近更新 更多