We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vben Admin
useTable里设置size:'small'结果项目里用到的basicTable全都成了small
`
const { createMessage } = useMessage(); function onChange() { console.log('onChange', arguments); } const [ registerTable, { setLoading, setProps, getColumns, getDataSource, getRawDataSource, reload, getPaginationRef, setPagination, getSelectRows, getSelectRowKeys, setSelectedRowKeys, clearSelectedRowKeys, }, ] = useTable({ canResize: true, title: 'useTable示例', titleHelpMessage: '使用useTable调用表格内方法', api: demoListApi, columns: getBasicColumns(), defSort: { field: 'name', order: 'ascend', }, rowKey: 'id', showTableSetting: true, onChange, rowSelection: { type: 'checkbox', }, onColumnsChange: (data: ColumnChangeParam[]) => { console.log('ColumnsChanged', data); }, showSelectionBar: true, // 显示多选状态栏 size: 'small', });
function changeLoading() { setLoading(true); setTimeout(() => { setLoading(false); }, 1000); } function changeColumns() { setProps({ columns: getBasicShortColumns(), rowSelection: { type: 'checkbox', }, showIndexColumn: true, }); } function reloadTable() { setProps({ columns: getBasicColumns(), rowSelection: { type: 'checkbox', }, showIndexColumn: true, }); reload({ page: 1, }); } function getColumn() { createMessage.info('请在控制台查看!'); console.log(getColumns()); }
function getTableData() { createMessage.info('请在控制台查看!'); console.log(getDataSource()); }
function getTableRawData() { createMessage.info('请在控制台查看!'); console.log(getRawDataSource()); }
function getPagination() { createMessage.info('请在控制台查看!'); console.log(getPaginationRef()); }
function setPaginationInfo() { setPagination({ current: 2, }); reload(); } function getSelectRowList() { createMessage.info('请在控制台查看!'); console.log(getSelectRows()); } function getSelectRowKeyList() { createMessage.info('请在控制台查看!'); console.log(getSelectRowKeys()); } function setSelectedRowKeyList() { setSelectedRowKeys(['0', '1', '2']); } function clearSelect() { clearSelectedRowKeys(); } </script>
System: OS: Windows 11 10.0.26120 CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics Memory: 2.91 GB / 15.87 GB Binaries: Node: 20.12.2 - C:\Program Files\nodejs\node.EXE npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD pnpm: 9.6.0 - ~\AppData\Local\pnpm\pnpm.CMD Browsers: Edge: Chromium (127.0.2651.31) Internet Explorer: 11.0.26100.1
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
Vben Admin
Describe the bug?
useTable里设置size:'small'结果项目里用到的basicTable全都成了small

Reproduction
`
const { createMessage } = useMessage();
function onChange() {
console.log('onChange', arguments);
}
const [
registerTable,
{
setLoading,
setProps,
getColumns,
getDataSource,
getRawDataSource,
reload,
getPaginationRef,
setPagination,
getSelectRows,
getSelectRowKeys,
setSelectedRowKeys,
clearSelectedRowKeys,
},
] = useTable({
canResize: true,
title: 'useTable示例',
titleHelpMessage: '使用useTable调用表格内方法',
api: demoListApi,
columns: getBasicColumns(),
defSort: {
field: 'name',
order: 'ascend',
},
rowKey: 'id',
showTableSetting: true,
onChange,
rowSelection: {
type: 'checkbox',
},
onColumnsChange: (data: ColumnChangeParam[]) => {
console.log('ColumnsChanged', data);
},
showSelectionBar: true, // 显示多选状态栏
size: 'small',
});
function changeLoading() {
setLoading(true);
setTimeout(() => {
setLoading(false);
}, 1000);
}
function changeColumns() {
setProps({
columns: getBasicShortColumns(),
rowSelection: {
type: 'checkbox',
},
showIndexColumn: true,
});
}
function reloadTable() {
setProps({
columns: getBasicColumns(),
rowSelection: {
type: 'checkbox',
},
showIndexColumn: true,
});
reload({
page: 1,
});
}
function getColumn() {
createMessage.info('请在控制台查看!');
console.log(getColumns());
}
function getTableData() {
createMessage.info('请在控制台查看!');
console.log(getDataSource());
}
function getTableRawData() {
createMessage.info('请在控制台查看!');
console.log(getRawDataSource());
}
function getPagination() {
createMessage.info('请在控制台查看!');
console.log(getPaginationRef());
}
function setPaginationInfo() {
setPagination({
current: 2,
});
reload();
}
function getSelectRowList() {
createMessage.info('请在控制台查看!');
console.log(getSelectRows());
}
function getSelectRowKeyList() {
createMessage.info('请在控制台查看!');
console.log(getSelectRowKeys());
}
function setSelectedRowKeyList() {
setSelectedRowKeys(['0', '1', '2']);
}
function clearSelect() {
clearSelectedRowKeys();
}
</script>
`
System Info
Relevant log output
No response
Validations
The text was updated successfully, but these errors were encountered: