1

有没有办法在 Vue Formulate 的下拉列表中选择多个选项?我在 github 上遇到了这段代码,它让我可以选择多个选项,但我不知道如何将它变成下拉列表(Vue Formulate 中的选择)。

这是我遇到的代码。

<FormulateInput
name="example"
type="select"
:options="{first: 'First', second: 'Second'}"
label="Reproduction template!"
help="Click 'Use This Template' and reproduce your issue!"
multiple
size=1
/>

看起来像这样

想要变成这样

4

1 回答 1

4

Vue Formulate 的核心维护者之一。Vue Formulate 渴望成为所有原生 HTML 输入类型的标准 API。您问题中的第二个屏幕截图不是本机输入。我们将其称为“合成”输入,其中在 UI 中表示了一堆非本机功能。

可以使用 Vue Formulate 执行类似的操作,但需要将自定义输入类型注册为插件。这不是核心 Vue 公式库中包含的东西。

于 2020-09-01T19:40:07.767 回答