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.
21 lines
779 B
21 lines
779 B
6 months ago
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
exports.transformAttr = void 0;
|
||
|
const uni_cli_shared_1 = require("@dcloudio/uni-cli-shared");
|
||
|
const shared_1 = require("@vue/shared");
|
||
|
const transformAttr = (node, _) => {
|
||
|
if (!(0, uni_cli_shared_1.isElementNode)(node)) {
|
||
|
return;
|
||
|
}
|
||
|
node.props.forEach((prop) => {
|
||
|
if ((0, uni_cli_shared_1.isAttributeNode)(prop) && prop.value) {
|
||
|
switch (prop.name) {
|
||
|
case 'style':
|
||
|
prop.value.content = (0, shared_1.stringifyStyle)((0, shared_1.parseStringStyle)(prop.value.content)).slice(0, -1); // 移除最后一个分号,省点大小吧
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
exports.transformAttr = transformAttr;
|