|
|
@ -325,36 +325,38 @@ export class Operator extends Base { |
|
|
|
} |
|
|
|
}, time); |
|
|
|
|
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableHeadBgColor', this.table?.color.headBgColor); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--stickyBgColor', this.table?.color.stickyBgColor); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableBorderColor', this.table?.color.borderColor); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableColumnTitleHeight', (this.tools?.cm.denseHeader.value ? 28 : 48) + 'px'); |
|
|
|
let headerPadding = '8px'; |
|
|
|
if (this.tools?.cm.denseHeader) { |
|
|
|
headerPadding = '4px'; |
|
|
|
} |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableHeaderPadding', headerPadding); |
|
|
|
let bodyPadding = '8px'; |
|
|
|
if (this.tools?.cm.denseBody) { |
|
|
|
bodyPadding = '4px'; |
|
|
|
} |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableBodyPadding', bodyPadding); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableBodyHeight', (this.tools?.cm.denseBody.value ? 24 : 48) + 'px'); |
|
|
|
nextTick(() => { |
|
|
|
if (this.tools?.cm.denseBody.value && !this.props.hideBottom) { |
|
|
|
if (tableElement.getElementsByClassName('q-table__bottom').length > 0) { |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomHeight', 33 + 'px'); |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomButtonHeight', 24 + 'px'); |
|
|
|
if (tableElement) { |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableHeadBgColor', this.table?.color.headBgColor); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--stickyBgColor', this.table?.color.stickyBgColor); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableBorderColor', this.table?.color.borderColor); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableColumnTitleHeight', (this.tools?.cm.denseHeader.value ? 28 : 48) + 'px'); |
|
|
|
let headerPadding = '8px'; |
|
|
|
if (this.tools?.cm.denseHeader) { |
|
|
|
headerPadding = '4px'; |
|
|
|
} |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableHeaderPadding', headerPadding); |
|
|
|
let bodyPadding = '8px'; |
|
|
|
if (this.tools?.cm.denseBody) { |
|
|
|
bodyPadding = '4px'; |
|
|
|
} |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableBodyPadding', bodyPadding); |
|
|
|
tableElement.getElementsByTagName('table')[0].style.setProperty('--tableBodyHeight', (this.tools?.cm.denseBody.value ? 24 : 48) + 'px'); |
|
|
|
nextTick(() => { |
|
|
|
if (this.tools?.cm.denseBody.value && !this.props.hideBottom) { |
|
|
|
if (tableElement.getElementsByClassName('q-table__bottom').length > 0) { |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomHeight', 33 + 'px'); |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomButtonHeight', 24 + 'px'); |
|
|
|
} |
|
|
|
} else if (!this.props.hideBottom && tableElement.getElementsByClassName('q-table__bottom').length > 0) { |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomHeight', 50 + 'px'); |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomButtonHeight', 40 + 'px'); |
|
|
|
} |
|
|
|
} else if (!this.props.hideBottom && tableElement.getElementsByClassName('q-table__bottom').length > 0) { |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomHeight', 50 + 'px'); |
|
|
|
tableElement.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomButtonHeight', 40 + 'px'); |
|
|
|
}); |
|
|
|
if (this.props.title || this.props.toolbarActions.length > 0 || this.props.configButton) { |
|
|
|
tableElement.getElementsByClassName('q-table__top')[0].style.setProperty('--tableTopPadding', '8px'); |
|
|
|
} else { |
|
|
|
tableElement.getElementsByClassName('q-table__top')[0].style.setProperty('--tableTopPadding', '0px'); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (this.props.title || this.props.toolbarActions.length > 0 || this.props.configButton) { |
|
|
|
tableElement.getElementsByClassName('q-table__top')[0].style.setProperty('--tableTopPadding', '8px'); |
|
|
|
} else { |
|
|
|
tableElement.getElementsByClassName('q-table__top')[0].style.setProperty('--tableTopPadding', '0px'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|