fix(grid): fix custom setting style error at mobile-first (#3524)

* fix(grid): fix custom setting style error at mobile-first

* docs: optimize docs
This commit is contained in:
gimmyhehe 2025-06-23 14:12:15 +08:00 committed by GitHub
parent 25bf285ab1
commit a33f861209
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 3 deletions

View File

@ -153,6 +153,9 @@ export default {
name: 'overflow-title',
type: 'boolean',
defaultValue: 'false',
meta: {
stable: '3.15.0'
},
desc: {
'zh-CN': '标签超长是否显示提示',
'en-US': 'Does the label display a prompt if it is too long'

View File

@ -2008,10 +2008,10 @@ export default {
},
{
name: 'handleFetch',
type: '() => Promise',
type: '(code: "reload") => Promise<null>',
defaultValue: '',
desc: {
'zh-CN': '触发表格的 fetch-data ',
'zh-CN': '触发表格的 fetch-data,当 code="reload" 时会将分支重置为 1且清除筛选、排序等条件',
'en-US': 'Trigger the fetch-data of the table'
},
mode: ['pc', 'mobile-first'],

View File

@ -1,6 +1,9 @@
<template>
<!-- 同步勿删此处custom适配不了多端因此需要固定Modal为pc端 -->
<tiny-modal
width="800"
tiny_mode="pc"
tiny_mode_root
title=" "
class="tiny-grid-toolbar-modal"
v-model="visible"

View File

@ -23,6 +23,9 @@ export default {
return { api, dataset, fields, loading, isReloadFilter, isReloadScroll }
}
},
/* sortArgfetchData.args
*/
handleFetch(code, sortArg) {
let { pager, sortData, filterData, pagerConfig, fetchOption, fetchData, dataset } = this as any
let { reloadConfig = {} } = fetchData
@ -34,6 +37,7 @@ export default {
this.columnAnchor && this.clearActiveAnchor()
}
// 文档暂不暴露prefetch这里只清空单选不清空多选状态有点奇怪
if (code !== 'prefetch') {
this.clearRadioRow()
!scroll && this.resetScrollTop()
@ -84,7 +88,7 @@ export default {
}
if (fetchData && fetchData.api) {
search = fetchData.api.apply(this, [params])
search = fetchData.api(params)
} else {
search = getDataset({ dataset, service: this.$service }, params)
}