Closed suwei0708 closed 4 years ago
Changing .replace(...)
to the replace
function seems to work:
div {
.rotate(45deg);
}
.rotate(@Angle) {
.transform-single(rotate, @arguments);
}
.transform-single(@transform-function, @rest...) {
@args: replace(~"@{rest}", "[\[\]]", ""); // <====== HERE
-webkit-transform: ~"@{transform-function}(@{args})";
-moz-transform: ~"@{transform-function}(@{args})";
-ms-transform: ~"@{transform-function}(@{args})";
transform: ~"@{transform-function}(@{args})";
}
.rotate(45deg); //编译报错 .rotate(@angle) { .transform-single(rotate, @arguments); } .transform-single(@transform-function, @rest...) { @args: ~
"@{rest}".replace(/[\[\]]/g, "")
; -webkit-transform: ~"@{transform-function}(@{args})"
; -moz-transform: ~"@{transform-function}(@{args})"
; -ms-transform: ~"@{transform-function}(@{args})"
; transform: ~"@{transform-function}(@{args})"
; }使用easy-less编译报错,koala编译正确。有什么解决办法吗?