import { onLoad } from '@dcloudio/uni-app' import { ref } from 'vue' export function useGetFirstAidId(callback?: Function) { const firstAidId = ref('') const code = ref('') onLoad(option => { if (option?.firstAidId) { firstAidId.value = option.firstAidId // 新建过来的 callback && callback(option.firstAidId) } else { firstAidId.value = '' } code.value = option?.code || '' }) return { firstAidId, code } }