index.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var iconPrefix = 'vxe-icon--';
  7. var GlobalConfig = {
  8. // size: null, // 全局尺寸
  9. zIndex: 999,
  10. // 全局 zIndex 起始值,如果项目的的 z-index 样式值过大时就需要跟随设置更大,避免被遮挡
  11. version: 0,
  12. // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
  13. // resizeInterval: 500,
  14. emptyCell: ' ',
  15. table: {
  16. fit: true,
  17. showHeader: true,
  18. animat: true,
  19. delayHover: 250,
  20. // keepSource: false,
  21. // cloak: false,
  22. // showOverflow: null,
  23. // showHeaderOverflow: null,
  24. // showFooterOverflow: null,
  25. // resizeInterval: 500,
  26. // size: null,
  27. // zIndex: null,
  28. // resizable: false,
  29. // autoResize: false,
  30. // stripe: false,
  31. // border: false,
  32. // round: false,
  33. // emptyRender: {
  34. // name: ''
  35. // },
  36. // radioConfig: {
  37. // trigger: 'default'
  38. // },
  39. // checkboxConfig: {
  40. // trigger: 'default'
  41. // },
  42. // tooltipConfig: {
  43. // theme: 'dark',
  44. // enterable: false
  45. // },
  46. validConfig: {
  47. showMessage: true,
  48. message: 'default'
  49. },
  50. // menuConfig: {
  51. // visibleMethod () {}
  52. // },
  53. // customConfig: {
  54. // storage: false,
  55. // checkMethod () {}
  56. // },
  57. // rowId: '_XID', // 行数据的唯一主键字段名
  58. sortConfig: {
  59. // remote: false,
  60. // trigger: 'default',
  61. // orders: ['asc', 'desc', null],
  62. // sortMethod: null,
  63. showIcon: true
  64. },
  65. filterConfig: {
  66. // remote: false,
  67. // filterMethod: null,
  68. showIcon: true
  69. },
  70. treeConfig: {
  71. children: 'children',
  72. hasChild: 'hasChild',
  73. indent: 20,
  74. showIcon: true
  75. },
  76. keyboardConfig: {
  77. isChecked: true
  78. },
  79. expandConfig: {
  80. // trigger: 'default',
  81. showIcon: true
  82. },
  83. editConfig: {
  84. // mode: 'cell',
  85. showIcon: true,
  86. showAsterisk: true
  87. },
  88. importConfig: {
  89. modes: ['insert', 'covering']
  90. },
  91. exportConfig: {
  92. // isPrint: false,
  93. modes: ['current', 'selected']
  94. },
  95. mouseConfig: {
  96. extension: true
  97. },
  98. areaConfig: {
  99. selectCellByHeader: true
  100. },
  101. clipConfig: {
  102. isCopy: true,
  103. isCut: true,
  104. isPaste: true
  105. },
  106. fnrConfig: {
  107. isFind: true,
  108. isReplace: true
  109. },
  110. scrollX: {
  111. enabled: true,
  112. gt: 60 // oSize: 0,
  113. // rSize: 0
  114. // vSize: 0
  115. },
  116. scrollY: {
  117. enabled: true,
  118. gt: 100 // oSize: 0,
  119. // rSize: 0
  120. // vSize: 0,
  121. // rHeight: 0
  122. }
  123. },
  124. export: {
  125. types: {}
  126. },
  127. icon: {
  128. // table
  129. TABLE_SORT_ASC: iconPrefix + 'caret-top',
  130. TABLE_SORT_DESC: iconPrefix + 'caret-bottom',
  131. TABLE_FILTER_NONE: iconPrefix + 'funnel',
  132. TABLE_FILTER_MATCH: iconPrefix + 'funnel',
  133. TABLE_EDIT: iconPrefix + 'edit-outline',
  134. TABLE_HELP: iconPrefix + 'question',
  135. TABLE_TREE_LOADED: iconPrefix + 'refresh roll',
  136. TABLE_TREE_OPEN: iconPrefix + 'caret-right rotate90',
  137. TABLE_TREE_CLOSE: iconPrefix + 'caret-right',
  138. TABLE_EXPAND_LOADED: iconPrefix + 'refresh roll',
  139. TABLE_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
  140. TABLE_EXPAND_CLOSE: iconPrefix + 'arrow-right',
  141. // button
  142. BUTTON_DROPDOWN: iconPrefix + 'arrow-bottom',
  143. BUTTON_LOADING: iconPrefix + 'refresh roll',
  144. // select
  145. SELECT_LOADED: iconPrefix + 'refresh roll',
  146. SELECT_OPEN: iconPrefix + 'caret-bottom rotate180',
  147. SELECT_CLOSE: iconPrefix + 'caret-bottom',
  148. // pager
  149. PAGER_JUMP_PREV: iconPrefix + 'd-arrow-left',
  150. PAGER_JUMP_NEXT: iconPrefix + 'd-arrow-right',
  151. PAGER_PREV_PAGE: iconPrefix + 'arrow-left',
  152. PAGER_NEXT_PAGE: iconPrefix + 'arrow-right',
  153. PAGER_JUMP_MORE: iconPrefix + 'more',
  154. // input
  155. INPUT_CLEAR: iconPrefix + 'close',
  156. INPUT_PWD: iconPrefix + 'eye-slash',
  157. INPUT_SHOW_PWD: iconPrefix + 'eye',
  158. INPUT_PREV_NUM: iconPrefix + 'caret-top',
  159. INPUT_NEXT_NUM: iconPrefix + 'caret-bottom',
  160. INPUT_DATE: iconPrefix + 'calendar',
  161. INPUT_SEARCH: iconPrefix + 'search',
  162. // modal
  163. MODAL_ZOOM_IN: iconPrefix + 'square',
  164. MODAL_ZOOM_OUT: iconPrefix + 'zoomout',
  165. MODAL_CLOSE: iconPrefix + 'close',
  166. MODAL_INFO: iconPrefix + 'info',
  167. MODAL_SUCCESS: iconPrefix + 'success',
  168. MODAL_WARNING: iconPrefix + 'warning',
  169. MODAL_ERROR: iconPrefix + 'error',
  170. MODAL_QUESTION: iconPrefix + 'question',
  171. MODAL_LOADING: iconPrefix + 'refresh roll',
  172. // toolbar
  173. TOOLBAR_TOOLS_REFRESH: iconPrefix + 'refresh',
  174. TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'refresh roll',
  175. TOOLBAR_TOOLS_IMPORT: iconPrefix + 'upload',
  176. TOOLBAR_TOOLS_EXPORT: iconPrefix + 'download',
  177. TOOLBAR_TOOLS_PRINT: iconPrefix + 'print',
  178. TOOLBAR_TOOLS_ZOOM_IN: iconPrefix + 'zoomin',
  179. TOOLBAR_TOOLS_ZOOM_OUT: iconPrefix + 'zoomout',
  180. TOOLBAR_TOOLS_CUSTOM: iconPrefix + 'menu',
  181. // form
  182. FORM_PREFIX: iconPrefix + 'info',
  183. FORM_SUFFIX: iconPrefix + 'info',
  184. FORM_FOLDING: iconPrefix + 'arrow-top rotate180',
  185. FORM_UNFOLDING: iconPrefix + 'arrow-top'
  186. },
  187. grid: {
  188. // size: null,
  189. // zoomConfig: {
  190. // escRestore: true
  191. // },
  192. formConfig: {
  193. enabled: true
  194. },
  195. pagerConfig: {
  196. enabled: true // perfect: false
  197. },
  198. toolbarConfig: {
  199. enabled: true // perfect: false
  200. },
  201. proxyConfig: {
  202. enabled: true,
  203. autoLoad: true,
  204. message: true,
  205. props: {
  206. list: null,
  207. result: 'result',
  208. total: 'page.total',
  209. message: 'message'
  210. } // beforeItem: null,
  211. // beforeColumn: null,
  212. // beforeQuery: null,
  213. // afterQuery: null,
  214. // beforeDelete: null,
  215. // afterDelete: null,
  216. // beforeSave: null,
  217. // afterSave: null
  218. }
  219. },
  220. tooltip: {
  221. // size: null,
  222. trigger: 'hover',
  223. theme: 'dark',
  224. leaveDelay: 300
  225. },
  226. pager: {// size: null,
  227. // autoHidden: false,
  228. // perfect: true,
  229. // pageSize: 10,
  230. // pagerCount: 7,
  231. // pageSizes: [10, 15, 20, 50, 100],
  232. // layouts: ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total']
  233. },
  234. form: {
  235. // preventSubmit: false,
  236. validConfig: {
  237. showMessage: true,
  238. autoPos: true
  239. },
  240. // size: null,
  241. // colon: false,
  242. titleAsterisk: true
  243. },
  244. input: {
  245. // size: null,
  246. // transfer: false
  247. // parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
  248. // labelFormat: '',
  249. // valueFormat: '',
  250. minDate: new Date(1900, 0, 1),
  251. maxDate: new Date(2100, 0, 1),
  252. startDay: 1,
  253. selectDay: 1,
  254. digits: 2,
  255. controls: true
  256. },
  257. textarea: {// size: null,
  258. // autosize: {
  259. // minRows: 1,
  260. // maxRows: 10
  261. // }
  262. },
  263. select: {
  264. // size: null,
  265. // transfer: false,
  266. multiCharOverflow: 8
  267. },
  268. toolbar: {// size: null,
  269. // import: {
  270. // mode: 'covering'
  271. // },
  272. // export: {
  273. // types: ['csv', 'html', 'xml', 'txt']
  274. // },
  275. // custom: {
  276. // isFooter: true
  277. // },
  278. // buttons: []
  279. },
  280. button: {// size: null,
  281. // transfer: false
  282. },
  283. radio: {// size: null
  284. },
  285. checkbox: {// size: null
  286. },
  287. switch: {// size: null
  288. },
  289. modal: {
  290. // size: null,
  291. top: 15,
  292. showHeader: true,
  293. minWidth: 340,
  294. minHeight: 140,
  295. lockView: true,
  296. mask: true,
  297. duration: 3000,
  298. marginSize: 0,
  299. dblclickZoom: true,
  300. showTitleOverflow: true,
  301. animat: true,
  302. showClose: true,
  303. // storage: false,
  304. storageKey: 'VXE_MODAL_POSITION'
  305. },
  306. list: {
  307. // size: null,
  308. scrollY: {
  309. enabled: true,
  310. gt: 100 // oSize: 0,
  311. // rSize: 0
  312. // vSize: 0,
  313. // rHeight: 0
  314. }
  315. },
  316. i18n: function i18n(key) {
  317. return key;
  318. }
  319. };
  320. var _default = GlobalConfig;
  321. exports.default = _default;