weaver_trunk_cli/pc4mobx/hrm/public/valhalla/components/Table.js

33 lines
671 B
JavaScript
Raw Normal View History

2023-03-14 09:11:54 +08:00
import {
observer
} from 'mobx-react';
import {
WeaTableNew,
} from 'comsMobx';
const WeaTable = WeaTableNew.WeaTable;
@observer
export default class Table extends React.Component {
render() {
const {
store
} = this.props, {
tableProps,
tableStore,
onOperatesClick,
reRenderColumns,
} = store;
2024-12-11 15:32:14 +08:00
const width = tableStore.columns.filter(c => c.display === "true").length * 50;
2023-03-14 09:11:54 +08:00
return (
2024-12-11 15:32:14 +08:00
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@j8g47a`}
2023-03-14 09:11:54 +08:00
{...tableProps}
comsWeaTableStore={tableStore}
2024-12-11 15:32:14 +08:00
onOperatesClick={onOperatesClick}
getColumns={reRenderColumns}
tableWidth={width}
2023-03-14 09:11:54 +08:00
/>
);
}
}