提交 29dd7b43 编写于 作者: 谢敏 提交者: 折腾笔记

fix(H5): 修复h5端部分rpx单位没有转化为px的问题

上级 c8f53740
......@@ -246,7 +246,7 @@ function processCss(css) {
.replace(VAR_WINDOW_LEFT, '0px')
.replace(VAR_WINDOW_RIGHT, '0px')
}
return css.replace(/\{[\s\S]+?\}|@media.+\{/g, function (css) {
return css.replace(/\{[\s\S]+?\}|@media[^{]+/g, function (css) {
return css.replace(UPX_RE, function (a, b) {
return uni.upx2px(b) + 'px'
})
......
......@@ -253,7 +253,7 @@ function processCss(css) {
.replace(BODY_SCOPED_RE, page)
.replace(BODY_RE, '')
.replace(PAGE_SCOPED_RE, 'body.' + page + ' uni-page-body')
.replace(/\{[\s\S]+?\}|@media.+\{/g, function (css) {
.replace(/\{[\s\S]+?\}|@media[^{]+/g, function (css) {
if(typeof uni === 'undefined'){
return css
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册