Usefull Lib Js Plugin

Posted by Learning libs on August 28, 2021

vanilla-lazyload

图片懒加载

LazyLoad is a lightweight (2.4 kB) and flexible script that speeds up your web application by deferring the loading of your below-the-fold images, videos and iframes to when they will enter the viewport.

clamp.js

文字过长截取且追加… Clamps (ie. cuts off) an HTML element’s content by adding ellipsis to it if the content inside is too long.

qrcode.js

将url转化生产二维码

pdf.js

https://github.com/mozilla/pdf.js

将文档转化成图片

moment

https://github.com/moment/moment

A JavaScript date library for parsing, validating, manipulating, and formatting dates.

better-scroll

https://github.com/ustbhuangyi/better-scroll

BetterScroll is a plugin which is aimed at solving scrolling circumstances on the mobile side (PC supported already). The core is inspired by the implementation of iscroll, so the APIs of BetterScroll are compatible with iscroll on the whole. What’s more, BetterScroll also extends some features and optimizes for performance based on iscroll.

i18n实现前端国际化

https://www.jianshu.com/p/ea93efef5155

axios / fetch

https://github.com/axios/axios

http://www.axios-js.com/docs/#axios-request-config