Browse Source

表格优化提交

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

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

@ -250,14 +250,18 @@ export function extractTableProps(props: any) {
function columnStyle(item: any) { function columnStyle(item: any) {
let style = ''; let style = '';
if (Object.hasOwnProperty.call(item, 'style')) { if (item.hasOwnProperty('style')) {
style = item.style; style = item.style;
} }
if (Object.hasOwnProperty.call(item, 'width')) { 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; 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; delete item.width;
if (Object.hasOwnProperty.call(item, 'classes')) { if (item.hasOwnProperty('classes')) {
item.classes = item.classes + ' truncate'; item.classes = item.classes + ' truncate';
} else { } else {
item.classes = 'truncate'; item.classes = 'truncate';

Loading…
Cancel
Save