gpt4 book ai didi

javascript - 无法使用 select2 4.0 粘贴来插入多个项目

转载 作者:行者123 更新时间:2023-11-29 10:39:59 25 4
gpt4 key购买 nike

Paste 在以前版本的 select2 中工作,考虑到 tokenSeparator 将粘贴的术语拆分为多个标签。

现在,我再也无法让它运行了。

下面是我调用 select2 的方式:

$('select').select2({
tags: true,
multiple: true,
tokenSeparators: [',', ' '],
width: 200
});

示例:http://codepen.io/anon/pen/oXoXqO .尝试粘贴:Gods,Angels,Devils

我还尝试使用 tokenizer 方法,如下所述:Auto tokenize last item in pasted string using select2 ,但出现此错误:select2.js:3503 Uncaught TypeError: 无法读取未定义的属性“term”

最佳答案

这是 select2 4.0.0 中的一个已知问题,在此处报告:https://github.com/select2/select2/issues/3458

关于javascript - 无法使用 select2 4.0 粘贴来插入多个项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30993129/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com