123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- const iconPrefix = 'vxe-icon--'
- const GlobalConfig = {
- // size: null, // 全局尺寸
- zIndex: 999, // 全局 zIndex 起始值,如果项目的的 z-index 样式值过大时就需要跟随设置更大,避免被遮挡
- version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
- // resizeInterval: 500,
- emptyCell: ' ',
- table: {
- fit: true,
- showHeader: true,
- animat: true,
- delayHover: 250,
- // keepSource: false,
- // cloak: false,
- // showOverflow: null,
- // showHeaderOverflow: null,
- // showFooterOverflow: null,
- // resizeInterval: 500,
- // size: null,
- // zIndex: null,
- // resizable: false,
- // autoResize: false,
- // stripe: false,
- // border: false,
- // round: false,
- // emptyRender: {
- // name: ''
- // },
- // radioConfig: {
- // trigger: 'default'
- // },
- // checkboxConfig: {
- // trigger: 'default'
- // },
- // tooltipConfig: {
- // theme: 'dark',
- // enterable: false
- // },
- validConfig: {
- showMessage: true,
- message: 'default'
- },
- // menuConfig: {
- // visibleMethod () {}
- // },
- // customConfig: {
- // storage: false,
- // checkMethod () {}
- // },
- // rowId: '_XID', // 行数据的唯一主键字段名
- sortConfig: {
- // remote: false,
- // trigger: 'default',
- // orders: ['asc', 'desc', null],
- // sortMethod: null,
- showIcon: true
- },
- filterConfig: {
- // remote: false,
- // filterMethod: null,
- showIcon: true
- },
- treeConfig: {
- children: 'children',
- hasChild: 'hasChild',
- indent: 20,
- showIcon: true
- },
- keyboardConfig: {
- isChecked: true
- },
- expandConfig: {
- // trigger: 'default',
- showIcon: true
- },
- editConfig: {
- // mode: 'cell',
- showIcon: true,
- showAsterisk: true
- },
- importConfig: {
- modes: ['insert', 'covering']
- },
- exportConfig: {
- // isPrint: false,
- modes: ['current', 'selected']
- },
- mouseConfig: {
- extension: true
- },
- areaConfig: {
- selectCellByHeader: true
- },
- clipConfig: {
- isCopy: true,
- isCut: true,
- isPaste: true
- },
- fnrConfig: {
- isFind: true,
- isReplace: true
- },
- scrollX: {
- enabled: true,
- gt: 60
- // oSize: 0,
- // rSize: 0
- // vSize: 0
- },
- scrollY: {
- enabled: true,
- gt: 100
- // oSize: 0,
- // rSize: 0
- // vSize: 0,
- // rHeight: 0
- }
- },
- export: {
- types: {}
- },
- icon: {
- // table
- TABLE_SORT_ASC: iconPrefix + 'caret-top',
- TABLE_SORT_DESC: iconPrefix + 'caret-bottom',
- TABLE_FILTER_NONE: iconPrefix + 'funnel',
- TABLE_FILTER_MATCH: iconPrefix + 'funnel',
- TABLE_EDIT: iconPrefix + 'edit-outline',
- TABLE_HELP: iconPrefix + 'question',
- TABLE_TREE_LOADED: iconPrefix + 'refresh roll',
- TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
- TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
- TABLE_EXPAND_LOADED: iconPrefix + 'refresh roll',
- TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
- TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
- // button
- BUTTON_DROPDOWN: iconPrefix + 'arrow-bottom',
- BUTTON_LOADING: iconPrefix + 'refresh roll',
- // select
- SELECT_LOADED: iconPrefix + 'refresh roll',
- SELECT_OPEN: iconPrefix + 'caret-bottom rotate180',
- SELECT_CLOSE: iconPrefix + 'caret-bottom',
- // pager
- PAGER_JUMP_PREV: iconPrefix + 'd-arrow-left',
- PAGER_JUMP_NEXT: iconPrefix + 'd-arrow-right',
- PAGER_PREV_PAGE: iconPrefix + 'arrow-left',
- PAGER_NEXT_PAGE: iconPrefix + 'arrow-right',
- PAGER_JUMP_MORE: iconPrefix + 'more',
- // input
- INPUT_CLEAR: iconPrefix + 'close',
- INPUT_PWD: iconPrefix + 'eye-slash',
- INPUT_SHOW_PWD: iconPrefix + 'eye',
- INPUT_PREV_NUM: iconPrefix + 'caret-top',
- INPUT_NEXT_NUM: iconPrefix + 'caret-bottom',
- INPUT_DATE: iconPrefix + 'calendar',
- INPUT_SEARCH: iconPrefix + 'search',
- // modal
- MODAL_ZOOM_IN: iconPrefix + 'square',
- MODAL_ZOOM_OUT: iconPrefix + 'zoomout',
- MODAL_CLOSE: iconPrefix + 'close',
- MODAL_INFO: iconPrefix + 'info',
- MODAL_SUCCESS: iconPrefix + 'success',
- MODAL_WARNING: iconPrefix + 'warning',
- MODAL_ERROR: iconPrefix + 'error',
- MODAL_QUESTION: iconPrefix + 'question',
- MODAL_LOADING: iconPrefix + 'refresh roll',
- // toolbar
- TOOLBAR_TOOLS_REFRESH: iconPrefix + 'refresh',
- TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'refresh roll',
- TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
- TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
- TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
- TOOLBAR_TOOLS_ZOOM_IN: iconPrefix + 'zoomin',
- TOOLBAR_TOOLS_ZOOM_OUT: iconPrefix + 'zoomout',
- TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'menu',
- // form
- FORM_PREFIX: iconPrefix + 'info',
- FORM_SUFFIX: iconPrefix + 'info',
- FORM_FOLDING: iconPrefix + 'arrow-top rotate180',
- FORM_UNFOLDING: iconPrefix + 'arrow-top'
- },
- grid: {
- // size: null,
- // zoomConfig: {
- // escRestore: true
- // },
- formConfig: {
- enabled: true
- },
- pagerConfig: {
- enabled: true
- // perfect: false
- },
- toolbarConfig: {
- enabled: true
- // perfect: false
- },
- proxyConfig: {
- enabled: true,
- autoLoad: true,
- message: true,
- props: {
- list: null,
- result: 'result',
- total: 'page.total',
- message: 'message'
- }
- // beforeItem: null,
- // beforeColumn: null,
- // beforeQuery: null,
- // afterQuery: null,
- // beforeDelete: null,
- // afterDelete: null,
- // beforeSave: null,
- // afterSave: null
- }
- },
- tooltip: {
- // size: null,
- trigger: 'hover',
- theme: 'dark',
- leaveDelay: 300
- },
- pager: {
- // size: null,
- // autoHidden: false,
- // perfect: true,
- // pageSize: 10,
- // pagerCount: 7,
- // pageSizes: [10, 15, 20, 50, 100],
- // layouts: ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total']
- },
- form: {
- // preventSubmit: false,
- validConfig: {
- showMessage: true,
- autoPos: true
- },
- // size: null,
- // colon: false,
- titleAsterisk: true
- },
- input: {
- // size: null,
- // transfer: false
- // parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
- // labelFormat: '',
- // valueFormat: '',
- minDate: new Date(1900, 0, 1),
- maxDate: new Date(2100, 0, 1),
- startDay: 1,
- selectDay: 1,
- digits: 2,
- controls: true
- },
- textarea: {
- // size: null,
- // autosize: {
- // minRows: 1,
- // maxRows: 10
- // }
- },
- select: {
- // size: null,
- // transfer: false,
- multiCharOverflow: 8
- },
- toolbar: {
- // size: null,
- // import: {
- // mode: 'covering'
- // },
- // export: {
- // types: ['csv', 'html', 'xml', 'txt']
- // },
- // custom: {
- // isFooter: true
- // },
- // buttons: []
- },
- button: {
- // size: null,
- // transfer: false
- },
- radio: {
- // size: null
- },
- checkbox: {
- // size: null
- },
- switch: {
- // size: null
- },
- modal: {
- // size: null,
- top: 15,
- showHeader: true,
- minWidth: 340,
- minHeight: 140,
- lockView: true,
- mask: true,
- duration: 3000,
- marginSize: 0,
- dblclickZoom: true,
- showTitleOverflow: true,
- animat: true,
- showClose: true,
- // storage: false,
- storageKey: 'VXE_MODAL_POSITION'
- },
- list: {
- // size: null,
- scrollY: {
- enabled: true,
- gt: 100
- // oSize: 0,
- // rSize: 0
- // vSize: 0,
- // rHeight: 0
- }
- },
- i18n: key => key
- }
- export default GlobalConfig
|