提交 | 用户 | 时间 | ||
314507 | 1 | import variables from '@/styles/global.module.scss' |
H | 2 | |
3 | export const useDesign = () => { | |
4 | const scssVariables = variables | |
5 | ||
6 | /** | |
7 | * @param scope 类名 | |
8 | * @returns 返回空间名-类名 | |
9 | */ | |
10 | const getPrefixCls = (scope: string) => { | |
11 | return `${scssVariables.namespace}-${scope}` | |
12 | } | |
13 | ||
14 | return { | |
15 | variables: scssVariables, | |
16 | getPrefixCls | |
17 | } | |
18 | } |