diff --git a/src/sandbox/index.js b/src/sandbox/index.js index 68a0d20..a3d63d9 100644 --- a/src/sandbox/index.js +++ b/src/sandbox/index.js @@ -151,7 +151,7 @@ class Sandbox extends Component { created() { bind(this.root, 'slotchange', ev => { - let slot = ev.target.assignedNodes().pop() + let slot = ev.target.assignedElements().pop() // 移除不合法的子组件 diff --git a/src/tabs/index.js b/src/tabs/index.js index 41259ef..5feabba 100644 --- a/src/tabs/index.js +++ b/src/tabs/index.js @@ -477,7 +477,7 @@ class Tabs extends Component { created() { bind(this.root, 'slotchange', ev => { - let children = ev.target.assignedNodes() + let children = ev.target.assignedElements() // 移除不合法的子组件 for (let it of children) { diff --git a/src/timeline/index.js b/src/timeline/index.js index 3a8a2e1..3175ec2 100644 --- a/src/timeline/index.js +++ b/src/timeline/index.js @@ -34,7 +34,7 @@ class Timeline extends Component { ] created() { bind(this.root, 'slotchange', ev => { - let children = ev.target.assignedNodes() + let children = ev.target.assignedElements() children.forEach((it, i) => { it.removeAttribute('last')