升级uni-ui到最新版本1.5.7

This commit is contained in:
RuoYi
2025-03-25 16:58:54 +08:00
parent dae8945a43
commit 315832d151
127 changed files with 7327 additions and 5066 deletions

View File

@@ -40,8 +40,13 @@
*/
export default {
name: 'uniTh',
options: {
virtualHost: true
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
components: {
// #ifdef H5
@@ -106,8 +111,13 @@ export default {
if (this.width.match(regexHaveUnitPx) !== null) { // 携带了 px
return this.width.replace('px', '')
} else if (this.width.match(regexHaveUnitRpx) !== null) { // 携带了 rpx
let numberRpx = Number(this.width.replace('rpx', ''))
let widthCoe = uni.getSystemInfoSync().screenWidth / 750
let numberRpx = Number(this.width.replace('rpx', ''))
// #ifdef MP-WEIXIN
let widthCoe = uni.getWindowInfo().screenWidth / 750
// #endif
// #ifndef MP-WEIXIN
let widthCoe = uni.getSystemInfoSync().screenWidth / 750
// #endif
return Math.round(numberRpx * widthCoe)
} else if (this.width.match(regexHaveNotUnit) !== null) { // 未携带 rpx或px 的纯数字 String
return this.width