You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
313 B
11 lines
313 B
const { windowWidth } = uni.getSystemInfoSync();
|
|
|
|
/**
|
|
* @description: 适配屏幕
|
|
* @param {Number} size 尺寸
|
|
* @param {Number} styleWidth 设计稿尺寸,默认750
|
|
* @return {Number}
|
|
*/
|
|
export default function shfitSize(size, styleWidth = 750) {
|
|
return parseInt(size / (styleWidth / windowWidth));
|
|
}
|
|
|