设置当年dataType为string以免不回显,配置报表页面edirow时底部滚动条不变
This commit is contained in:
@@ -276,7 +276,7 @@ const initTable = async () => {
|
||||
if(item.queryIsWeb == 'Y'&&item.isHideSearch !== 'Y') isSearch.value=true
|
||||
if(!!item.searchDefaultValue){
|
||||
if(['年','年度','年份'].includes(item.fieldName)&&item.searchDefaultValue=='本年'){
|
||||
tableSearch.value[config.prop]=getCurrentDate().year
|
||||
tableSearch.value[config.prop]=getCurrentDate().year.toString()
|
||||
}else if( ['月','月度','月份'].includes(item.fieldName)&&item.searchDefaultValue=='本月'){
|
||||
tableSearch.value[config.prop]=new Date().getMonth() + 1
|
||||
}else if(item.fieldType=='Date'&&item.searchDefaultValue=='当日'){
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
:row-class-name="rowClassName"
|
||||
@checkbox-all="(obj) => emit('selection-change', obj)"
|
||||
@checkbox-change="(obj) => emit('selection-change', obj)"
|
||||
@cell-click="(obj) => emit('cell-click', obj)"
|
||||
@cell-click="cellClick"
|
||||
>
|
||||
<vxe-column v-if="tabItem.edit" type="checkbox" width="50" align="center"></vxe-column>
|
||||
<vxe-column type="seq" width="50" align="center"></vxe-column>
|
||||
@@ -106,7 +106,16 @@ const testClick = (row) => {
|
||||
console.log('测试按钮被点击:', row)
|
||||
alert('测试按钮工作正常!')
|
||||
}
|
||||
|
||||
const cellClick = (obj) => {
|
||||
const scrollLeft = vxeTableRef.value.getScroll().scrollLeft
|
||||
const scrollTop = vxeTableRef.value.getScroll().scrollTop
|
||||
emit('cell-click', obj)
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
vxeTableRef.value.scrollTo(scrollLeft,scrollTop)
|
||||
}, 1)
|
||||
})
|
||||
}
|
||||
defineExpose({ vxeTableRef })
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user