This commit is contained in:
18500206848
2024-02-02 14:44:30 +08:00
parent 6647042acb
commit 91172a730c
255 changed files with 24805 additions and 0 deletions

22
untils/func.js Normal file
View File

@@ -0,0 +1,22 @@
const windowWidth = uni.getSystemInfoSync().windowWidth
class func {
/**
* rpx转换为px
* @param rpx
* @returns {number}
*/
static rpxTopx(rpx) {
return (windowWidth / 750) * rpx;
}
}
/**
* 通用工具类
*/
export default {
install(Vue, options) {
// 4. 添加实例方法
Vue.prototype.$util = func
}
}