sh-view 2.9.20 → 2.9.21
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.21",
|
|
4
4
|
"description": "基于vxe-table二次封装,更包含Alert,Badge,Card,CodeEditor,Col,Corner,CountTo,Drawer,Empty,Form,Header,Icon,List,Loading,Modal,Noticebar,Poptip,Progress,PullRefresh,Query,Result,Row,Split,Grid,Table,Tabs,Tag,Toolbar,Tree,Upload,WaterFall,WaterMark等丰富组件库",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -36,9 +36,6 @@ const publicRenders = {
|
|
|
36
36
|
$vInput: {
|
|
37
37
|
autofocus: '.td-render .vxe-input--inner',
|
|
38
38
|
autoselect: true,
|
|
39
|
-
renderDefault(renderOpts, params) {
|
|
40
|
-
return [<vxeRenderInput rparams={params} roptions={renderOpts} />]
|
|
41
|
-
},
|
|
42
39
|
renderCell(renderOpts, params) {
|
|
43
40
|
return [<vxeRenderInput rparams={params} roptions={renderOpts} />]
|
|
44
41
|
},
|
|
@@ -55,9 +52,6 @@ const publicRenders = {
|
|
|
55
52
|
$vTextArea: {
|
|
56
53
|
autofocus: '.td-render .vxe-textarea--inner',
|
|
57
54
|
autoselect: true,
|
|
58
|
-
renderDefault(renderOpts, params) {
|
|
59
|
-
return [<vxeRenderTextarea rparams={params} roptions={renderOpts} />]
|
|
60
|
-
},
|
|
61
55
|
renderCell(renderOpts, params) {
|
|
62
56
|
return [<vxeRenderTextarea rparams={params} roptions={renderOpts} />]
|
|
63
57
|
},
|
|
@@ -71,9 +65,6 @@ const publicRenders = {
|
|
|
71
65
|
$vSelect: {
|
|
72
66
|
autofocus: '.td-render .vxe-input--inner',
|
|
73
67
|
autoselect: true,
|
|
74
|
-
renderDefault(renderOpts, params) {
|
|
75
|
-
return [<vxeRenderSelect rparams={params} roptions={renderOpts} />]
|
|
76
|
-
},
|
|
77
68
|
renderCell(renderOpts, params) {
|
|
78
69
|
return [<vxeRenderSelect rparams={params} roptions={renderOpts} />]
|
|
79
70
|
},
|
|
@@ -87,9 +78,6 @@ const publicRenders = {
|
|
|
87
78
|
$vTree: {
|
|
88
79
|
autofocus: '.td-render .vxe-input--inner',
|
|
89
80
|
autoselect: true,
|
|
90
|
-
renderDefault(renderOpts, params) {
|
|
91
|
-
return [<vxeRenderTree rparams={params} roptions={renderOpts} />]
|
|
92
|
-
},
|
|
93
81
|
renderCell(renderOpts, params) {
|
|
94
82
|
return [<vxeRenderTree rparams={params} roptions={renderOpts} />]
|
|
95
83
|
},
|
|
@@ -103,9 +91,6 @@ const publicRenders = {
|
|
|
103
91
|
$vTime: {
|
|
104
92
|
autofocus: '.td-render .vxe-input--inner',
|
|
105
93
|
autoselect: true,
|
|
106
|
-
renderDefault(renderOpts, params) {
|
|
107
|
-
return [<vxeRenderTime rparams={params} roptions={renderOpts} />]
|
|
108
|
-
},
|
|
109
94
|
renderCell(renderOpts, params) {
|
|
110
95
|
return [<vxeRenderTime rparams={params} roptions={renderOpts} />]
|
|
111
96
|
},
|
|
@@ -119,9 +104,6 @@ const publicRenders = {
|
|
|
119
104
|
$vProgress: {
|
|
120
105
|
autofocus: '.td-render .vxe-input--inner',
|
|
121
106
|
autoselect: true,
|
|
122
|
-
renderDefault(renderOpts, params) {
|
|
123
|
-
return [<vxeRenderProgress rparams={params} roptions={renderOpts} />]
|
|
124
|
-
},
|
|
125
107
|
renderCell(renderOpts, params) {
|
|
126
108
|
return [<vxeRenderProgress rparams={params} roptions={renderOpts} />]
|
|
127
109
|
},
|
|
@@ -137,9 +119,6 @@ const publicRenders = {
|
|
|
137
119
|
},
|
|
138
120
|
$vSwitch: {
|
|
139
121
|
autoselect: true,
|
|
140
|
-
renderDefault(renderOpts, params) {
|
|
141
|
-
return [<vxeRenderSwitch rparams={params} roptions={renderOpts} />]
|
|
142
|
-
},
|
|
143
122
|
renderCell(renderOpts, params) {
|
|
144
123
|
return [<vxeRenderSwitch rparams={params} roptions={renderOpts} />]
|
|
145
124
|
},
|
|
@@ -153,9 +132,6 @@ const publicRenders = {
|
|
|
153
132
|
$vMoney: {
|
|
154
133
|
autofocus: '.td-render .vxe-input--inner',
|
|
155
134
|
autoselect: true,
|
|
156
|
-
renderDefault(renderOpts, params) {
|
|
157
|
-
return [<vxeRenderMoney rparams={params} roptions={renderOpts} />]
|
|
158
|
-
},
|
|
159
135
|
renderCell(renderOpts, params) {
|
|
160
136
|
return [<vxeRenderMoney rparams={params} roptions={renderOpts} />]
|
|
161
137
|
},
|
|
@@ -177,9 +153,6 @@ const publicRenders = {
|
|
|
177
153
|
},
|
|
178
154
|
$vCheckbox: {
|
|
179
155
|
autoselect: true,
|
|
180
|
-
renderDefault(renderOpts, params) {
|
|
181
|
-
return [<vxeRenderCheckbox rparams={params} roptions={renderOpts} />]
|
|
182
|
-
},
|
|
183
156
|
renderCell(renderOpts, params) {
|
|
184
157
|
return [<vxeRenderCheckbox rparams={params} roptions={renderOpts} />]
|
|
185
158
|
},
|
|
@@ -192,9 +165,6 @@ const publicRenders = {
|
|
|
192
165
|
},
|
|
193
166
|
$vCheckgroup: {
|
|
194
167
|
autoselect: true,
|
|
195
|
-
renderDefault(renderOpts, params) {
|
|
196
|
-
return [<vxeRenderCheckgroup rparams={params} roptions={renderOpts} />]
|
|
197
|
-
},
|
|
198
168
|
renderCell(renderOpts, params) {
|
|
199
169
|
return [<vxeRenderCheckgroup rparams={params} roptions={renderOpts} />]
|
|
200
170
|
},
|
|
@@ -207,9 +177,6 @@ const publicRenders = {
|
|
|
207
177
|
},
|
|
208
178
|
$vRadio: {
|
|
209
179
|
autoselect: true,
|
|
210
|
-
renderDefault(renderOpts, params) {
|
|
211
|
-
return [<vxeRenderRadio rparams={params} roptions={renderOpts} />]
|
|
212
|
-
},
|
|
213
180
|
renderCell(renderOpts, params) {
|
|
214
181
|
return [<vxeRenderRadio rparams={params} roptions={renderOpts} />]
|
|
215
182
|
},
|
|
@@ -222,9 +189,6 @@ const publicRenders = {
|
|
|
222
189
|
},
|
|
223
190
|
$vRadiogroup: {
|
|
224
191
|
autoselect: true,
|
|
225
|
-
renderDefault(renderOpts, params) {
|
|
226
|
-
return [<vxeRenderRadiogroup rparams={params} roptions={renderOpts} />]
|
|
227
|
-
},
|
|
228
192
|
renderCell(renderOpts, params) {
|
|
229
193
|
return [<vxeRenderRadiogroup rparams={params} roptions={renderOpts} />]
|
|
230
194
|
},
|
|
@@ -244,9 +208,6 @@ const publicRenders = {
|
|
|
244
208
|
}
|
|
245
209
|
},
|
|
246
210
|
$vImg: {
|
|
247
|
-
renderDefault(renderOpts, params) {
|
|
248
|
-
return [<vxeRenderImg rparams={params} roptions={renderOpts} />]
|
|
249
|
-
},
|
|
250
211
|
renderCell(renderOpts, params) {
|
|
251
212
|
return [<vxeRenderImg rparams={params} roptions={renderOpts} />]
|
|
252
213
|
},
|
|
@@ -259,9 +220,6 @@ const publicRenders = {
|
|
|
259
220
|
},
|
|
260
221
|
$vHref: {
|
|
261
222
|
autoselect: true,
|
|
262
|
-
renderDefault(renderOpts, params) {
|
|
263
|
-
return [<vxeRenderHref rparams={params} roptions={renderOpts} />]
|
|
264
|
-
},
|
|
265
223
|
renderCell(renderOpts, params) {
|
|
266
224
|
return [<vxeRenderHref rparams={params} roptions={renderOpts} />]
|
|
267
225
|
},
|
|
@@ -271,9 +229,6 @@ const publicRenders = {
|
|
|
271
229
|
},
|
|
272
230
|
$vUpload: {
|
|
273
231
|
autoselect: true,
|
|
274
|
-
renderDefault(renderOpts, params) {
|
|
275
|
-
return [<vxeRenderUpload rparams={params} roptions={renderOpts} />]
|
|
276
|
-
},
|
|
277
232
|
renderCell(renderOpts, params) {
|
|
278
233
|
return [<vxeRenderUpload rparams={params} roptions={renderOpts} />]
|
|
279
234
|
},
|
|
@@ -285,9 +240,6 @@ const publicRenders = {
|
|
|
285
240
|
}
|
|
286
241
|
},
|
|
287
242
|
$vGlobalOption: {
|
|
288
|
-
renderDefault(renderOpts, params) {
|
|
289
|
-
return [<vxeRenderGoption rparams={params} roptions={renderOpts} />]
|
|
290
|
-
},
|
|
291
243
|
renderCell(renderOpts, params) {
|
|
292
244
|
return [<vxeRenderGoption rparams={params} roptions={renderOpts} />]
|
|
293
245
|
},
|
|
@@ -297,9 +249,6 @@ const publicRenders = {
|
|
|
297
249
|
},
|
|
298
250
|
$vCode: {
|
|
299
251
|
autoselect: true,
|
|
300
|
-
renderDefault(renderOpts, params) {
|
|
301
|
-
return [<vxeRenderCode rparams={params} roptions={renderOpts} />]
|
|
302
|
-
},
|
|
303
252
|
renderCell(renderOpts, params) {
|
|
304
253
|
return [<vxeRenderCode rparams={params} roptions={renderOpts} />]
|
|
305
254
|
},
|
|
@@ -315,11 +264,6 @@ const publicRenders = {
|
|
|
315
264
|
// 扩展渲染器
|
|
316
265
|
const extraRenders = {
|
|
317
266
|
$vRowCell: {
|
|
318
|
-
renderDefault(renderOpts, params) {
|
|
319
|
-
let field = params.row[params.column.property + 'field'] || params.column.property
|
|
320
|
-
let renderName = params.row[field + 'RenderName'] || '$vInput'
|
|
321
|
-
return publicRenders[renderName].renderDefault(renderOpts, params)
|
|
322
|
-
},
|
|
323
267
|
renderCell(renderOpts, params) {
|
|
324
268
|
let field = params.row[params.column.property + 'field'] || params.column.property
|
|
325
269
|
let renderName = params.row[field + 'RenderName'] || '$vInput'
|
|
@@ -351,7 +295,13 @@ const filterRenders = {
|
|
|
351
295
|
},
|
|
352
296
|
filterMethod({ value, option, cellValue, row, column, $table }) {
|
|
353
297
|
const { data } = option
|
|
354
|
-
const {
|
|
298
|
+
const { property } = column
|
|
299
|
+
const renderConfig = column.editRender || column.cellRender || {}
|
|
300
|
+
const renderProps = renderConfig.props || {}
|
|
301
|
+
const contextAttrs = $table?.xeGrid?.context.attrs || $table?.context.attrs || {}
|
|
302
|
+
const mprops = contextAttrs.moneyConfig || {}
|
|
303
|
+
const rname = renderConfig.name
|
|
304
|
+
let rprops = Object.assign({}, renderProps, mprops)
|
|
355
305
|
let { rtext } = utils.formatRender(cellValue, property, row, rname, rprops, { $vUtils: utils })
|
|
356
306
|
return String(rtext).toLowerCase().indexOf(data.toLowerCase()) > -1
|
|
357
307
|
}
|
|
@@ -367,7 +317,13 @@ const filterRenders = {
|
|
|
367
317
|
},
|
|
368
318
|
filterMethod({ value, option, cellValue, row, column, $table }) {
|
|
369
319
|
const { data } = option
|
|
370
|
-
const {
|
|
320
|
+
const { property } = column
|
|
321
|
+
const renderConfig = column.editRender || column.cellRender || {}
|
|
322
|
+
const renderProps = renderConfig.props || {}
|
|
323
|
+
const contextAttrs = $table?.xeGrid?.context.attrs || $table?.context.attrs || {}
|
|
324
|
+
const mprops = contextAttrs.moneyConfig || {}
|
|
325
|
+
const rname = renderConfig.name
|
|
326
|
+
let rprops = Object.assign({}, renderProps, mprops)
|
|
371
327
|
const { type, valueSt, valueEd } = data
|
|
372
328
|
let { rvalue, rtext } = utils.formatRender(cellValue, property, row, rname, rprops, { $vUtils: utils })
|
|
373
329
|
let isDate = ['date', 'time', 'datetime', 'week', 'month', 'year'].includes(rprops.type)
|