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', name: 'overflow-title',
type: 'boolean', type: 'boolean',
defaultValue: 'false', defaultValue: 'false',
meta: {
stable: '3.15.0'
},
desc: { desc: {
'zh-CN': '标签超长是否显示提示', 'zh-CN': '标签超长是否显示提示',
'en-US': 'Does the label display a prompt if it is too long' 'en-US': 'Does the label display a prompt if it is too long'

View File

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

View File

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

View File

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