Skip to content

Commit

Permalink
releases 4.7.81
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Sep 23, 2024
1 parent af2fb24 commit 881d869
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.7.80",
"version": "4.7.81",
"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.1.29"
"vxe-pc-ui": "^4.2.0"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down Expand Up @@ -61,7 +61,7 @@
"gulp-typescript": "^5.0.1",
"gulp-uglify": "^3.0.2",
"postcss": "^8.4.38",
"sass": "^1.77.8",
"sass": "^1.79.3",
"sass-loader": "^14.2.0",
"typescript": "~4.5.5",
"vue": "3.5.5",
Expand Down
25 changes: 16 additions & 9 deletions packages/grid/src/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,12 @@ export default defineComponent({
}
}
if (isInited) {
const { computeSortOpts } = $xeTable.getComputeMaps()
const sortOpts = computeSortOpts.value
let defaultSort = sortOpts.defaultSort
let defaultSort = null
if ($xeTable) {
const { computeSortOpts } = $xeTable.getComputeMaps()
const sortOpts = computeSortOpts.value
defaultSort = sortOpts.defaultSort
}
// 如果使用默认排序
if (defaultSort) {
if (!XEUtils.isArray(defaultSort)) {
Expand All @@ -848,14 +851,18 @@ export default defineComponent({
}
})
}
filterList = $xeTable.getCheckedFilters()
} else {
if (isReload) {
$xeTable.clearAll()
} else {
sortList = $xeTable.getSortColumns()
if ($xeTable) {
filterList = $xeTable.getCheckedFilters()
}
} else {
if ($xeTable) {
if (isReload) {
$xeTable.clearAll()
} else {
sortList = $xeTable.getSortColumns()
filterList = $xeTable.getCheckedFilters()
}
}
}
const commitParams = {
code,
Expand Down
12 changes: 2 additions & 10 deletions packages/table/render/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function getFormatDate (value: any, props: any, defaultFormat: string) {
}

function getLabelFormatDate (value: any, props: any) {
return getFormatDate(value, props, getI18n(`vxe.input.date.labelFormat.${props.type}`))
return getFormatDate(value, props, getI18n(`vxe.input.date.labelFormat.${props.type || 'date'}`))
}

/**
Expand Down Expand Up @@ -629,15 +629,7 @@ renderer.mixin({
const { row, column } = params
let cellValue = XEUtils.get(row, column.field)
if (cellValue) {
switch (props.type) {
case 'date':
case 'week':
case 'month':
case 'quarter':
case 'year':
cellValue = getLabelFormatDate(cellValue, props)
break
}
cellValue = getLabelFormatDate(cellValue, props)
}
return getCellLabelVNs(renderOpts, params, cellValue)
},
Expand Down
5 changes: 5 additions & 0 deletions packages/toolbar/src/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ export default defineComponent({
round: child.round,
status: child.status,
content: child.name,
routerLink: item.routerLink,
permissionCode: item.permissionCode,
onClick: ({ $event }) => isBtn ? btnEvent($event, child) : tolEvent($event, child)
})
: createCommentVNode()
Expand Down Expand Up @@ -352,6 +354,7 @@ export default defineComponent({
round: item.round,
status: item.status,
content: item.name,
routerLink: item.routerLink,
permissionCode: item.permissionCode,
destroyOnClose: item.destroyOnClose,
placement: item.placement,
Expand Down Expand Up @@ -408,6 +411,8 @@ export default defineComponent({
round: item.round,
status: item.status,
content: item.name,
routerLink: item.routerLink,
permissionCode: item.permissionCode,
destroyOnClose: item.destroyOnClose,
placement: item.placement,
transfer: item.transfer,
Expand Down

0 comments on commit 881d869

Please sign in to comment.