【发布时间】:2021-11-17 12:59:03
【问题描述】:
我认为这是加载 jquery UI 的问题。我正在实施Pugx,当我启动纱线开发时,我遇到了这个错误:
autocompleter-jqueryui.js:18 Uncaught TypeError: $fakeInput.autocomplete is not a function
在我的 app.js 中:
import $ from 'jquery';
import 'jquery-ui';
import '@pugx/autocompleter-bundle/js/autocompleter-jqueryui';
在 webpack.config.js 我添加了 '.autoProvidejQuery()'。
这是我的 js.file :
import $ from 'jquery';
$('#postal_code_zipcode').autocompleter({
url_list: '/author_search',
url_get: '/author_get/'
})
我不知道为什么会显示这个错误,有什么想法吗?
【问题讨论】: