更新记录
1.0.4(2024-03-08)
修正部分不符合规范的代码
1.0.3(2024-03-08)
调整interface.uts文件中接口导出信息。
1.0.2(2024-03-08)
删除interface.uts配置中多余内容
查看更多平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | - | - | 4.4 | 12 | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | - | × | × | × | × |
uni-app x
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | 5.0 | 12 | - | × |
概述
XF-appGrayUTS封装了在哀掉日,全局变灰的逻辑。
插件接口
openGray
开启全局变灰
uni-app项目中(nvue)调用示例:
import { openGray } from "@/uni_modules/XF-appGrayUTS"
openGray({
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { openGray } from "@/uni_modules/XF-appGrayUTS";
import { GrayOptions } from "@/uni_modules/XF-appGrayUTS/utssdk/interface.uts";
let options = {
complete: (res : any) => {
console.log(res)
}
} as GrayOptions;
openGray(options);
可用性
iOS、Android系统
可提供的1.0.0及更高版本
closeGray
关闭全局变灰
uni-app项目中(nvue)调用示例:
import { closeGray } from "@/uni_modules/XF-appGrayUTS"
closeGray({
complete: (res) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { closeGray } from "@/uni_modules/XF-appGrayUTS";
import { GrayOptions } from "@/uni_modules/XF-appGrayUTS/utssdk/interface.uts";
let options = {
complete: (res : any) => {
console.log(res)
}
} as GrayOptions;
closeGray(options);
可用性
iOS、Android系统
可提供的1.0.0及更高版本