liuyu
6 小时以前 82a74ba0402ab546ba524d23ce62198c4d00d2f7
1
2
3
4
5
6
7
8
9
10
11
12
13
import type { ComputedRef } from 'vue';
 
import { inject } from 'vue';
 
export interface IUseOptions {
  currentColor: ComputedRef<string>;
}
 
export const OPTIONS_KEY = Symbol('OPTIONS_KEY');
 
export const useOptions = () => {
  return inject<IUseOptions>(OPTIONS_KEY);
};