我正在使用引导标签输入
我正在尝试动态添加标签。
$('.div-tag').tagsinput('add', 'vino');
上面的代码工作正常,但是当我尝试下面的代码时:
$('.div-tag').tagsinput('add', { id: 1, text: 'some tag' });
我得到错误:
Uncaught Can't add objects when itemValue option is not set
请帮我添加带有 id 和 value 的标签。