san组件能否提供一个方法主动销毁自己? #606
HarryYin91610
started this conversation in
San
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
因为有种情况是,san组件在一个页面里,监听页面的destroy事件需要主动把自己销毁掉,目前文档里没有找到这个API,我现在是这么做的,不知道可不可行:
if (window.page && typeof window.page.one === 'function') { window.page.one('destroy', function () { me.detach(document.body); }); }
Beta Was this translation helpful? Give feedback.
All reactions