|
|
@ -197,7 +197,7 @@ |
|
|
|
</template> |
|
|
|
<template v-else> 共 {{ state.pagination.rowsNumber }} 条记录 </template> |
|
|
|
</template> |
|
|
|
<template v-if="!attrs.hideBottom" #no-data="{ message }"> |
|
|
|
<template v-if="!attrs['hide-bottom']" #no-data="{ message }"> |
|
|
|
<div class="full-width row flex-center text-dark q-gutter-sm" :style="`height:` + noDataBottomHeightComputed"> |
|
|
|
<q-icon size="2em" :name="IconEnum.提示" /> |
|
|
|
<span> |
|
|
@ -1092,7 +1092,7 @@ const tableHeightComputed = computed(() => { |
|
|
|
mainPaddingBottom - |
|
|
|
mainContainerPaddingBottom - |
|
|
|
otherHeight; |
|
|
|
if ((table.rows && table.rows.length > 0) || attrs.hideBottom) { |
|
|
|
if ((table.rows && table.rows.length > 0) || attrs['hide-bottom']) { |
|
|
|
return { |
|
|
|
height: props.height > 0 ? props.height + 'px' : resultHeight + 'px', |
|
|
|
}; |
|
|
@ -1179,7 +1179,7 @@ const onResize = () => { |
|
|
|
state.refHeightWidth.middleScrollWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
|
state.refHeightWidth.columnHeadHeight = tableRef.value.$el.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
|
// 判断是否有数据,没数据修改 middleHeight |
|
|
|
if ((table.rows && table.rows.length > 0) || attrs.hideBottom) { |
|
|
|
if ((table.rows && table.rows.length > 0) || attrs['hide-bottom']) { |
|
|
|
state.refHeightWidth.middleHeight = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
|
} else { |
|
|
|
let scrollHeight = 0; |
|
|
@ -1553,7 +1553,7 @@ const stickyHeaderColumn = (time = 500) => { |
|
|
|
state.refHeightWidth.columnHeadHeight = tableRef.value.$el.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
|
state.refHeightWidth.tableTitleWidth = tableRef.value.$el.getElementsByClassName('_table-title')[0]?.clientWidth; |
|
|
|
// 判断是否有数据,没数据修改 middleHeight |
|
|
|
if ((table.rows && table.rows.length > 0) || attrs.hideBottom) { |
|
|
|
if ((table.rows && table.rows.length > 0) || attrs['hide-bottom']) { |
|
|
|
state.refHeightWidth.middleHeight = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
|
} else { |
|
|
|
let scrollHeight = 0; |
|
|
@ -1646,10 +1646,10 @@ const stickyHeaderColumn = (time = 500) => { |
|
|
|
} |
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--tableBodyPadding', bodyPadding); |
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--tableBodyHeight', (denseBodyComputed.value ? 24 : 48) + 'px'); |
|
|
|
if (denseBottomComputed.value && !attrs.hideBottom) { |
|
|
|
if (denseBottomComputed.value && (!attrs.hasOwnProperty('hide-bottom') || attrs['hide-bottom'] === false)) { |
|
|
|
tableRef.value.$el.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomHeight', 33 + 'px'); |
|
|
|
tableRef.value.$el.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomButtonHeight', 24 + 'px'); |
|
|
|
} else if (!attrs.hideBottom) { |
|
|
|
} else if (!attrs.hasOwnProperty('hide-bottom') || attrs['hide-bottom'] === false) { |
|
|
|
tableRef.value.$el.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomHeight', 50 + 'px'); |
|
|
|
tableRef.value.$el.getElementsByClassName('q-table__bottom')[0].style.setProperty('--tableBottomButtonHeight', 40 + 'px'); |
|
|
|
} |
|
|
@ -2151,9 +2151,9 @@ const instance = getCurrentInstance(); |
|
|
|
VueTools.expose2Instance(instance); |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="css"> |
|
|
|
/* :deep(.q-table__top) { |
|
|
|
padding: 8px 8px; |
|
|
|
<style scoped lang="css"> |
|
|
|
:deep(.q-table__top) { |
|
|
|
padding: var(--tableTopPadding) var(--tableTopPadding); |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-table tr:first-child th:first-child) { |
|
|
@ -2186,20 +2186,20 @@ VueTools.expose2Instance(instance); |
|
|
|
min-height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-field__control q-field__append) { |
|
|
|
:deep(.q-table__control .q-field__control q-field__append) { |
|
|
|
height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-field__control-container .q-field__native) { |
|
|
|
:deep(.q-table__control .q-field__control-container .q-field__native) { |
|
|
|
min-height: var(--tableBottomButtonHeight); |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-field__control .q-field__marginal) { |
|
|
|
:deep(.q-table__control .q-field__control .q-field__marginal) { |
|
|
|
height: var(--tableBottomButtonHeight); |
|
|
|
} */ |
|
|
|
} |
|
|
|
|
|
|
|
.q-table__top { |
|
|
|
/* .q-table__top { |
|
|
|
padding: var(--tableTopPadding) var(--tableTopPadding); |
|
|
|
} |
|
|
|
|
|
|
@ -2244,7 +2244,7 @@ VueTools.expose2Instance(instance); |
|
|
|
|
|
|
|
.q-field__control .q-field__marginal { |
|
|
|
height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
} */ |
|
|
|
|
|
|
|
.sticky-header-column-table thead tr { |
|
|
|
height: var(--tableColumnTitleHeight); |
|
|
|