Skip to content

Commit

Permalink
rollback scoped changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Feb 8, 2018
1 parent a60e44b commit acc643e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/wepy-cli/src/compile-wpy.js
Expand Up @@ -559,13 +559,13 @@ function walkNode (node, moduleId) {
if (node.childNodes) {
[].slice.call(node.childNodes || []).forEach((child) => {
if (child.tagName) {
if (child.hasAttribute('class') || child.hasAttribute('v-bind:class.once') || child.hasAttribute(':class')) {
// scoped 情况下,可能直接把样式绑定到节点上。
// if (child.hasAttribute('class') || child.hasAttribute('v-bind:class.once') || child.hasAttribute(':class')) {
// 是标签 则增加class
const cls = child.getAttribute('class');
child.setAttribute('class', (cls + ' ' + moduleId).trim());
walkNode(child, moduleId);

}
// }
walkNode(child, moduleId);
}
});
}
Expand Down

0 comments on commit acc643e

Please sign in to comment.