vxe-table 3.8.8-beta.7 → 3.8.8-beta.9
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/lib/button/index.js +2 -0
- package/lib/button/index.min.js +1 -1
- package/lib/button-group/index.js +2 -0
- package/lib/button-group/index.min.js +1 -1
- package/lib/checkbox/index.js +2 -0
- package/lib/checkbox/index.min.js +1 -1
- package/lib/checkbox-group/index.js +2 -0
- package/lib/checkbox-group/index.min.js +1 -1
- package/lib/colgroup/index.js +2 -0
- package/lib/colgroup/index.min.js +1 -1
- package/lib/column/index.js +2 -0
- package/lib/column/index.min.js +1 -1
- package/lib/edit/src/mixin.js +4 -4
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/export/src/mixin.js +39 -29
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/form/index.js +2 -0
- package/lib/form/index.min.js +1 -1
- package/lib/form-gather/index.js +2 -0
- package/lib/form-gather/index.min.js +1 -1
- package/lib/form-item/index.js +2 -0
- package/lib/form-item/index.min.js +1 -1
- package/lib/grid/index.js +1 -0
- package/lib/grid/index.min.js +1 -1
- package/lib/icon/index.js +2 -0
- package/lib/icon/index.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +261 -133
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +2 -0
- package/lib/input/index.min.js +1 -1
- package/lib/keyboard/src/mixin.js +2 -2
- package/lib/keyboard/src/mixin.min.js +1 -1
- package/lib/list/index.js +2 -0
- package/lib/list/index.min.js +1 -1
- package/lib/loading/index.js +2 -0
- package/lib/loading/index.min.js +1 -1
- package/lib/menu/src/mixin.js +1 -1
- package/lib/menu/src/mixin.min.js +1 -1
- package/lib/modal/index.js +1 -0
- package/lib/modal/index.min.js +1 -1
- package/lib/optgroup/index.js +2 -0
- package/lib/optgroup/index.min.js +1 -1
- package/lib/option/index.js +2 -0
- package/lib/option/index.min.js +1 -1
- package/lib/pager/index.js +2 -0
- package/lib/pager/index.min.js +1 -1
- package/lib/pulldown/index.js +2 -0
- package/lib/pulldown/index.min.js +1 -1
- package/lib/radio/index.js +2 -0
- package/lib/radio/index.min.js +1 -1
- package/lib/radio-button/index.js +2 -0
- package/lib/radio-button/index.min.js +1 -1
- package/lib/radio-group/index.js +2 -0
- package/lib/radio-group/index.min.js +1 -1
- package/lib/select/index.js +2 -0
- package/lib/select/index.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +2 -0
- package/lib/switch/index.min.js +1 -1
- package/lib/table/index.js +1 -0
- package/lib/table/index.min.js +1 -1
- package/lib/table/src/cell.js +0 -6
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +96 -67
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +6 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/textarea/index.js +2 -0
- package/lib/textarea/index.min.js +1 -1
- package/lib/toolbar/index.js +2 -0
- package/lib/toolbar/index.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tooltip/index.js +1 -0
- package/lib/tooltip/index.min.js +1 -1
- package/lib/v-x-e-table/index.js +61 -25
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +6 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/theme.js +5 -0
- package/lib/v-x-e-table/src/theme.min.js +1 -1
- package/lib/validator/src/mixin.js +1 -1
- package/lib/validator/src/mixin.min.js +1 -1
- package/package.json +1 -1
- package/packages/button/index.js +2 -0
- package/packages/button-group/index.js +2 -0
- package/packages/checkbox/index.js +2 -0
- package/packages/checkbox-group/index.js +2 -0
- package/packages/colgroup/index.js +2 -0
- package/packages/column/index.js +2 -0
- package/packages/edit/src/mixin.js +4 -4
- package/packages/export/src/mixin.js +33 -20
- package/packages/form/index.js +2 -0
- package/packages/form-gather/index.js +2 -0
- package/packages/form-item/index.js +2 -0
- package/packages/grid/index.js +4 -3
- package/packages/icon/index.js +2 -0
- package/packages/input/index.js +2 -0
- package/packages/keyboard/src/mixin.js +2 -2
- package/packages/list/index.js +2 -0
- package/packages/loading/index.js +2 -0
- package/packages/menu/src/mixin.js +1 -1
- package/packages/modal/index.js +5 -3
- package/packages/optgroup/index.js +2 -0
- package/packages/option/index.js +2 -0
- package/packages/pager/index.js +2 -0
- package/packages/pulldown/index.js +2 -0
- package/packages/radio/index.js +2 -0
- package/packages/radio-button/index.js +2 -0
- package/packages/radio-group/index.js +2 -0
- package/packages/select/index.js +2 -0
- package/packages/switch/index.js +2 -0
- package/packages/table/index.js +10 -9
- package/packages/table/src/cell.js +0 -6
- package/packages/table/src/methods.js +82 -53
- package/packages/table/src/table.js +4 -4
- package/packages/textarea/index.js +2 -0
- package/packages/toolbar/index.js +2 -0
- package/packages/tooltip/index.js +3 -2
- package/packages/v-x-e-table/index.js +44 -22
- package/packages/v-x-e-table/src/conf.js +6 -1
- package/packages/v-x-e-table/src/theme.js +5 -0
- package/packages/validator/src/mixin.js +1 -1
- package/types/table.d.ts +4 -0
- package/types/v-x-e-table/index.d.ts +10 -0
- /package/lib/icon/style/{iconfont.1718470675024.ttf → iconfont.1719196942508.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1718470675024.woff → iconfont.1719196942508.woff} +0 -0
- /package/lib/icon/style/{iconfont.1718470675024.woff2 → iconfont.1719196942508.woff2} +0 -0
- /package/lib/{iconfont.1718470675024.ttf → iconfont.1719196942508.ttf} +0 -0
- /package/lib/{iconfont.1718470675024.woff → iconfont.1719196942508.woff} +0 -0
- /package/lib/{iconfont.1718470675024.woff2 → iconfont.1719196942508.woff2} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import VxeTableColgroupComponent from '../table/src/group'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeColgroup = Object.assign(VxeTableColgroupComponent, {
|
|
4
5
|
install (Vue) {
|
|
@@ -7,6 +8,7 @@ export const VxeColgroup = Object.assign(VxeTableColgroupComponent, {
|
|
|
7
8
|
Vue.component('VxeTableColgroup', VxeTableColgroupComponent)
|
|
8
9
|
}
|
|
9
10
|
})
|
|
11
|
+
VxeUI.component(VxeTableColgroupComponent)
|
|
10
12
|
|
|
11
13
|
export const Colgroup = VxeColgroup
|
|
12
14
|
|
package/packages/column/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import VxeTableColumnComponent from '../table/src/column'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeColumn = Object.assign(VxeTableColumnComponent, {
|
|
4
5
|
install (Vue) {
|
|
@@ -7,6 +8,7 @@ export const VxeColumn = Object.assign(VxeTableColumnComponent, {
|
|
|
7
8
|
Vue.component('VxeTableColumn', VxeTableColumnComponent)
|
|
8
9
|
}
|
|
9
10
|
})
|
|
11
|
+
VxeUI.component(VxeTableColumnComponent)
|
|
10
12
|
|
|
11
13
|
export const Column = VxeColumn
|
|
12
14
|
|
|
@@ -425,7 +425,7 @@ export default {
|
|
|
425
425
|
const { actived, focused } = editStore
|
|
426
426
|
const { row, column } = params
|
|
427
427
|
const { editRender } = column
|
|
428
|
-
const cell = params.cell = (params.cell || this.
|
|
428
|
+
const cell = params.cell = (params.cell || this.getCellElement(row, column))
|
|
429
429
|
const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod
|
|
430
430
|
if (cell && isEnableConf(editConfig) && isEnableConf(editRender)) {
|
|
431
431
|
// 激活编辑
|
|
@@ -678,7 +678,7 @@ export default {
|
|
|
678
678
|
const column = XEUtils.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn
|
|
679
679
|
if (row && column && isEnableConf(editConfig) && isEnableConf(column.editRender)) {
|
|
680
680
|
return this.scrollToRow(row, true).then(() => {
|
|
681
|
-
const cell = this.
|
|
681
|
+
const cell = this.getCellElement(row, column)
|
|
682
682
|
if (cell) {
|
|
683
683
|
this.handleActived({ row, rowIndex: this.getRowIndex(row), column, columnIndex: this.getColumnIndex(column), cell, $table: this })
|
|
684
684
|
this.lastCallTime = Date.now()
|
|
@@ -696,7 +696,7 @@ export default {
|
|
|
696
696
|
if (row && column && editOpts.trigger !== 'manual') {
|
|
697
697
|
const rowIndex = this.findRowIndexOf(tableData, row)
|
|
698
698
|
if (rowIndex > -1) {
|
|
699
|
-
const cell = this.
|
|
699
|
+
const cell = this.getCellElement(row, column)
|
|
700
700
|
const params = { row, rowIndex, column, columnIndex: visibleColumn.indexOf(column), cell }
|
|
701
701
|
this.handleSelected(params, {})
|
|
702
702
|
}
|
|
@@ -772,7 +772,7 @@ export default {
|
|
|
772
772
|
const { row, column } = selected
|
|
773
773
|
this.reColSdCls()
|
|
774
774
|
if (row && column) {
|
|
775
|
-
const cell = this.
|
|
775
|
+
const cell = this.getCellElement(row, column)
|
|
776
776
|
if (cell) {
|
|
777
777
|
DomTools.addClass(cell, 'col--selected')
|
|
778
778
|
}
|
|
@@ -137,7 +137,7 @@ function getLabelData ($xetable, opts, columns, datas) {
|
|
|
137
137
|
htmlCellElem.innerHTML = cellValue
|
|
138
138
|
cellValue = htmlCellElem.innerText.trim()
|
|
139
139
|
} else {
|
|
140
|
-
const cell = $xetable.
|
|
140
|
+
const cell = $xetable.getCellElement(row, column)
|
|
141
141
|
if (cell) {
|
|
142
142
|
cellValue = cell.innerText.trim()
|
|
143
143
|
}
|
|
@@ -193,7 +193,7 @@ function getLabelData ($xetable, opts, columns, datas) {
|
|
|
193
193
|
htmlCellElem.innerHTML = cellValue
|
|
194
194
|
cellValue = htmlCellElem.innerText.trim()
|
|
195
195
|
} else {
|
|
196
|
-
const cell = $xetable.
|
|
196
|
+
const cell = $xetable.getCellElement(row, column)
|
|
197
197
|
if (cell) {
|
|
198
198
|
cellValue = cell.innerText.trim()
|
|
199
199
|
}
|
|
@@ -226,7 +226,7 @@ function getHeaderTitle ($xetable, opts, column) {
|
|
|
226
226
|
return headExportMethod ? headExportMethod({ column, options: opts, $table: $xetable }) : ((opts.original ? column.property : column.getTitle()) || '')
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
function getFooterCellValue ($xetable, opts,
|
|
229
|
+
function getFooterCellValue ($xetable, opts, row, column) {
|
|
230
230
|
const { columnOpts } = $xetable
|
|
231
231
|
const renderOpts = column.editRender || column.cellRender
|
|
232
232
|
let footLabelMethod = column.footerExportMethod
|
|
@@ -240,8 +240,14 @@ function getFooterCellValue ($xetable, opts, items, column) {
|
|
|
240
240
|
footLabelMethod = columnOpts.footerExportMethod
|
|
241
241
|
}
|
|
242
242
|
const _columnIndex = $xetable.getVTColumnIndex(column)
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
if (footLabelMethod) {
|
|
244
|
+
return footLabelMethod({ $table: $xetable, items: row, itemIndex: _columnIndex, row, _columnIndex, column, options: opts })
|
|
245
|
+
}
|
|
246
|
+
// 兼容老模式
|
|
247
|
+
if (XEUtils.isArray(row)) {
|
|
248
|
+
return XEUtils.toValueString(row[_columnIndex])
|
|
249
|
+
}
|
|
250
|
+
return XEUtils.get(row, column.field)
|
|
245
251
|
}
|
|
246
252
|
|
|
247
253
|
function getFooterData (opts, footerTableData) {
|
|
@@ -290,8 +296,8 @@ function toCsv ($xetable, opts, columns, datas) {
|
|
|
290
296
|
if (opts.isFooter) {
|
|
291
297
|
const footerTableData = $xetable.footerTableData
|
|
292
298
|
const footers = getFooterData(opts, footerTableData)
|
|
293
|
-
footers.forEach(
|
|
294
|
-
content += columns.map(column => toTxtCellLabel(getFooterCellValue($xetable, opts,
|
|
299
|
+
footers.forEach(row => {
|
|
300
|
+
content += columns.map(column => toTxtCellLabel(getFooterCellValue($xetable, opts, row, column))).join(',') + enterSymbol
|
|
295
301
|
})
|
|
296
302
|
}
|
|
297
303
|
return content
|
|
@@ -308,8 +314,8 @@ function toTxt ($xetable, opts, columns, datas) {
|
|
|
308
314
|
if (opts.isFooter) {
|
|
309
315
|
const footerTableData = $xetable.footerTableData
|
|
310
316
|
const footers = getFooterData(opts, footerTableData)
|
|
311
|
-
footers.forEach(
|
|
312
|
-
content += columns.map(column => toTxtCellLabel(getFooterCellValue($xetable, opts,
|
|
317
|
+
footers.forEach(row => {
|
|
318
|
+
content += columns.map(column => toTxtCellLabel(getFooterCellValue($xetable, opts, row, column))).join(',') + enterSymbol
|
|
313
319
|
})
|
|
314
320
|
}
|
|
315
321
|
return content
|
|
@@ -485,12 +491,12 @@ function toHtml ($xetable, opts, columns, datas) {
|
|
|
485
491
|
const footers = getFooterData(opts, footerTableData)
|
|
486
492
|
if (footers.length) {
|
|
487
493
|
tables.push('<tfoot>')
|
|
488
|
-
footers.forEach(
|
|
494
|
+
footers.forEach(row => {
|
|
489
495
|
tables.push(
|
|
490
496
|
`<tr>${columns.map(column => {
|
|
491
497
|
const footAlign = column.footerAlign || column.align || allFooterAlign || allAlign
|
|
492
498
|
const classNames = hasEllipsis($xetable, column, 'showOverflow', allColumnOverflow) ? ['col--ellipsis'] : []
|
|
493
|
-
const cellValue = getFooterCellValue($xetable, opts,
|
|
499
|
+
const cellValue = getFooterCellValue($xetable, opts, row, column)
|
|
494
500
|
if (footAlign) {
|
|
495
501
|
classNames.push(`col--${footAlign}`)
|
|
496
502
|
}
|
|
@@ -536,8 +542,8 @@ function toXML ($xetable, opts, columns, datas) {
|
|
|
536
542
|
if (opts.isFooter) {
|
|
537
543
|
const footerTableData = $xetable.footerTableData
|
|
538
544
|
const footers = getFooterData(opts, footerTableData)
|
|
539
|
-
footers.forEach(
|
|
540
|
-
xml += `<Row>${columns.map(column => `<Cell><Data ss:Type="String">${getFooterCellValue($xetable, opts,
|
|
545
|
+
footers.forEach(row => {
|
|
546
|
+
xml += `<Row>${columns.map(column => `<Cell><Data ss:Type="String">${getFooterCellValue($xetable, opts, row, column)}</Data></Cell>`).join('')}</Row>`
|
|
541
547
|
})
|
|
542
548
|
}
|
|
543
549
|
return `${xml}</Table></Worksheet></Workbook>`
|
|
@@ -855,11 +861,12 @@ function handleImport ($xetable, content, opts) {
|
|
|
855
861
|
}
|
|
856
862
|
|
|
857
863
|
function handleFileImport ($xetable, file, opts) {
|
|
864
|
+
const { importOpts } = $xetable
|
|
858
865
|
const { importMethod, afterImportMethod } = opts
|
|
859
866
|
const { type, filename } = UtilTools.parseFile(file)
|
|
860
867
|
|
|
861
868
|
// 检查类型,如果为自定义导出,则不需要校验类型
|
|
862
|
-
if (!importMethod && !XEUtils.includes(
|
|
869
|
+
if (!importMethod && !XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)) {
|
|
863
870
|
if (opts.message !== false) {
|
|
864
871
|
// 检测弹窗模块
|
|
865
872
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
@@ -1037,13 +1044,13 @@ export function handlePrint ($xetable, opts, content) {
|
|
|
1037
1044
|
}
|
|
1038
1045
|
|
|
1039
1046
|
function handleExportAndPrint ($xetable, options, isPrint) {
|
|
1040
|
-
const { initStore, customOpts, collectColumn, footerTableData, treeConfig, mergeList, isGroup, exportParams } = $xetable
|
|
1047
|
+
const { initStore, customOpts, collectColumn, footerTableData, treeConfig, mergeList, isGroup, exportParams, exportOpts } = $xetable
|
|
1041
1048
|
const selectRecords = $xetable.getCheckboxRecords()
|
|
1042
1049
|
const hasFooter = !!footerTableData.length
|
|
1043
1050
|
const hasTree = treeConfig
|
|
1044
1051
|
const hasMerge = !hasTree && mergeList.length
|
|
1045
1052
|
const defOpts = Object.assign({ message: true, isHeader: true }, options)
|
|
1046
|
-
const types = defOpts.types ||
|
|
1053
|
+
const types = defOpts.types || XEUtils.keys(exportOpts._typeMaps)
|
|
1047
1054
|
const modes = defOpts.modes
|
|
1048
1055
|
const checkMethod = customOpts.checkMethod
|
|
1049
1056
|
const exportColumns = collectColumn.slice(0)
|
|
@@ -1275,7 +1282,7 @@ export default {
|
|
|
1275
1282
|
}
|
|
1276
1283
|
|
|
1277
1284
|
// 检查类型,如果为自定义导出,则不需要校验类型
|
|
1278
|
-
if (!opts.exportMethod && !XEUtils.includes(
|
|
1285
|
+
if (!opts.exportMethod && !XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)) {
|
|
1279
1286
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
1280
1287
|
errLog('vxe.error.notType', [type])
|
|
1281
1288
|
}
|
|
@@ -1349,11 +1356,12 @@ export default {
|
|
|
1349
1356
|
return handleFileImport(this, file, opts)
|
|
1350
1357
|
},
|
|
1351
1358
|
_importData (options) {
|
|
1359
|
+
const { importOpts } = this
|
|
1352
1360
|
const opts = Object.assign({
|
|
1353
|
-
types:
|
|
1361
|
+
types: XEUtils.keys(importOpts._typeMaps)
|
|
1354
1362
|
// beforeImportMethod: null,
|
|
1355
1363
|
// afterImportMethod: null
|
|
1356
|
-
},
|
|
1364
|
+
}, importOpts, options)
|
|
1357
1365
|
const { beforeImportMethod, afterImportMethod } = opts
|
|
1358
1366
|
if (beforeImportMethod) {
|
|
1359
1367
|
beforeImportMethod({ options: opts, $table: this })
|
|
@@ -1417,7 +1425,12 @@ export default {
|
|
|
1417
1425
|
})
|
|
1418
1426
|
},
|
|
1419
1427
|
_openImport (options) {
|
|
1420
|
-
const
|
|
1428
|
+
const { importOpts } = this
|
|
1429
|
+
const defOpts = Object.assign({
|
|
1430
|
+
mode: 'insert',
|
|
1431
|
+
message: true,
|
|
1432
|
+
types: XEUtils.keys(importOpts._typeMaps)
|
|
1433
|
+
}, options, importOpts)
|
|
1421
1434
|
const { types } = defOpts
|
|
1422
1435
|
const isTree = !!this.getTreeStatus()
|
|
1423
1436
|
if (isTree) {
|
package/packages/form/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeFormComponent from './src/form'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeForm = Object.assign(VxeFormComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeFormComponent.name, VxeFormComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeFormComponent)
|
|
8
10
|
|
|
9
11
|
export const Form = VxeForm
|
|
10
12
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeFormGatherComponent from '../form/src/form-gather'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeFormGather = Object.assign(VxeFormGatherComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeFormGatherComponent.name, VxeFormGatherComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeFormGatherComponent)
|
|
8
10
|
|
|
9
11
|
export const FormGather = VxeFormGather
|
|
10
12
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeFormItemComponent from '../form/src/form-item'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeFormItem = Object.assign(VxeFormItemComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeFormItemComponent.name, VxeFormItemComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeFormItemComponent)
|
|
8
10
|
|
|
9
11
|
export const FormItem = VxeFormItem
|
|
10
12
|
|
package/packages/grid/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import VxeGridComponent from './src/grid'
|
|
2
|
-
import
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
3
3
|
|
|
4
4
|
export const VxeGrid = Object.assign(VxeGridComponent, {
|
|
5
5
|
install (Vue) {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
VxeUI.Grid = VxeGridComponent
|
|
7
|
+
VxeUI.GridComponent = VxeGridComponent
|
|
8
8
|
Vue.component(VxeGridComponent.name, VxeGridComponent)
|
|
9
9
|
}
|
|
10
10
|
})
|
|
11
|
+
VxeUI.component(VxeGridComponent)
|
|
11
12
|
|
|
12
13
|
export const Grid = VxeGrid
|
|
13
14
|
|
package/packages/icon/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeIconComponent from './src/icon'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeIcon = Object.assign(VxeIconComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeIconComponent.name, VxeIconComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeIconComponent)
|
|
8
10
|
|
|
9
11
|
export const Icon = VxeIcon
|
|
10
12
|
|
package/packages/input/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeInputComponent from './src/input'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeInput = Object.assign(VxeInputComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeInputComponent.name, VxeInputComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeInputComponent)
|
|
8
10
|
|
|
9
11
|
export const Input = VxeInput
|
|
10
12
|
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
93
93
|
}
|
|
94
94
|
params.columnIndex = targetColumnIndex
|
|
95
95
|
params.column = targetColumn
|
|
96
|
-
params.cell = this.
|
|
96
|
+
params.cell = this.getCellElement(params.row, params.column)
|
|
97
97
|
if (editConfig) {
|
|
98
98
|
if (editOpts.trigger === 'click' || editOpts.trigger === 'dblclick') {
|
|
99
99
|
if (editOpts.mode === 'row') {
|
|
@@ -165,7 +165,7 @@ export default {
|
|
|
165
165
|
params.column = visibleColumn[params.columnIndex]
|
|
166
166
|
}
|
|
167
167
|
this.scrollToRow(params.row, params.column).then(() => {
|
|
168
|
-
params.cell = this.
|
|
168
|
+
params.cell = this.getCellElement(params.row, params.column)
|
|
169
169
|
this.handleSelected(params, evnt)
|
|
170
170
|
})
|
|
171
171
|
},
|
package/packages/list/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeListComponent from './src/list'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeList = Object.assign(VxeListComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeListComponent.name, VxeListComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeListComponent)
|
|
8
10
|
|
|
9
11
|
export const List = VxeList
|
|
10
12
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeLoadingComponent from './src/loading'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeLoading = Object.assign(VxeLoadingComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeLoadingComponent.name, VxeLoadingComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeLoadingComponent)
|
|
8
10
|
|
|
9
11
|
export const Loading = VxeLoading
|
|
10
12
|
|
|
@@ -180,7 +180,7 @@ export default {
|
|
|
180
180
|
const { keyboard, row, column } = params
|
|
181
181
|
if (keyboard && row && column) {
|
|
182
182
|
this.scrollToRow(row, column).then(() => {
|
|
183
|
-
const cell = this.
|
|
183
|
+
const cell = this.getCellElement(row, column)
|
|
184
184
|
const { boundingTop, boundingLeft } = DomTools.getAbsolutePos(cell)
|
|
185
185
|
top = boundingTop + scrollTop + Math.floor(cell.offsetHeight / 2)
|
|
186
186
|
left = boundingLeft + scrollLeft + Math.floor(cell.offsetWidth / 2)
|
package/packages/modal/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import VXEModalComponent, { allActivedModals } from './src/modal'
|
|
3
|
-
import
|
|
3
|
+
import VxeUI from '../v-x-e-table'
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
6
6
|
|
|
@@ -96,10 +96,10 @@ shortcutTypes.forEach((type, index) => {
|
|
|
96
96
|
|
|
97
97
|
export const VxeModal = Object.assign(VXEModalComponent, {
|
|
98
98
|
install (Vue) {
|
|
99
|
-
|
|
99
|
+
VxeUI._modal = 1
|
|
100
100
|
Vue.component(VXEModalComponent.name, VXEModalComponent)
|
|
101
101
|
ModalClass = Vue.extend(VXEModalComponent)
|
|
102
|
-
|
|
102
|
+
VxeUI.modal = ModalController
|
|
103
103
|
// 兼容老版本
|
|
104
104
|
if (!Vue.prototype.$vxe) {
|
|
105
105
|
Vue.prototype.$vxe = { modal: ModalController }
|
|
@@ -109,6 +109,8 @@ export const VxeModal = Object.assign(VXEModalComponent, {
|
|
|
109
109
|
}
|
|
110
110
|
})
|
|
111
111
|
|
|
112
|
+
VxeUI.component(VXEModalComponent)
|
|
113
|
+
|
|
112
114
|
export const Modal = VxeModal
|
|
113
115
|
|
|
114
116
|
export default VxeModal
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeOptgroupComponent from '../select/src/optgroup'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeOptgroup = Object.assign(VxeOptgroupComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeOptgroupComponent.name, VxeOptgroupComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeOptgroupComponent)
|
|
8
10
|
|
|
9
11
|
export const Optgroup = VxeOptgroup
|
|
10
12
|
|
package/packages/option/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeOptionComponent from '../select/src/option'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeOption = Object.assign(VxeOptionComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeOptionComponent.name, VxeOptionComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeOptionComponent)
|
|
8
10
|
|
|
9
11
|
export const Option = VxeOption
|
|
10
12
|
|
package/packages/pager/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxePagerComponent from './src/pager'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxePager = Object.assign(VxePagerComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxePagerComponent.name, VxePagerComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxePagerComponent)
|
|
8
10
|
|
|
9
11
|
export const Pager = VxePager
|
|
10
12
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxePulldownComponent from './src/pulldown'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxePulldown = Object.assign(VxePulldownComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxePulldownComponent.name, VxePulldownComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxePulldownComponent)
|
|
8
10
|
|
|
9
11
|
export const Pulldown = VxePulldown
|
|
10
12
|
|
package/packages/radio/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeRadioComponent from './src/radio'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeRadio = Object.assign(VxeRadioComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeRadioComponent.name, VxeRadioComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeRadioComponent)
|
|
8
10
|
|
|
9
11
|
export const Radio = VxeRadio
|
|
10
12
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeRadioButtonComponent from '../radio/src/button'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeRadioButton = Object.assign(VxeRadioButtonComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeRadioButtonComponent)
|
|
8
10
|
|
|
9
11
|
export const RadioButton = VxeRadioButton
|
|
10
12
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeRadioGroupComponent from '../radio/src/group'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeRadioGroup = Object.assign(VxeRadioGroupComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeRadioGroupComponent.name, VxeRadioGroupComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeRadioGroupComponent)
|
|
8
10
|
|
|
9
11
|
export const RadioGroup = VxeRadioGroup
|
|
10
12
|
|
package/packages/select/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import VxeSelectComponent from './src/select'
|
|
2
2
|
import VxeOptionComponent from './src/option'
|
|
3
3
|
import VxeOptgroupComponent from './src/optgroup'
|
|
4
|
+
import VxeUI from '../v-x-e-table'
|
|
4
5
|
|
|
5
6
|
export const VxeSelect = Object.assign(VxeSelectComponent, {
|
|
6
7
|
Option: VxeOptionComponent,
|
|
@@ -11,6 +12,7 @@ export const VxeSelect = Object.assign(VxeSelectComponent, {
|
|
|
11
12
|
Vue.component(VxeOptgroupComponent.name, VxeOptgroupComponent)
|
|
12
13
|
}
|
|
13
14
|
})
|
|
15
|
+
VxeUI.component(VxeSelectComponent)
|
|
14
16
|
|
|
15
17
|
export const Select = VxeSelect
|
|
16
18
|
|
package/packages/switch/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import VxeSwitchComponent from './src/switch'
|
|
2
|
+
import VxeUI from '../v-x-e-table'
|
|
2
3
|
|
|
3
4
|
export const VxeSwitch = Object.assign(VxeSwitchComponent, {
|
|
4
5
|
install (Vue) {
|
|
5
6
|
Vue.component(VxeSwitchComponent.name, VxeSwitchComponent)
|
|
6
7
|
}
|
|
7
8
|
})
|
|
9
|
+
VxeUI.component(VxeSwitchComponent)
|
|
8
10
|
|
|
9
11
|
export const Switch = VxeSwitch
|
|
10
12
|
|
package/packages/table/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import VxeTableComponent from './src/table'
|
|
2
2
|
import VxeTableBodyComponent from './src/body'
|
|
3
|
-
import
|
|
3
|
+
import VxeUI from '../v-x-e-table'
|
|
4
4
|
|
|
5
5
|
export const VxeTable = Object.assign(VxeTableComponent, {
|
|
6
6
|
install (Vue) {
|
|
@@ -9,25 +9,26 @@ export const VxeTable = Object.assign(VxeTableComponent, {
|
|
|
9
9
|
delete window.VXETableMixin
|
|
10
10
|
}
|
|
11
11
|
if (typeof window !== 'undefined' && window.VxeTableExtendCellArea && window.VxeTableExtendCellArea.init) {
|
|
12
|
-
window.VxeTableExtendCellArea.init(
|
|
12
|
+
window.VxeTableExtendCellArea.init(VxeUI)
|
|
13
13
|
delete window.VxeTableExtendCellArea
|
|
14
14
|
} else if (typeof window !== 'undefined' && window.VXETablePro && window.VXETablePro.init) {
|
|
15
|
-
window.VXETablePro.init(
|
|
15
|
+
window.VXETablePro.init(VxeUI)
|
|
16
16
|
delete window.VXETablePro
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
VxeUI.Vue = Vue
|
|
19
|
+
VxeUI.Table = VxeTableComponent
|
|
20
|
+
VxeUI.TableComponent = VxeTableComponent
|
|
21
21
|
if (!Vue.prototype.$vxe) {
|
|
22
|
-
Vue.prototype.$vxe = { t:
|
|
22
|
+
Vue.prototype.$vxe = { t: VxeUI.t, _t: VxeUI._t }
|
|
23
23
|
} else {
|
|
24
|
-
Vue.prototype.$vxe.t =
|
|
25
|
-
Vue.prototype.$vxe._t =
|
|
24
|
+
Vue.prototype.$vxe.t = VxeUI.t
|
|
25
|
+
Vue.prototype.$vxe._t = VxeUI._t
|
|
26
26
|
}
|
|
27
27
|
Vue.component(VxeTableComponent.name, VxeTableComponent)
|
|
28
28
|
Vue.component(VxeTableBodyComponent.name, VxeTableBodyComponent)
|
|
29
29
|
}
|
|
30
30
|
})
|
|
31
|
+
VxeUI.component(VxeTableComponent)
|
|
31
32
|
|
|
32
33
|
export const Table = VxeTable
|
|
33
34
|
|
|
@@ -254,7 +254,6 @@ export const Cell = {
|
|
|
254
254
|
}
|
|
255
255
|
if (!trigger || trigger === 'default') {
|
|
256
256
|
on.click = evnt => {
|
|
257
|
-
evnt.stopPropagation()
|
|
258
257
|
$table.triggerTreeExpandEvent(evnt, params)
|
|
259
258
|
}
|
|
260
259
|
}
|
|
@@ -337,7 +336,6 @@ export const Cell = {
|
|
|
337
336
|
on = {
|
|
338
337
|
click (evnt) {
|
|
339
338
|
if (!isDisabled && isVisible) {
|
|
340
|
-
evnt.stopPropagation()
|
|
341
339
|
$table.triggerRadioRowEvent(evnt, params)
|
|
342
340
|
}
|
|
343
341
|
}
|
|
@@ -395,7 +393,6 @@ export const Cell = {
|
|
|
395
393
|
on = {
|
|
396
394
|
click (evnt) {
|
|
397
395
|
if (!isAllCheckboxDisabled) {
|
|
398
|
-
evnt.stopPropagation()
|
|
399
396
|
$table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected)
|
|
400
397
|
}
|
|
401
398
|
}
|
|
@@ -452,7 +449,6 @@ export const Cell = {
|
|
|
452
449
|
on = {
|
|
453
450
|
click (evnt) {
|
|
454
451
|
if (!isDisabled && isVisible) {
|
|
455
|
-
evnt.stopPropagation()
|
|
456
452
|
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
457
453
|
}
|
|
458
454
|
}
|
|
@@ -517,7 +513,6 @@ export const Cell = {
|
|
|
517
513
|
on = {
|
|
518
514
|
click (evnt) {
|
|
519
515
|
if (!isDisabled && isVisible) {
|
|
520
|
-
evnt.stopPropagation()
|
|
521
516
|
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
522
517
|
}
|
|
523
518
|
}
|
|
@@ -592,7 +587,6 @@ export const Cell = {
|
|
|
592
587
|
}],
|
|
593
588
|
on: {
|
|
594
589
|
click (evnt) {
|
|
595
|
-
evnt.stopPropagation()
|
|
596
590
|
$table.triggerRowExpandEvent(evnt, params)
|
|
597
591
|
}
|
|
598
592
|
}
|