1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-09 10:21:00 +08:00

add frontend/vben from vben-admin-thin

This commit is contained in:
源文雨
2023-03-10 17:18:32 +08:00
parent 30cd57ef76
commit 2a0fdeae31
469 changed files with 42028 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
// Used to configure the general configuration of some components without modifying the components
import type { SorterResult } from '../components/Table'
export default {
// basic-table setting
table: {
// Form interface request general configuration
// support xxx.xxx.xxx
fetchSetting: {
// The field name of the current page passed to the background
pageField: 'page',
// The number field name of each page displayed in the background
sizeField: 'pageSize',
// Field name of the form data returned by the interface
listField: 'items',
// Total number of tables returned by the interface field name
totalField: 'total',
},
// Number of pages that can be selected
pageSizeOptions: ['10', '50', '80', '100'],
// Default display quantity on one page
defaultPageSize: 10,
// Default Size
defaultSize: 'middle',
// Custom general sort function
defaultSortFn: (sortInfo: SorterResult) => {
const { field, order } = sortInfo
if (field && order) {
return {
// The sort field passed to the backend you
field,
// Sorting method passed to the background asc/desc
order,
}
} else {
return {}
}
},
// Custom general filter function
defaultFilterFn: (data: Partial<Recordable<string[]>>) => {
return data
},
},
// scrollbar setting
scrollbar: {
// Whether to use native scroll bar
// After opening, the menu, modal, drawer will change the pop-up scroll bar to native
native: false,
},
}

View File

@@ -0,0 +1,48 @@
import { ThemeEnum } from '../enums/appEnum'
export const prefixCls = 'vben'
export const darkMode = ThemeEnum.LIGHT
// app theme preset color
export const APP_PRESET_COLOR_LIST: string[] = [
'#0960bd',
'#0084f4',
'#009688',
'#536dfe',
'#ff5c93',
'#ee4f12',
'#0096c7',
'#9c27b0',
'#ff9800',
]
// header preset color
export const HEADER_PRESET_BG_COLOR_LIST: string[] = [
'#ffffff',
'#151515',
'#009688',
'#5172DC',
'#018ffb',
'#409eff',
'#e74c3c',
'#24292e',
'#394664',
'#001529',
'#383f45',
]
// sider preset color
export const SIDE_BAR_BG_COLOR_LIST: string[] = [
'#001529',
'#212121',
'#273352',
'#ffffff',
'#191b24',
'#191a23',
'#304156',
'#001628',
'#28333E',
'#344058',
'#383f45',
]

View File

@@ -0,0 +1,13 @@
import { isDevMode } from '/@/utils/env'
// System default cache time, in seconds
export const DEFAULT_CACHE_TIME = 60 * 60 * 24 * 7
// aes encryption key
export const cacheCipher = {
key: '_11111000001111@',
iv: '@11111000001111_',
}
// Whether the system cache is encrypted using aes
export const enableStorageEncryption = !isDevMode()

View File

@@ -0,0 +1,29 @@
import type { DropMenu } from '../components/Dropdown'
import type { LocaleSetting, LocaleType } from '/#/config'
export const LOCALE: { [key: string]: LocaleType } = {
ZH_CN: 'zh_CN',
EN_US: 'en',
}
export const localeSetting: LocaleSetting = {
showPicker: true,
// Locale
locale: LOCALE.ZH_CN,
// Default locale
fallback: LOCALE.ZH_CN,
// available Locales
availableLocales: [LOCALE.ZH_CN, LOCALE.EN_US],
}
// locale list
export const localeList: DropMenu[] = [
{
text: '简体中文',
event: LOCALE.ZH_CN,
},
{
text: 'English',
event: LOCALE.EN_US,
},
]

View File

@@ -0,0 +1,177 @@
import type { ProjectConfig } from '/#/config'
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum'
import { CacheTypeEnum } from '/@/enums/cacheEnum'
import {
ContentEnum,
PermissionModeEnum,
ThemeEnum,
RouterTransitionEnum,
SettingButtonPositionEnum,
SessionTimeoutProcessingEnum,
} from '/@/enums/appEnum'
import { SIDE_BAR_BG_COLOR_LIST, HEADER_PRESET_BG_COLOR_LIST } from './designSetting'
import { primaryColor } from '../../build/config/themeConfig'
// ! You need to clear the browser cache after the change
const setting: ProjectConfig = {
// Whether to show the configuration button
showSettingButton: true,
// Whether to show the theme switch button
showDarkModeToggle: true,
// `Settings` button position
settingButtonPosition: SettingButtonPositionEnum.AUTO,
// Permission mode
permissionMode: PermissionModeEnum.ROUTE_MAPPING,
// Permission-related cache is stored in sessionStorage or localStorage
permissionCacheType: CacheTypeEnum.LOCAL,
// Session timeout processing
sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP,
// color
themeColor: primaryColor,
// Website gray mode, open for possible mourning dates
grayMode: false,
// Color Weakness Mode
colorWeak: false,
// Whether to cancel the menu, the top, the multi-tab page display, for possible embedded in other systems
fullContent: false,
// content mode
contentMode: ContentEnum.FULL,
// Whether to display the logo
showLogo: true,
// Whether to show footer
showFooter: false,
// Header configuration
headerSetting: {
// header bg color
bgColor: HEADER_PRESET_BG_COLOR_LIST[0],
// Fixed at the top
fixed: true,
// Whether to show top
show: true,
// theme
theme: ThemeEnum.LIGHT,
// Whether to show the full screen button
showFullScreen: true,
// Whether to show the document button
showDoc: true,
// Whether to show the notification button
showNotice: true,
// Whether to display the menu search
showSearch: true,
},
// Menu configuration
menuSetting: {
// sidebar menu bg color
bgColor: SIDE_BAR_BG_COLOR_LIST[0],
// Whether to fix the left menu
fixed: true,
// Menu collapse
collapsed: false,
// When sider hide because of the responsive layout
siderHidden: false,
// Whether to display the menu name when folding the menu
collapsedShowTitle: false,
// Whether it can be dragged
// Only limited to the opening of the left menu, the mouse has a drag bar on the right side of the menu
canDrag: false,
// Whether to show no dom
show: true,
// Whether to show dom
hidden: false,
// Menu width
menuWidth: 210,
// Menu mode
mode: MenuModeEnum.INLINE,
// Menu type
type: MenuTypeEnum.SIDEBAR,
// Menu theme
theme: ThemeEnum.DARK,
// Split menu
split: false,
// Top menu layout
topMenuAlign: 'center',
// Fold trigger position
trigger: TriggerEnum.HEADER,
// Turn on accordion mode, only show a menu
accordion: true,
// Switch page to close menu
closeMixSidebarOnChange: false,
// Module opening method click |'hover'
mixSideTrigger: MixSidebarTriggerEnum.CLICK,
// Fixed expanded menu
mixSideFixed: false,
},
// Multi-label
multiTabsSetting: {
cache: false,
// Turn on
show: true,
// Is it possible to drag and drop sorting tabs
canDrag: true,
// Turn on quick actions
showQuick: true,
// Whether to show the refresh button
showRedo: true,
// Whether to show the collapse button
showFold: true,
},
// Transition Setting
transitionSetting: {
// Whether to open the page switching animation
// The disabled state will also disable pageLoading
enable: true,
// Route basic switching animation
basicTransition: RouterTransitionEnum.FADE_SIDE,
// Whether to open page switching loading
// Only open when enable=true
openPageLoading: true,
// Whether to open the top progress bar
openNProgress: false,
},
// Whether to enable KeepAlive cache is best to close during development, otherwise the cache needs to be cleared every time
openKeepAlive: true,
// Whether to show breadcrumbs
showBreadCrumb: true,
// Whether to show the breadcrumb icon
showBreadCrumbIcon: false,
// Use error-handler-plugin
useErrorHandle: false,
// Whether to open back to top
useOpenBackTop: true,
// Is it possible to embed iframe pages
canEmbedIFramePage: true,
// Whether to delete unclosed messages and notify when switching the interface
closeMessageOnSwitch: true,
// Whether to cancel the http request that has been sent but not responded when switching the interface.
// If it is enabled, I want to overwrite a single interface. Can be set in a separate interface
removeAllHttpPending: false,
}
export default setting

View File

@@ -0,0 +1,8 @@
// github repo url
export const GITHUB_URL = 'https://github.com/anncwb/vue-vben-admin'
// vue-vben-admin-next-doc
export const DOC_URL = 'https://vvbin.cn/doc-next/'
// site url
export const SITE_URL = 'https://vvbin.cn/next/'