引入
import {
getPageTotal,
getComponentInfo,
saveMpImage
} from 't-comm';
// or
import {
getPageTotal,
getComponentInfo,
saveMpImage
} from 't-comm/lib/mp/index';
# getPageTotal(dist)
描述:
统计页面总数、分包数目等
参数:
参数名 |
---|
dist |
返回:
result
示例
getPageTotal('./dist/dev/mp-weixin')
# getComponentInfo(dist)
描述:
统计组件数目、wxml大小、wxss大小、js大小等
参数:
参数名 |
---|
dist |
返回:
result
示例
getComponentInfo('./dist/dev/mp-weixin')
# saveMpImage(url, options)
描述:
小程序下保存图片
参数:
参数名 | 类型 | 描述 |
---|---|---|
url | string | 图片地址 |
options | object | 提示选项 |
示例
saveMpImage('https://xxx.png');