【问题标题】:jQuery UI: "base is not a constructor"jQuery UI:“基础不是构造函数”
【发布时间】:2018-11-24 03:55:01
【问题描述】:

我已经使用npm 安装了 jQuery 和 jQuery UI。在我自己的一个 JS 模块中尝试 require('jquery-ui/ui/widgets/selectable') 时,我收到以下错误消息:

TypeError: base is not a constructor (widget.js:108)

我错过了什么?

【问题讨论】:

  • jQRangeSlider 5.5.0 也有这个问题。您的解决方案有效:)

标签: jquery-ui npm jquery-ui-selectable


【解决方案1】:

为了解决这个问题,我还必须 require('jquery-ui/ui/widgets/mouse') 这是 selectable 的依赖项,但在需要后者时不会自动加载。

【讨论】:

  • yarn一样!
猜你喜欢
  • 2022-12-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-07-23
  • 1970-01-01
  • 2012-01-02
  • 2017-08-17
  • 2017-10-27
相关资源
最近更新 更多