theme.js 512 Bytes
/*
 * @Description: 
 * @Autor: renchao
 * @LastEditTime: 2023-05-11 16:25:43
 */
import Vue from 'vue'
export default function getTheme (theme = Vue.prototype.BASE_API.THEME) {
  const resultMap = {
    'sb': function () {
      return import("@/styles/sbPublic.scss");
    },
    'default': function () {
      throw new Error(`Unsupported theme: ${theme}`);
    },
  };
  const result = resultMap[theme]();
  if (result instanceof Promise) {
    return result;
  } else {
    return resultMap.default();
  }
}