mouse-vue-tool
v1.0.5
Published
提供了vue websock连接、重连、心跳, tesseract.js 图片文字识别封装 相关的功能
Downloads
4
Readme
Basic usage
1.install SDK using npm
npm install mouse-vue-tool --save
2.for example:
//websock;
import { ws } from "mouse-vue-tool";
const client = new ws(url,()=>{});
//tesseract.js; 图片文字识别
import { tesseract } from "mouse-vue-tool";
const client = new tesseract({picUrl:'',callback:()=>{}});
//xlsx; 导出excel文件
import { exportFile } from "mouse-vue-tool";
const exportName = 'example.xlsx';
const exportData = [
['姓名', '成绩', '', ''],
['姓', '名', '科目1', '科目2'],
['张', '三', 80, 90],
['李', '四', 70, 85]
];
const headerMerges = [
{ s: { r: 0, c: 0 }, e: { r: 0, c: 1 } },
{ s: { r: 0, c: 2 }, e: { r: 0, c: 3 } },
{ s: { r: 1, c: 2 }, e: { r: 1, c: 3 } }
];
new exportFile({
exportName:exportName,
exportData:exportData,
headerMerges:headerMerges
});
//upload.js; 图片上传
import { upload } from "mouse-vue-tool";
this.oss = new upload({
o:this,
module:'module',
apiRequest:assumeRole,
bucket:'bucket',
region:'region',
dir:'parking/',
});
this.oss.put(option);