UNPKG

@hzy1123581324/z-view-ui

Version:

z-view-ui是使用vue3开发的组件,开发中,有部分组件功能未实现,慎用

51 lines (35 loc) 750 B
import { onShow,onReachBottom,onHide } from "@dcloudio/uni-app"; import { inject,provide,} from 'vue' export function onAgain(func){ if(!func){ throw("onAgain应该传入一个function") } let isagain = 0; onShow(()=>{ if(isagain == -1){ isagain = 1; func(); } }) onHide(()=>{ isagain = -1; }) } export function usePage(){ provide("_pageState", verificationResults); } export function useComponentsPage(){ const pageState = inject('_pageState','show'); watch(pageState,(newval,oldval)=>{ if(newval == 'show'){ onShow() }else{ } }) function onShow(){ } return { onHide, onShow, } }