tower1229 / Vue-Giant-Tree

🌳 巨树:基于ztree封装的Vue树形组件,轻松实现海量数据的高性能渲染。
http://refined-x.com/Vue-Giant-Tree/
MIT License
660 stars 169 forks source link

jQuery not found #49

Open rysinal opened 2 years ago

rysinal commented 2 years ago

index.html引入jQuery后,启动还是报错:

This dependency was not found:

* jQuery in ./node_modules/vue-giant-tree/dist/vue-giant-tree.common.js

To install it, you can run: npm install --save jQuery
Lq-q commented 1 year ago

这个解决了吗

XiayidanAlimu commented 10 months ago

在安装了jQuery之后,我在vue.config.js里webpack配置plugins的部分添加了以下代码,解决了这个Reference Error: jQuery is not defined

new webpack.ProvidePlugin({
          $: "jquery",
          jQuery: "jquery",
          "window.jQuery": "jquery",
          "window.$": "jquery",
          Popper: ["popper.js", "default"]
      })

image