vxe-table 4.17.20 → 4.17.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/es/grid/src/grid.js +136 -30
- package/es/style.css +1 -1
- package/es/table/render/index.js +113 -4
- package/es/table/src/cell.js +3 -3
- package/es/table/src/table.js +27 -14
- package/es/ui/index.js +3 -2
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +152 -43
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +310 -64
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/render/index.js +140 -10
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/cell.js +6 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/table.js +5 -4
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +3 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +132 -29
- package/packages/table/render/index.ts +115 -4
- package/packages/table/src/cell.ts +3 -3
- package/packages/table/src/table.ts +26 -12
- package/packages/ui/index.ts +2 -1
- /package/es/{iconfont.1764045862093.ttf → iconfont.1764298161293.ttf} +0 -0
- /package/es/{iconfont.1764045862093.woff → iconfont.1764298161293.woff} +0 -0
- /package/es/{iconfont.1764045862093.woff2 → iconfont.1764298161293.woff2} +0 -0
- /package/lib/{iconfont.1764045862093.ttf → iconfont.1764298161293.ttf} +0 -0
- /package/lib/{iconfont.1764045862093.woff → iconfont.1764298161293.woff} +0 -0
- /package/lib/{iconfont.1764045862093.woff2 → iconfont.1764298161293.woff2} +0 -0
|
@@ -41,6 +41,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE'
|
|
|
41
41
|
const maxYHeight = 5e6
|
|
42
42
|
const maxXWidth = 5e6
|
|
43
43
|
|
|
44
|
+
const sourceType = 'table'
|
|
45
|
+
|
|
44
46
|
let crossTableDragRowObj: {
|
|
45
47
|
$oldTable: VxeTableConstructor & VxeTablePrivateMethods
|
|
46
48
|
$newTable: (VxeTableConstructor & VxeTablePrivateMethods) | null
|
|
@@ -5283,10 +5285,15 @@ export default defineVxeComponent({
|
|
|
5283
5285
|
if (!column) {
|
|
5284
5286
|
return null
|
|
5285
5287
|
}
|
|
5286
|
-
const {
|
|
5288
|
+
const { editConfig } = props
|
|
5289
|
+
const { formatter, editRender, cellRender } = column
|
|
5290
|
+
// formatter > tableCellFormatter
|
|
5291
|
+
const renderOpts = formatter ? null : (editConfig && isEnableConf(editRender) ? editRender : (isEnableConf(cellRender) ? cellRender : null))
|
|
5292
|
+
const compConf = renderOpts ? renderer.get(renderOpts.name) : null
|
|
5293
|
+
const tcFormatter = compConf ? compConf.tableCellFormatter : null
|
|
5287
5294
|
const cellValue = getCellValue(row, column)
|
|
5288
5295
|
let cellLabel = cellValue
|
|
5289
|
-
if (formatter) {
|
|
5296
|
+
if (formatter || tcFormatter) {
|
|
5290
5297
|
let formatData
|
|
5291
5298
|
const { fullAllDataRowIdData } = internalData
|
|
5292
5299
|
const rowid = getRowid($xeTable, row)
|
|
@@ -5304,22 +5311,27 @@ export default defineVxeComponent({
|
|
|
5304
5311
|
}
|
|
5305
5312
|
}
|
|
5306
5313
|
const formatParams = {
|
|
5314
|
+
$table: $xeTable,
|
|
5307
5315
|
cellValue,
|
|
5308
5316
|
row,
|
|
5309
5317
|
rowIndex: $xeTable.getRowIndex(row),
|
|
5310
5318
|
column,
|
|
5311
5319
|
columnIndex: $xeTable.getColumnIndex(column)
|
|
5312
5320
|
}
|
|
5313
|
-
if (
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5321
|
+
if (formatter) {
|
|
5322
|
+
if (XEUtils.isString(formatter)) {
|
|
5323
|
+
const gFormatOpts = formats.get(formatter)
|
|
5324
|
+
const tcFormatMethod = gFormatOpts ? (gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod) : null
|
|
5325
|
+
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams) : ''
|
|
5326
|
+
} else if (XEUtils.isArray(formatter)) {
|
|
5327
|
+
const gFormatOpts = formats.get(formatter[0])
|
|
5328
|
+
const tcFormatMethod = gFormatOpts ? (gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod) : null
|
|
5329
|
+
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams, ...formatter.slice(1)) : ''
|
|
5330
|
+
} else {
|
|
5331
|
+
cellLabel = `${formatter(formatParams)}`
|
|
5332
|
+
}
|
|
5333
|
+
} else if (renderOpts && tcFormatter) {
|
|
5334
|
+
cellLabel = `${tcFormatter(renderOpts, formatParams)}`
|
|
5323
5335
|
}
|
|
5324
5336
|
if (formatData) {
|
|
5325
5337
|
formatData[colid] = { value: cellValue, label: cellLabel }
|
|
@@ -5365,6 +5377,7 @@ export default defineVxeComponent({
|
|
|
5365
5377
|
}
|
|
5366
5378
|
}
|
|
5367
5379
|
const footerFormatParams = {
|
|
5380
|
+
$table: $xeTable,
|
|
5368
5381
|
cellValue: itemValue,
|
|
5369
5382
|
itemValue,
|
|
5370
5383
|
row,
|
|
@@ -11523,6 +11536,7 @@ export default defineVxeComponent({
|
|
|
11523
11536
|
}
|
|
11524
11537
|
reactData.lastScrollTime = Date.now()
|
|
11525
11538
|
const evntParams = {
|
|
11539
|
+
source: sourceType,
|
|
11526
11540
|
scrollTop,
|
|
11527
11541
|
scrollLeft,
|
|
11528
11542
|
bodyHeight,
|
package/packages/ui/index.ts
CHANGED
|
@@ -286,9 +286,10 @@ VxeUI.setConfig({
|
|
|
286
286
|
showResponseMsg: true,
|
|
287
287
|
showActionMsg: true,
|
|
288
288
|
response: {
|
|
289
|
-
list:
|
|
289
|
+
list: 'list',
|
|
290
290
|
result: 'result',
|
|
291
291
|
total: 'page.total',
|
|
292
|
+
footerData: 'footerData',
|
|
292
293
|
message: 'message'
|
|
293
294
|
}
|
|
294
295
|
// beforeItem: null,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|