Skip to content

Commit 8a28002

Browse files
committed
增加生成页面清除选中行方法
1 parent 477bea0 commit 8a28002

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

vol.web/src/components/basic/ViewGrid/ViewGridExposeMethods.jsx

+12
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ export const initMethods = (proxy, props, dataConfig) => {
7373
const getSelected = () => {
7474
return getSelectRows()
7575
}
76+
77+
//主表点击行选中当前行
78+
const toggleRowSelection = (row) => {
79+
getGridTableRef(proxy, props, true).toggleRowSelection(row);
80+
}
81+
//清除选中的行
82+
const clearSelection=()=>{
83+
getGridTableRef(proxy, props, true).clearSelection();
84+
}
85+
7686
//获取明细表选中的行
7787
const getDetailSelectRows = (table) => {
7888
return getDetailTableRef(proxy, props, table).getSelected()
@@ -120,6 +130,8 @@ export const initMethods = (proxy, props, dataConfig) => {
120130
editFormTabClick,
121131
getSelectRows,
122132
getSelected,
133+
toggleRowSelection,
134+
clearSelection,
123135
getDetailSelectRows,
124136
getTable,
125137
getTableRef,

0 commit comments

Comments
 (0)