mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 添加exportDefaults替换defineProps
This commit is contained in:
@ -1 +1 @@
|
||||
export { getToken, setToken, removeToken, getUserInfo, resetAuthStorage } from './user';
|
||||
export * from './user';
|
||||
|
@ -26,3 +26,13 @@ export function darkenColor(color: string, deep: number = 0.5) {
|
||||
export function addColorAlpha(color: string, alpha: number) {
|
||||
return chroma(color).alpha(alpha).hex();
|
||||
}
|
||||
|
||||
/**
|
||||
* 颜色混合
|
||||
* @param firstColor - 第一个颜色
|
||||
* @param secondColor - 第二个颜色
|
||||
* @param ratio - 第二个颜色占比
|
||||
*/
|
||||
export function mixColor(firstColor: string, secondColor: string, ratio: number) {
|
||||
return chroma.mix(firstColor, secondColor, ratio).hex();
|
||||
}
|
||||
|
@ -1,17 +1,5 @@
|
||||
export {
|
||||
isNumber,
|
||||
isString,
|
||||
isBoolean,
|
||||
isNull,
|
||||
isUndefined,
|
||||
isObject,
|
||||
isArray,
|
||||
isDate,
|
||||
isRegExp,
|
||||
isSet,
|
||||
isMap
|
||||
} from './typeof';
|
||||
export * from './typeof';
|
||||
|
||||
export { brightenColor, darkenColor, addColorAlpha } from './color';
|
||||
export * from './color';
|
||||
|
||||
export { dynamicIconRender } from './icon';
|
||||
export * from './icon';
|
||||
|
@ -25,7 +25,7 @@ function hasChildren(route: RouteRecordRaw) {
|
||||
}
|
||||
|
||||
/** 获取被缓存的路由 */
|
||||
export default function getCacheRoutes(routes: RouteRecordRaw[]) {
|
||||
export function getCacheRoutes(routes: RouteRecordRaw[]) {
|
||||
const cacheNames: string[] = [];
|
||||
routes.forEach(route => {
|
||||
const isCache = isKeepAlive(route);
|
||||
|
@ -1,3 +1,3 @@
|
||||
export { ROUTE_NAME_MAP, setRouterCacheName, getLoginRedirectUrl, setSingleRoute } from './helpers';
|
||||
export { default as getCacheRoutes } from './cache';
|
||||
export { default as transformRouteToMenu } from './menus';
|
||||
export * from './helpers';
|
||||
export * from './cache';
|
||||
export * from './menus';
|
||||
|
@ -19,7 +19,7 @@ function addPartialProps(menuItem: GlobalMenuOption, icon?: Component, children?
|
||||
return item;
|
||||
}
|
||||
|
||||
export default function transformRouteToMenu(routes: CustomRoute[]) {
|
||||
export function transformRouteToMenu(routes: CustomRoute[]) {
|
||||
const globalMenu: GlobalMenuOption[] = [];
|
||||
routes.forEach(route => {
|
||||
const { name, path, meta } = route;
|
||||
|
Reference in New Issue
Block a user