Ale*_*Kim 5 vue.js intersection-observer
如何使用:https://github.com/w3c/IntersectionObserver/tree/master/polyfill
我应该将其加载到webpack配置-vue.config.js中还是应该使用导入将其加载到.vue模板中?
npm install intersection-observer
Run Code Online (Sandbox Code Playgroud)
将此行添加到条目文件的顶部(例如main.js)
import 'intersection-observer/intersection-observer';
Run Code Online (Sandbox Code Playgroud)
就这样。
| 归档时间: |
|
| 查看次数: |
267 次 |
| 最近记录: |