Skip to content

Commit 6a4a37d

Browse files
committed
docs: optimize docs
1 parent 3490ba8 commit 6a4a37d

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

examples/sites/demos/apis/form.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ export default {
153153
name: 'overflow-title',
154154
type: 'boolean',
155155
defaultValue: 'false',
156+
meta: {
157+
stable: '3.15.0'
158+
},
156159
desc: {
157160
'zh-CN': '标签超长是否显示提示',
158161
'en-US': 'Does the label display a prompt if it is too long'

examples/sites/demos/apis/grid.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,10 +2008,10 @@ export default {
20082008
},
20092009
{
20102010
name: 'handleFetch',
2011-
type: '() => Promise',
2011+
type: '(code: "reload") => Promise<null>',
20122012
defaultValue: '',
20132013
desc: {
2014-
'zh-CN': '触发表格的 fetch-data ',
2014+
'zh-CN': '触发表格的 fetch-data,当 code="reload" 时会将分支重置为 1,且清除筛选、排序等条件',
20152015
'en-US': 'Trigger the fetch-data of the table'
20162016
},
20172017
mode: ['pc', 'mobile-first'],

packages/vue/src/grid/src/fetch-data/src/methods.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export default {
2323
return { api, dataset, fields, loading, isReloadFilter, isReloadScroll }
2424
}
2525
},
26+
/* 第二个参数sortArg参数可以移除,fetchData.args可以传递更加灵活的参数
27+
但为避免破坏性变更,暂保留
28+
*/
2629
handleFetch(code, sortArg) {
2730
let { pager, sortData, filterData, pagerConfig, fetchOption, fetchData, dataset } = this as any
2831
let { reloadConfig = {} } = fetchData
@@ -34,6 +37,7 @@ export default {
3437
this.columnAnchor && this.clearActiveAnchor()
3538
}
3639

40+
// 文档暂不暴露prefetch,这里只清空单选不清空多选状态有点奇怪
3741
if (code !== 'prefetch') {
3842
this.clearRadioRow()
3943
!scroll && this.resetScrollTop()
@@ -84,7 +88,7 @@ export default {
8488
}
8589

8690
if (fetchData && fetchData.api) {
87-
search = fetchData.api.apply(this, [params])
91+
search = fetchData.api(params)
8892
} else {
8993
search = getDataset({ dataset, service: this.$service }, params)
9094
}

0 commit comments

Comments
 (0)