我使用外部数组来指定Select2下拉列表的数据,但它始终给出以下错误。我正在使用最新的Select2 v4.0.3,所以我不知道问题出在哪里。任何帮助都是非常感谢的。相关代码如下所示。请注意,我尝试使用<input>元素,代码按预期工作。
select2.min.js:21 Uncaught Error: Option 'data' is not allowed for Select2 when attached to a <select> element.
at String.<anonymous> (select2.min.js
在我的webpack.mix.js中,我有这样的东西:
// vue components
mix.js('resources/assets/js/app.js', 'public/js');
// scripts which I need
mix.scripts([
'resources/assets/js/jquery-2.2.4.min.js',
'resources/assets/js/bootstrap.min.js',
'resources/assets/js/fastclick.js
我尝试过许多不同的方法,但似乎没有什么效果。
我得到了以下错误:
TypeError: Cannot read property 'length' of undefined
at select.js:1560
at m.$broadcast (angular.js:18487)
at Object.ctrl.select (select.js:673)
at fn (eval at compile (angular.js:15358), <anonymous>:4:453)
at e (angular.js:26994)
at b.$eval (angular.js
我试图实现这一点:
我不做SPA,虽然我在我的页面中使用Vue组件。
Vue警告:挂载钩子中的错误:"TypeError:$(.).select2不是函数“
找到位置
我知道这个错误
Error in mounted hook: "TypeError: $(...).select2 is not a function"
found in <Select2> at
C:\laragon\www\lara\resources\assets\js\components\ui\Select2.vue
我将select2和vuejs都包含在html文件中
我想结合使用Select2和Vue.js来显示一些可选选项,但是无论我如何实现它,总是会出现错误: Uncaught ReferenceError: select2 is not defined
at Object.select2 (external "select2":1)
at __webpack_require__ (bootstrap:766)
at fn (bootstrap:129)
at Module../src/jquery.js (jquery.js:3)
at __webpack_require__ (bootstrap:766)
at fn (boot
我刚刚开始使用Vue.js,并使用Vue CLI3创建了一个项目。目标是最终将我当前的应用程序迁移到Vue。我正在试验jQuery和Select2,因为这是在我当前的应用程序中使用的,我想知道这种方法是否正确,为什么我仍然会收到编译错误,即使它看起来很有效。注意:我确实通过Vue UI安装了jQuery依赖项。
以下是我所拥有的:
main.js
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from
在将bootstrap-select.min.js版本从1.12.4升级到1.13.1之后,我站点上所有高度样式的控件都被破坏了。如果我包含1.12.4/js/bootstrap-select.min.js,但不包括1.13.1/js/bootstrap-select.min.js,则高度的样式是正确的。
所有CDN都来自。
我用的是Bootstrap 4
升级包括
bootstrap-select/1.13.1/css/bootstrap-select.min.css
// controls height is broken when using t
我正在学习django和我有一个名为Song的模型,它有很多到很多领域的singer。现在,在管理部分,我为这个字段提供了一个简单的多选择字段。
现在,我想改变多选择字段起诉。
我还为歌手领域添加了一个类,通过这样做:
forms.py
class SongForm(forms.ModelForm):
class Meta:
model = Song
fields = ['title', 'lyrics', 'singer']
widgets = {
'sin
我正在使用ui-select2,并试图在单击编辑按钮时打开新页面。我看到了一些奇怪的问题。当我第一次打开新页面时,它可以正常打开,但当我取消它并再次打开同一页时,通过单击编辑,它给我以下错误:
select2.full.min.js:3 The select2('destroy') method was called on an element that is not using Select2
angular.js:13708 TypeError: Cannot read property 'destroy' of undefined
at n.a.fn.se