提交 1e4bc6e1 编写于 作者: D DCloud_LXH

fix(mp-toutiao): resolve lifetimes error fix #3348

上级 456d2357
......@@ -28,7 +28,7 @@ function initTriggerEvent (mpInstance) {
function initHook (name, options, isComponent) {
if (__PLATFORM__ === 'mp-toutiao') {
// fix by Lxh 字节自定义组件Component构造器文档上写有created,但是实测只触发了lifetimes上的created
isComponent && (options = options.lifetimes)
isComponent && options.lifetimes && options.lifetimes[name] && (options = options.lifetimes)
}
const oldHook = options[name]
if (!oldHook) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册