useDesign.ts 763 B

12345678910111213141516171819202122
  1. import { useAppProviderContext } from '/@/components/Application';
  2. // import { computed } from 'vue';
  3. // import { lowerFirst } from 'lodash-es';
  4. export function useDesign(scope: string) {
  5. const values = useAppProviderContext();
  6. // const $style = cssModule ? useCssModule() : {};
  7. // const style: Record<string, string> = {};
  8. // if (cssModule) {
  9. // Object.keys($style).forEach((key) => {
  10. // // const moduleCls = $style[key];
  11. // const k = key.replace(new RegExp(`^${values.prefixCls}-?`, 'ig'), '');
  12. // style[lowerFirst(k)] = $style[key];
  13. // });
  14. // }
  15. return {
  16. // prefixCls: computed(() => `${values.prefixCls}-${scope}`),
  17. prefixCls: `${values.prefixCls}-${scope}`,
  18. prefixVar: values.prefixCls,
  19. // style,
  20. };
  21. }