Skip to content

Commit

Permalink
releases 4.7.57
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Jul 22, 2024
1 parent 0dc2eb5 commit 0c81d70
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.7.56",
"version": "4.7.57",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down Expand Up @@ -28,7 +28,7 @@
"style": "lib/style.css",
"typings": "types/index.d.ts",
"dependencies": {
"vxe-pc-ui": "^4.0.76"
"vxe-pc-ui": "^4.0.78"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/src/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents,

const tableComponentPropKeys = Object.keys(tableComponentProps as any)

const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'openTooltip', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']
const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getData', 'getCheckboxRecords', 'getParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'isCheckedByCheckboxRow', 'isIndeterminateByCheckboxRow', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'setRadioRow', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'openTooltip', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']

const gridComponentEmits: VxeGridEmits = [
...tableComponentEmits,
Expand Down
8 changes: 5 additions & 3 deletions packages/table/module/export/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,8 @@ hooks.add('tableExportModule', {
.then((data: any) => {
let loadRest
if (opts.mode === 'insert' || opts.mode === 'insertBottom') {
loadRest = $xeTable.insertAt(data, -1)
} if (opts.mode === 'insertTop') {
loadRest = $xeTable.insert(data)
} else {
loadRest = $xeTable.reloadData(data)
Expand Down Expand Up @@ -888,7 +890,7 @@ hooks.add('tableExportModule', {
internalData._importResolve = _importResolve
internalData._importReject = _importReject
if (window.FileReader) {
const options = Object.assign({ mode: 'insertBottom' }, opts, { type, filename })
const options = Object.assign({ mode: 'insertTop' }, opts, { type, filename })
if (options.remote) {
if (importMethod) {
Promise.resolve(importMethod({ file, options, $table: $xeTable })).then(() => {
Expand Down Expand Up @@ -1326,10 +1328,10 @@ hooks.add('tableExportModule', {
const { initStore, importStore, importParams } = reactData
const importOpts = computeImportOpts.value
const defOpts = Object.assign({
mode: 'insertBottom',
mode: 'insertTop',
message: true,
types: XEUtils.keys(importOpts._typeMaps),
modes: ['insertBottom', 'covering']
modes: ['insertTop', 'covering']
}, importOpts, options)
const types = defOpts.types || []
const modes = defOpts.modes || []
Expand Down
16 changes: 16 additions & 0 deletions packages/table/render/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,24 @@ renderer.mixin({
renderDefault: defaultEditRender
},
VxeUpload: {
renderEdit: defaultEditRender,
renderCell: defaultEditRender,
renderDefault: defaultEditRender
},
VxeImage: {
renderDefault (renderOpts, params) {
const { row, column } = params
const { props } = renderOpts
const cellValue = getCellValue(row, column)
return [
h(getDefaultComponent(renderOpts), {
...props,
src: cellValue,
...getEditOns(renderOpts, params)
})
]
}
},

// 以下已废弃
$input: {
Expand Down
3 changes: 3 additions & 0 deletions packages/toolbar/src/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export default defineComponent({
disabled: child.disabled,
loading: child.loading,
type: child.type,
mode: child.mode,
icon: child.icon,
circle: child.circle,
round: child.round,
Expand Down Expand Up @@ -308,6 +309,7 @@ export default defineComponent({
disabled: item.disabled,
loading: item.loading,
type: item.type,
mode: item.mode,
icon: item.icon,
circle: item.circle,
round: item.round,
Expand Down Expand Up @@ -365,6 +367,7 @@ export default defineComponent({
disabled: item.disabled,
loading: item.loading,
type: item.type,
mode: item.mode,
icon: item.icon,
circle: item.circle,
round: item.round,
Expand Down
2 changes: 1 addition & 1 deletion styles/components/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $btnThemeList: (
font-style: normal;
font-weight: 400;
font-size: 1.1em;
line-height: 1;
line-height: 1em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
&.animat,
Expand Down
38 changes: 28 additions & 10 deletions styles/components/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
/*默认的渲染*/
.vxe-cell,
.vxe-table--filter-template {
& > .vxe-default-input,
& > .vxe-default-textarea {
.vxe-default-input,
.vxe-default-textarea {
background-color: var(--vxe-ui-layout-background-color);
}
& > .vxe-default-input,
& > .vxe-default-textarea,
& > .vxe-default-select {
.vxe-default-input,
.vxe-default-textarea,
.vxe-default-select {
outline: 0;
padding: 0 2px;
width: 100%;
Expand All @@ -68,12 +68,12 @@
background-color: var(--vxe-ui-input-disabled-background-color);
}
}
& > .vxe-default-input,
& > .vxe-default-textarea,
& > .vxe-default-select {
.vxe-default-input,
.vxe-default-textarea,
.vxe-default-select {
height: var(--vxe-ui-input-height-default);
}
& > .vxe-default-input {
.vxe-default-input {
&[type="date"]::-webkit-inner-spin-button {
margin-top: 4px;
}
Expand All @@ -85,7 +85,7 @@
color: var(--vxe-ui-input-placeholder-color);
}
}
& > .vxe-default-textarea {
.vxe-default-textarea {
resize: none;
vertical-align: middle;
}
Expand All @@ -105,6 +105,24 @@
& > .vxe-default-textarea {
resize: none;
}
& > .vxe-cell--tree-node {
.vxe-input,
.vxe-textarea,
.vxe-select,
.vxe-tree-select,
.vxe-date-picker,
.vxe-number-input {
width: 100%;
}
.vxe-input > .vxe-input--inner,
.vxe-textarea > .vxe-textarea--inner {
padding: 0 2px;
}
.vxe-textarea--inner,
.vxe-default-textarea {
resize: none;
}
}
}

.vxe-table--checkbox-range,
Expand Down

0 comments on commit 0c81d70

Please sign in to comment.