Browse Source

表格优化提交

main
likunming 1 year ago
parent
commit
7944e13ede
  1. 12
      io.sc.platform.core.frontend/src/platform/components/utils/componentComm.ts

12
io.sc.platform.core.frontend/src/platform/components/utils/componentComm.ts

@ -250,14 +250,18 @@ export function extractTableProps(props: any) {
function columnStyle(item: any) {
let style = '';
if (Object.hasOwnProperty.call(item, 'style')) {
if (item.hasOwnProperty('style')) {
style = item.style;
}
if (Object.hasOwnProperty.call(item, 'width')) {
item.style = `min-width: ` + item.width + `px; width: ` + item.width + `px;max-width: ` + item.width + `px;` + style;
if (item.hasOwnProperty('width')) {
if (typeof item.width === 'number') {
item.style = `min-width: ` + item.width + `px; width: ` + item.width + `px;max-width: ` + item.width + `px;` + style;
} else {
item.style = `min-width: ` + item.width + `; width: ` + item.width + `;max-width: ` + item.width + `;` + style;
}
delete item.width;
if (Object.hasOwnProperty.call(item, 'classes')) {
if (item.hasOwnProperty('classes')) {
item.classes = item.classes + ' truncate';
} else {
item.classes = 'truncate';

Loading…
Cancel
Save