Skip to content

show

ts
import { defineComponent, show } from '@52css/mp-vue3'

defineComponent({
  properties: {},
  setup() {
    show(() => {
      console.log("🚀 ~ show ~ show:", show)
    })
  }
});

销毁

  • ✨ 返回函数,支持hide销毁
ts
import { defineComponent, show } from '@52css/mp-vue3'

defineComponent({
  properties: {},
  setup() {
    show(() => {
      console.log('onPageShow')
      return () => {
        console.log('pageOnHide')
      }
    })
  }
});