Skip to content

chore: sync 3.21.0 to dev 250208 #2871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto-all-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
script: |
const tag = `${{ github.ref_name }}`
const branchVersion = tag.slice(1)
const branchVersion = tag.slice(1).split('.').slice(0, 2).join('.') + '.0'
core.setOutput('branchVersion', branchVersion)

- name: CheckOut Code
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue-theme",
"type": "module",
"version": "3.21.1",
"version": "3.21.2",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"author": "OpenTiny Team",
"license": "MIT",
Expand Down Expand Up @@ -93,4 +93,4 @@
]
}
}
}
}
8 changes: 4 additions & 4 deletions packages/theme/src/base/reset.less
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@
}

// 有箭头的场景,统一规范所有样式
.tiny-popconfirm-popover:has(.popper__arrow),
.tiny-popper:has(.popper__arrow),
.tiny-tooltip__popper:has(.popper__arrow) {
.tiny-popconfirm-popover,
.tiny-popper,
.tiny-tooltip__popper {
.popper__arrow {
position: absolute;
display: block;
Expand Down Expand Up @@ -243,4 +243,4 @@
right: -3px;
}
}
}
}
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue",
"private": true,
"version": "3.21.1",
"version": "3.21.2",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"homepage": "https://opentiny.design/tiny-vue",
"keywords": [
Expand Down Expand Up @@ -261,4 +261,4 @@
"build": "pnpm -w build:ui",
"postversion": "pnpm build"
}
}
}
2 changes: 1 addition & 1 deletion packages/vue/src/grid/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue-grid",
"type": "module",
"version": "3.21.1",
"version": "3.21.2",
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
14 changes: 7 additions & 7 deletions packages/vue/src/grid/src/body/src/body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,12 @@ function renderDefEmpty(h) {
}

const syncHeaderAndFooterScroll = ({ bodyElem, footerElem, headerElem, isX }) => {
const scrollLeft = bodyElem.scrollLeft
if (isX && headerElem) {
headerElem.scrollLeft = bodyElem.scrollLeft
headerElem.scrollLeft = scrollLeft
}
if (isX && footerElem) {
footerElem.scrollLeft = bodyElem.scrollLeft
footerElem.scrollLeft = scrollLeft
}
}

Expand Down Expand Up @@ -871,10 +872,6 @@ export default defineComponent({
// 空数据元素
elemStore[`${keyPrefix}emptyBlock`] = $refs.emptyBlock

// 表体第一层div监听滚动事件
$el.onscroll = this.scrollEvent
$el._onscroll = this.scrollEvent

if (dropConfig) {
const { plugin, row = true } = dropConfig
plugin && row && (this.rowSortable = $table.rowDrop(this.$el))
Expand Down Expand Up @@ -908,7 +905,10 @@ export default defineComponent({
'div',
{
ref: 'body',
class: ['tiny-grid__body-wrapper', 'body__wrapper', { [classMap.isScrollload]: scrollLoad }]
class: ['tiny-grid__body-wrapper', 'body__wrapper', { [classMap.isScrollload]: scrollLoad }],
on: {
scroll: this.scrollEvent
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the scroll event is properly debounced or throttled to prevent performance issues during rapid scrolling.

},
[
// 表格主体内容x轴方向虚拟滚动条占位元素
Expand Down
6 changes: 4 additions & 2 deletions packages/vue/src/grid/src/table/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1645,8 +1645,10 @@ const Methods = {
// 设置新的渲染列触发Vue渲染
this.tableColumn = ret.tableColumn
this.visibleColumnChanged = ret.visibleColumnChanged

this.$nextTick(this.updateStyle)
this.$nextTick(() => {
this.updateFooter()
this.updateStyle()
})
})
},
// 更新横向 X 可视渲染上下剩余空间大小
Expand Down
7 changes: 7 additions & 0 deletions packages/vue/src/grid/src/table/src/utils/updateStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function getTableWidth({ scrollXLoad, tWidth, tableColumn }) {
}

function layoutFooter({
elemStore,
customHeight,
footerHeight,
headerHeight,
Expand All @@ -61,6 +62,11 @@ function layoutFooter({
let tWidth = tableWidth
// 如果是固定列与设置了超出隐藏
let ret = getTableWidth({ scrollXLoad, tWidth, tableColumn })
// 为表尾设置虚拟滚动占位宽度
const spaceElem = elemStore['main-footer-x-space']
if (spaceElem) {
spaceElem.style.width = `${tableWidth}px`
}

tableColumn = ret.tableColumn
tWidth = ret.tWidth
Expand Down Expand Up @@ -242,6 +248,7 @@ export function handleLayout(params) {
tableColumn = ret.tableColumn
} else if (layout === 'footer') {
tableColumn = layoutFooter({
elemStore,
customHeight,
fixedWrapperElem,
footerHeight,
Expand Down
Loading