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:
parent
25bf285ab1
commit
a33f861209
|
@ -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'
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -23,6 +23,9 @@ export default {
|
|||
return { api, dataset, fields, loading, isReloadFilter, isReloadScroll }
|
||||
}
|
||||
},
|
||||
/* 第二个参数sortArg参数可以移除,fetchData.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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue