尝试将代码添加到自动扩展文本框时,我收到此错误 - 从此codepen:https://codepen.io/vsync/pen/frudD . 我需要以不同的方式添加它吗?它目前位于vue组件文件中的脚本标记之间 .
Uncaught ReferenceError: $ is not defined
at eval (Pastes.vue?58dd:23)
at Object../node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/pages/pastes/Pastes.vue (app.js:782)
at __webpack_require__ (app.js:679)
at fn (app.js:89)
at eval (Pastes.vue?fa7c:1)
at Object../src/components/pages/pastes/Pastes.vue (app.js:1220)
at __webpack_require__ (app.js:679)
at fn (app.js:89)
at eval (index.js?3672:1)
at Object../src/router/index.js (app.js:1252)
2 回答
确保您正在加载jquery库,您可以关注此guide或此one .
我使用这个代码而不是很好
https://jsfiddle.net/cferdinandi/mqwwpL6u/