设置页面字体大小(3.0.6+版本生效, 仅支持Android)
import { MicCore } from "@yl/super-jssdk"
MicCore.setTextZoom(optional)
1、该接口无需重复调用,在设置过后,重新打开APP时会使用上一次设置的值
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| optional | Object | 否 | 选填参数 |
optional
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| textZoom | number | 否 | 100为默认大小,>100为放大,<100为缩小 |
| 参数 | 类型 | 作用 |
|---|---|---|
| resolve() | Function | 成功回调 |
| reject(err) | Function | 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"} |
MicCore.setTextZoom()
.then((res) => {
console.log(res);
})
.catch(err => {
console.log('插件调用失败:', err)
})