README
慧呼前端资源库-电话条
[toc]
主页面 | CHANGELOG | 升级文档 | test coverage
传送门: 小手机
引用资源文件之前需要先引用: socket.io.js, jquery
建议在index.min.js
或index.js
后加上?_=当前服务启动时间
, 避免浏览器缓存造成资源的更新不能及时显示到页面上
建议该三个脚本都从资源库引用, 如果当前对 collectionInit.js 和 huihuPhoneCss 中改动较大, 不好迁移的话,可只引用核心 js, 即jquery.wincall.v2.js
引用方式
yarn or npm
# yarn
yarn add @huihu/wincall
# npm
npm i @huihu/wincall -S
# usage
import WinCall from '@huihu/wincall';
import collectionInit from '@huihu/wincall/dist/collectionInit';
import huihuPhoneCss from '@huihu/wincall/dist/huihuPhoneCss';
浏览器
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<!--引用jquery.js-->
<!--引用socket.io.js-->
<!--软电话相关js-->
<script src="http://<DOMAIN>/lib/wincall/1.1.0/jquery.wincall.v2.js?_=<服务启动时间>"></script>
<script src="http://<DOMAIN>/lib/wincall/1.1.0/collectionInit.js?_=<服务启动时间>"></script>
<script src="http://<DOMAIN>/lib/wincall/1.1.0/huihuPhoneCss.js?_=<服务启动时间>"></script>
</head>
</html>
<body>
</body>
</html>