dengzedong
2024-12-23 6940bdec72ef961c2103947986bf30eaf2341205
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// 如果使用wujie-vue
// import WujieVue from 'wujie-vue3';
// const { bus } = WujieVue;
 
const lifecycles = {
  beforeLoad(appWindow: any) {
    // 第一次子应用的时候执行
    // 打开加载动画
  },
  beforeMount() {
    // console.log('beforeMount()-----------------');
  },
  afterMount(appWindow: any) {
    console.log(appWindow)
    // 自应用第一次挂载到页面上之后执行(后续会缓存,不会执行)
    // 关闭加载动画
  },
  beforeUnmount(appWindow: any) {
    // console.log('beforeUnmount()-----------------');
  },
  afterUnmount(appWindow: any) {
    // console.log('afterUnmount()-----------------');
  },
  activated(appWindow: any) {
    // console.log(appWindow)
  },
  deactivated(appWindow: any) {
    // console.log('deactivated()-------------------------');
  }
}
 
export default lifecycles