From 64b3d8b6786c2f1a002cda0cdb41c7dc548b893e Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 28 Apr 2023 17:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtimeline=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84slot=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/index.js | 2 +- src/tabs/index.js | 2 +- src/timeline/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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')