opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.54k stars 253 forks source link

🐛 [Bug]: Grid组件,针对普通数据表格的大数据场景(非树表虚拟滚动),启动虚拟滚动后,触发切换到表格行内编辑时,使用manual方式,第一次调用setActiveCell方法时会出现table自动滚动偏移现象 #2006

Open tuoqiang opened 2 weeks ago

tuoqiang commented 2 weeks ago

Version

"@opentiny/vue": "3.16.0",

Vue Version

"vue": "3.4.29",

Link to minimal reproduction

interface IEditConfig { // 激活触发方式 trigger: 'manual' // 激活类型单元格激活或者行 mode: 'cell' | 'row' // 是否显示状态 showStatus?: boolean // 自定义编辑规则,返回true可以编辑返回false则禁止编辑 activeMethod?: ({row: IRow, column: IColumnConfig})=> boolean }

针对普通数据表格的大数据场景(非树表虚拟滚动),启动虚拟滚动后,触发切换到表格行内编辑态时,使用manual方式(其他方式不会出现该偏移问题),调用setActiveCell时,第一次调用setActiveCel,会出现table自动滚动偏移现象。浏览器开发者工具查看table的dom元素时,以manual方式触发调用setActiveCell时, 会发现transform: translateY(0px);的y值会变化 。 浏览器开发者工具dom元素代码如下

我的配置参数 const editConfig = ref({ trigger: 'manual', // manual会出现偏移 mode: 'cell', showStatus: true, activeMethod, }) ### Step to reproduce interface IEditConfig { // 激活触发方式 trigger: 'manual' // 激活类型单元格激活或者行 mode: 'cell' | 'row' // 是否显示状态 showStatus?: boolean // 自定义编辑规则,返回true可以编辑返回false则禁止编辑 activeMethod?: ({row: IRow, column: IColumnConfig})=> boolean } 针对普通数据表格的大数据场景(非树表虚拟滚动),启动虚拟滚动后,触发切换到表格行内编辑态时,使用manual方式(其他方式不会出现该偏移问题),调用setActiveCell时,第一次调用setActiveCel,会出现table自动滚动偏移现象。浏览器开发者工具查看table的dom元素时,以manual方式触发调用setActiveCell时, 会发现transform: translateY(0px);的y值会变化 。 浏览器开发者工具dom元素代码如下
我的配置参数 const editConfig = ref({ trigger: 'manual', // manual会出现偏移 mode: 'cell', showStatus: true, activeMethod, }) ### What is expected _No response_ ### What is actually happening _No response_ ### What is your project name Industrial Open Platform System ### Any additional comments (optional) _No response_
Issues-translate-bot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: Grid component, for big data scenarios of ordinary data tables (non-tree table virtual scrolling), after starting virtual scrolling, when triggering the switch to table row editing, use manual mode, first When the setActiveCell method is called for the first time, the table will automatically scroll and offset.