useAppConfig.ts 399 B

123456789101112131415
  1. import { EnumAppConfigKey } from "@/common/enum";
  2. import { useAppStore } from "@/store/appStore";
  3. export const useAppConfig = () => {
  4. const appStore = useAppStore();
  5. /**
  6. * 短信验证码是否开启图形验证
  7. */
  8. const isSmsCaptchaEnable = computed(() => {
  9. return appStore.getAppConfig(EnumAppConfigKey.SMS_CAPTCHA_ENABLE) === 'true';
  10. });
  11. return {
  12. isSmsCaptchaEnable
  13. }
  14. }