提交 3f47718b 编写于 作者: Q qiang

fix: 解决 class 名称中含有 rpx 不生效的问题 question/96981

上级 61d4b4c4
...@@ -242,8 +242,7 @@ function processCss(css) { ...@@ -242,8 +242,7 @@ function processCss(css) {
.replace(VAR_WINDOW_TOP, offset.top + 'px') .replace(VAR_WINDOW_TOP, offset.top + 'px')
.replace(VAR_WINDOW_BOTTOM, offset.bottom + 'px') .replace(VAR_WINDOW_BOTTOM, offset.bottom + 'px')
} }
return css return css.replace(/\{.+?\}/gs, css => css.replace(UPX_RE, function (a, b) {
.replace(UPX_RE, function(a, b) {
return uni.upx2px(b) + 'px' return uni.upx2px(b) + 'px'
}) }))
} }
...@@ -250,9 +250,9 @@ function processCss(css) { ...@@ -250,9 +250,9 @@ function processCss(css) {
.replace(BODY_SCOPED_RE, page) .replace(BODY_SCOPED_RE, page)
.replace(BODY_RE, '') .replace(BODY_RE, '')
.replace(PAGE_SCOPED_RE, 'body.' + page + ' uni-page-body') .replace(PAGE_SCOPED_RE, 'body.' + page + ' uni-page-body')
.replace(UPX_RE, function(a, b) { .replace(/\{.+?\}/gs, css => css.replace(UPX_RE, function (a, b) {
return uni.upx2px(b) + 'px' return uni.upx2px(b) + 'px'
}) }))
} }
function getPage() { function getPage() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册