调用OnPanelDeactive/OnPanelActive之前判断