project init

This commit is contained in:
zxy
2024-02-02 10:24:54 +08:00
commit 21a84c3035
253 changed files with 25212 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
}
}