ocpview-plus 0.0.2 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,238 @@
1
+ import VXETable from 'vxe-table'
2
+ import 'vxe-table/lib/style.css'
3
+ import '../theme/theme-variable.css'
4
+
5
+ // ========== 全局renderer引入位置 ==========
6
+ // import './renderer/filter'
7
+ // import './renderer/edit'
8
+ // import './renderer/cell'
9
+ // ========== 全局renderer引入位置 ==========
10
+
11
+ // 全局配置
12
+ VXETable.setup({
13
+ size: 'mini', // 全局尺寸
14
+ zIndex: 8000, // 全局 zIndex 起始值,如果项目的的 z-index 样式值过大时就需要跟随设置更大,避免被遮挡
15
+ version: 0, // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
16
+ // loadingText: '加载中...', // 全局loading提示内容,如果为null则不显示文本
17
+ table: {
18
+ showHeader: true,
19
+ keepSource: false,
20
+ showOverflow: true,
21
+ showHeaderOverflow: true,
22
+ showFooterOverflow: true,
23
+ size: null,
24
+ autoResize: true,
25
+ stripe: true,
26
+ border: false,
27
+ resizable: true,
28
+ round: false,
29
+ // emptyText: '暂无数据',
30
+ rowConfig: {
31
+ keyField: '_X_ROW_KEY', // 行数据的唯一主键字段名
32
+ isCurrent: true, // 当鼠标点击行时,是否要高亮当前行
33
+ isHover: true //当鼠标移到行时,是否要高亮当前行
34
+ },
35
+ radioConfig: {
36
+ trigger: 'default'
37
+ },
38
+ checkboxConfig: {
39
+ strict: false,
40
+ highlight: false,
41
+ range: false,
42
+ trigger: 'default'
43
+ },
44
+ sortConfig: {
45
+ remote: false,
46
+ trigger: 'default',
47
+ orders: ['asc', 'desc', null],
48
+ sortMethod: null
49
+ },
50
+ filterConfig: {
51
+ remote: false,
52
+ filterMethod: null
53
+ },
54
+ expandConfig: {
55
+ trigger: 'default',
56
+ showIcon: true
57
+ },
58
+ treeConfig: {
59
+ rowField: 'id',
60
+ parentField: 'parentId',
61
+ children: 'children',
62
+ hasChild: 'hasChild',
63
+ mapChildren: '_X_ROW_CHILD',
64
+ indent: 20,
65
+ showIcon: true
66
+ },
67
+ tooltipConfig: {
68
+ enterable: true
69
+ },
70
+ menuConfig: {
71
+ visibleMethod() {}
72
+ },
73
+ editConfig: {
74
+ mode: 'cell',
75
+ showAsterisk: true
76
+ },
77
+ importConfig: {
78
+ modes: ['insert', 'covering']
79
+ },
80
+ exportConfig: {
81
+ modes: ['current', 'selected']
82
+ },
83
+ customConfig: {
84
+ storage: false
85
+ },
86
+ scrollX: {
87
+ gt: 60
88
+ },
89
+ scrollY: {
90
+ enabled: true,
91
+ gt: 100
92
+ },
93
+ loading: {
94
+ icon: 'vxe-icon-spinner roll',
95
+ // text: '加载中...'
96
+ }
97
+ },
98
+ grid: {
99
+ size: null,
100
+ zoomConfig: {
101
+ escRestore: true
102
+ },
103
+ pagerConfig: {
104
+ perfect: false
105
+ },
106
+ toolbarConfig: {
107
+ perfect: false
108
+ },
109
+ proxyConfig: {
110
+ autoLoad: true,
111
+ message: true,
112
+ props: {
113
+ list: null, // 用于列表,读取响应数据
114
+ result: 'result', // 用于分页,读取响应数据
115
+ total: 'page.total' // 用于分页,读取总条数
116
+ },
117
+ beforeItem: null,
118
+ beforeColumn: null,
119
+ beforeQuery: null,
120
+ afterQuery: null,
121
+ beforeDelete: null,
122
+ afterDelete: null,
123
+ beforeSave: null,
124
+ afterSave: null
125
+ }
126
+ },
127
+ pager: {
128
+ size: null,
129
+ border: true,
130
+ background: true,
131
+ autoHidden: false,
132
+ perfect: true,
133
+ pageSize: 10,
134
+ pagerCount: 7,
135
+ pageSizes: [50, 100, 200, 500],
136
+ layouts: [
137
+ 'Sizes',
138
+ 'PrevJump',
139
+ 'PrevPage',
140
+ 'Number',
141
+ 'NextPage',
142
+ 'NextJump',
143
+ 'FullJump',
144
+ 'Total'
145
+ ]
146
+ },
147
+ form: {
148
+ preventSubmit: false,
149
+ size: null,
150
+ colon: false,
151
+ validConfig: {
152
+ autoPos: true
153
+ },
154
+ tooltipConfig: {
155
+ enterable: true
156
+ },
157
+ titleAsterisk: true
158
+ },
159
+ input: {
160
+ size: null,
161
+ transfer: false,
162
+ parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
163
+ labelFormat: '',
164
+ valueFormat: '',
165
+ startDay: 1,
166
+ digits: 2,
167
+ controls: true
168
+ },
169
+ textarea: {
170
+ size: null,
171
+ autosize: {
172
+ minRows: 1,
173
+ maxRows: 10
174
+ }
175
+ },
176
+ select: {
177
+ size: null,
178
+ transfer: false,
179
+ optionConfig: {
180
+ keyField: '_X_OPTION_KEY' // 选项数据的唯一主键字段名
181
+ },
182
+ multiCharOverflow: 8
183
+ },
184
+ toolbar: {
185
+ size: null,
186
+ import: {
187
+ mode: 'covering'
188
+ },
189
+ export: {
190
+ types: ['csv', 'html', 'xml', 'txt']
191
+ },
192
+ custom: {
193
+ showFooter: true
194
+ },
195
+ buttons: [],
196
+ tools: []
197
+ },
198
+ button: {
199
+ size: null,
200
+ transfer: false
201
+ },
202
+ radio: {
203
+ size: null
204
+ },
205
+ checkbox: {
206
+ size: null
207
+ },
208
+ switch: {
209
+ size: null
210
+ },
211
+ modal: {
212
+ // size: null,
213
+ minWidth: 340,
214
+ minHeight: 200,
215
+ lockView: true,
216
+ mask: true,
217
+ duration: 3000,
218
+ marginSize: 0,
219
+ dblclickZoom: true,
220
+ showTitleOverflow: true,
221
+ storage: false
222
+ },
223
+ list: {
224
+ scrollY: {
225
+ gt: 100
226
+ }
227
+ }
228
+ })
229
+
230
+ const install = (app, i18n) => {
231
+ VXETable.setup({
232
+ // 对组件内置的提示语进行国际化翻译
233
+ // i18n: (key, args) => i18n.global.t(key, args)
234
+ })
235
+ app.use(VXETable)
236
+ }
237
+
238
+ export default { install }