1234567891011121314151617181920 |
- import {ref} from 'vue';
- import {injectLocal, provideLocal} from "@vueuse/core";
- const key = Symbol('VOLUNTARY_STEP')
- export const useProvideVoluntaryStep = (t = '志愿填报', step = 0) => {
- const title = ref(t)
- const currentStep = ref(step)
- const options = {
- title,
- currentStep
- }
- provideLocal(key, options)
- return options
- }
- export const useInjectVoluntaryStep = () => {
- return injectLocal(key)
- }
|