官方给出的那个例子里面,去把 linked: function (target) {
console.log("每次被插入到 custom-ul 时执行,target是 custom-ul 节点实例对象,触发在 attached 生命周期之后", target);
},
linkChanged(target) {
console.log("每次被移动后执行,target是 custom-ul 节点实例对象,触发在 moved 生命周期之后", target);
},
unlinked(target) {
console.log("每次被移除时执行,target是 custom-ul 节点实例对象,触发在 detached 生命周期之后", target);
}
linked: function (target) {
console.log("每次被插入到 custom-ul 时执行,target是 custom-ul 节点实例对象,触发在 attached 生命周期之后", target);
},
linkChanged(target) {
console.log("每次被移动后执行,target是 custom-ul 节点实例对象,触发在 moved 生命周期之后", target);
},
unlinked(target) {
console.log("每次被移除时执行,target是 custom-ul 节点实例对象,触发在 detached 生命周期之后", target);
}
这些函数在官方给出代码片段打印,根本就不输出-------这是个BUG