修复timeline组件的slot读取

master
yutent 2023-04-28 17:32:38 +08:00
parent 9ee341d09c
commit 64b3d8b678
3 changed files with 3 additions and 3 deletions

View File

@ -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()
// 移除不合法的子组件

View File

@ -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) {

View File

@ -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')