System Settings
Modify the corresponding configuration in src/store/models/app.ts.
footerText: Footer texttheme: Global component library theme variableslang: Language (to be developed)borderRadius: Component border radius, default4pxfollowPrimary: Whether the component library info color follows the theme color, defaultfalsecollapsed: Whether the sidebar is collapsed, defaultfalsegrayMode: Whether to enable gray mode, defaultfalsecolorWeak: Whether to enable color weak mode, defaultfalsefixed: Whether to fix the header and footer, defaulttrueloadFlag: Page reload flag, defaulttrueshowLogo: Whether to show the logo, defaulttrueshowTabs: Whether to show tagsView, defaulttrueshowTabsIcon: Whether to show icons on tab pages, defaulttrueshowFooter: Whether to show the footer, defaultfalseshowProgress: Whether to show the progress bar, defaulttrueshowBreadcrumb: Whether to show breadcrumbs, defaulttrueshowBreadcrumbIcon: Whether to show breadcrumb icons, defaulttrueshowWatermark: Whether to show watermark, defaultfalsewatermarkText: Watermark text, can be edited in System SettingstransitionAnimation: Page transition animation, defaultfade-slidelayoutMode: Layout mode, defaultLayoutMode.LEFTcontentFullScreen: Whether the content area is fullscreen, defaultfalsesideWidth: Sidebar width, default200sideCollapsedWidth: Sidebar collapsed width, default50sideTrigger: Sidebar trigger, defaultbarplacement: Message notification position, defaulttopinverted: Whether the menu and dropdown menu use inverted theme, defaultfalse
Component Library Styles
Modify src/utils/theme.ts to add the style variables you need. For details, refer to Naive-UI
ts
import type { GlobalThemeOverrides } from "naive-ui";
/** Default primary color */
export const primaryColor = "#ac29e1";
/** Default info color */
export const infoColor = "#70c0e8";
/** Default success color */
export const successColor = "#18a058";
/** Default warning color */
export const warningColor = "#f0a020";
/** Default error color */
export const errorColor = "#d03050";
/** Default theme configuration */
const themeConfig: GlobalThemeOverrides = {
common: {
primaryColor,
primaryColorHover: "#b644e5",
primaryColorPressed: "#9b1dce",
primaryColorSuppl: "#8e1abd",
infoColor,
infoColorHover: "#8accec",
infoColorPressed: "#56b4e4",
infoColorSuppl: "#44ade1",
successColor,
successColorHover: "#1cbb67",
successColorPressed: "#148549",
successColorSuppl: "#117440",
warningColor,
warningColorHover: "#f2ac3d",
warningColorPressed: "#e2910f",
warningColorSuppl: "#cf850e",
errorColor,
errorColorHover: "#d64965",
errorColorPressed: "#b82a46",
errorColorSuppl: "#a72640",
},
};
export default themeConfig;
nuyoah