【问题标题】:I've got a Jquery UI problem with pugx integration in symfony我在 symfony 中的 pugx 集成遇到了 Jquery UI 问题
【发布时间】: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/'
})

我不知道为什么会显示这个错误,有什么想法吗?

【问题讨论】:

    标签: jquery-ui-autocomplete


    【解决方案1】:

    我找到了解决方案。而不是导入'jqueryui/ui/widgets/autocomplete';'我只导入了 jquery-ui

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-18
      相关资源
      最近更新 更多