|
|
@ -2,22 +2,23 @@ |
|
|
|
<div> |
|
|
|
<q-table |
|
|
|
ref="tableRef" |
|
|
|
v-model:pagination="table.pagination" |
|
|
|
v-model:pagination="state.pagination" |
|
|
|
v-model:selected="table.selected" |
|
|
|
flat |
|
|
|
binary-state-sort |
|
|
|
:no-data-label="table.noDataLabel" |
|
|
|
:loading-label="table.loadingLabel" |
|
|
|
:no-data-label="state.noDataLabel" |
|
|
|
:loading-label="state.loadingLabel" |
|
|
|
v-bind="attrs" |
|
|
|
:selection="selectionComputed" |
|
|
|
separator="cell" |
|
|
|
:rows="table.rows" |
|
|
|
:columns="extractTableColumns" |
|
|
|
:rows-per-page-options="pageable && !tree && table.refHeightWidth.middleWidth > 600 ? table.pagination.rowsPerPageOptions : []" |
|
|
|
:loading="table.loading" |
|
|
|
:rows-per-page-options="pageable && !tree && state.refHeightWidth.middleWidth > 600 ? state.pagination.rowsPerPageOptions : []" |
|
|
|
:loading="state.loading" |
|
|
|
:class="tableClassComputed" |
|
|
|
:table-style="tableHeightComputed" |
|
|
|
:row-key="rowKey_" |
|
|
|
:visible-columns="visibleColumnsComputed" |
|
|
|
@request="onRequest" |
|
|
|
@fullscreen="tableFullscreenFun" |
|
|
|
> |
|
|
@ -29,6 +30,7 @@ |
|
|
|
<div class="flex-none">{{ title }}</div> |
|
|
|
<div class="flex-1"> |
|
|
|
<w-toolbar |
|
|
|
:dense="denseToolbarComputed" |
|
|
|
v-bind="toolbarConfigure" |
|
|
|
:buttons="buttons_" |
|
|
|
:grid-props="{ |
|
|
@ -37,11 +39,11 @@ |
|
|
|
}" |
|
|
|
></w-toolbar> |
|
|
|
</div> |
|
|
|
<div v-if="fullScreenButton" class="flex-none pl-1"> |
|
|
|
<q-btn :icon="scope.inFullscreen ? IconEnum.退出全屏 : IconEnum.全屏" unelevated outline @click="scope.toggleFullscreen"> |
|
|
|
<q-tooltip transition-show="rotate" transition-hide="rotate"> |
|
|
|
{{ scope.inFullscreen ? '退出全屏' : '全屏' }} |
|
|
|
</q-tooltip> |
|
|
|
<div v-if="configButton" class="flex-none pl-1"> |
|
|
|
<q-btn round dense :size="denseToolbarComputed ? '13px' : '14px'" :icon="IconEnum.设置" unelevated outline> |
|
|
|
<q-popup-proxy v-model="table.gridConfig"> |
|
|
|
<GridConfig :scope="scope" :grid-props="props" :more-column-title-array="columnTitleState.columnTitleArr" :grid="instance"></GridConfig> |
|
|
|
</q-popup-proxy> |
|
|
|
</q-btn> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -52,13 +54,15 @@ |
|
|
|
<template v-if="columnTitleState.columnTitleRowNum > 1"> |
|
|
|
<q-tr v-for="(r, rIndex) in columnTitleState.columnTitleArr" :key="rIndex"> |
|
|
|
<q-th |
|
|
|
v-if="rIndex === 0 && selectionComputed === 'multiple' && props.checkboxSelection && !props.tree" |
|
|
|
v-if="rIndex === 0 && selectionComputed === 'multiple' && table.checkboxSelection && !props.tree" |
|
|
|
:rowspan="columnTitleState.columnTitleRowNum" |
|
|
|
:style="moreColumnTitleTableSelectionStyle" |
|
|
|
> |
|
|
|
<q-checkbox v-model="scope.selected" flat :dense="denseHeader || attrs.dense ? true : false" /> |
|
|
|
<q-checkbox v-model="scope.selected" flat :dense="denseHeaderComputed" /> |
|
|
|
</q-th> |
|
|
|
<q-th v-if="rIndex === 0 && table.sortNo && !props.tree" :rowspan="columnTitleState.columnTitleRowNum" :style="moreColumnTitleTableSortNoStyle"> |
|
|
|
序号 |
|
|
|
</q-th> |
|
|
|
<q-th v-if="rIndex === 0 && props.sortNo" :rowspan="columnTitleState.columnTitleRowNum" :style="moreColumnTitleTableSortNoStyle"> 序号 </q-th> |
|
|
|
<q-th |
|
|
|
v-for="c in r" |
|
|
|
:key="c.name" |
|
|
@ -67,6 +71,7 @@ |
|
|
|
:style="thStyleHandler(c, scope)" |
|
|
|
:class="c.classes" |
|
|
|
:props="titleScopeHandler(c, scope)" |
|
|
|
style="font-weight: bold" |
|
|
|
> |
|
|
|
{{ c.label }} |
|
|
|
</q-th> |
|
|
@ -75,33 +80,33 @@ |
|
|
|
<template v-else> |
|
|
|
<q-tr :props="scope"> |
|
|
|
<q-th |
|
|
|
v-if="selectionComputed === 'multiple' && props.checkboxSelection && !props.tree" |
|
|
|
v-if="selectionComputed === 'multiple' && table.checkboxSelection && !props.tree" |
|
|
|
:style="props.tree ? '' : 'padding: 0; width: 50px'" |
|
|
|
auto-width |
|
|
|
> |
|
|
|
<q-checkbox v-model="scope.selected" flat :dense="denseHeader || attrs.dense ? true : false" |
|
|
|
<q-checkbox v-model="scope.selected" flat :dense="denseHeaderComputed" |
|
|
|
/></q-th> |
|
|
|
<q-th v-else-if="props.checkboxSelection && !props.tree"></q-th> |
|
|
|
<q-th v-for="col in scope.cols" :key="col.name" :props="scope" :style="col.style" :class="col.classes"> |
|
|
|
{{ col.label }} |
|
|
|
</q-th> |
|
|
|
<q-th v-else-if="table.checkboxSelection && !props.tree"></q-th> |
|
|
|
<template v-for="col in scope.cols" :key="col.name"> |
|
|
|
<q-th |
|
|
|
:props="scope" |
|
|
|
:style="col.style + (col.name === '_sortNo_' ? 'padding: 0; width: 50px;' : '')" |
|
|
|
:class="col.classes" |
|
|
|
style="font-weight: bold" |
|
|
|
> |
|
|
|
{{ col.label }} |
|
|
|
</q-th> |
|
|
|
</template> |
|
|
|
</q-tr> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #body="scope"> |
|
|
|
<template v-if="tree"> |
|
|
|
<TreeGridRow |
|
|
|
:columns-map="tableColumnsMap" |
|
|
|
:row="scope.row" |
|
|
|
:cols="scope.cols" |
|
|
|
:grid-props="props" |
|
|
|
:row-key="rowKey_" |
|
|
|
:selection="selectionComputed" |
|
|
|
></TreeGridRow> |
|
|
|
<TreeGridRow :columns-map="tableColumnsMap" :row="scope.row" :cols="scope.cols" :grid-props="props" :row-key="rowKey_"></TreeGridRow> |
|
|
|
</template> |
|
|
|
<q-tr v-else :props="scope" @click="rowClick($event, scope.row, scope.rowIndex)" @dblclick="rowDbClick($el, scope.row, scope.rowIndex)"> |
|
|
|
<q-td v-if="props.checkboxSelection" class="text-center" style="padding: 0; width: 50px"> |
|
|
|
<q-checkbox v-model="scope.selected" flat :dense="denseBody || attrs.dense ? true : false" /> |
|
|
|
<q-td v-if="table.checkboxSelection" class="text-center" style="padding: 0; width: 50px"> |
|
|
|
<q-checkbox v-model="scope.selected" flat :dense="denseBodyComputed" /> |
|
|
|
</q-td> |
|
|
|
<template v-if="draggable"> |
|
|
|
<q-td |
|
|
@ -128,7 +133,12 @@ |
|
|
|
</q-td> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<q-td v-for="col in scope.cols" :key="col.name" :props="scope" :title="col.classes?.indexOf('truncate') > -1 ? col.value : ''"> |
|
|
|
<q-td |
|
|
|
v-for="col in scope.cols" |
|
|
|
:key="col.name" |
|
|
|
:props="scope" |
|
|
|
:title="col.classes?.indexOf('truncate') > -1 && col.value && typeof col.value !== 'object' ? col.value : ''" |
|
|
|
> |
|
|
|
<template v-if="col.name === '_sortNo_'"> |
|
|
|
{{ scope.rowIndex + 1 }} |
|
|
|
</template> |
|
|
@ -143,41 +153,43 @@ |
|
|
|
</q-tr> |
|
|
|
</template> |
|
|
|
<template #loading> |
|
|
|
<q-inner-loading :showing="table.loading" style="z-index: 999"> |
|
|
|
<q-inner-loading :showing="state.loading" style="z-index: 999"> |
|
|
|
<q-spinner-gears size="50px" color="primary" /> |
|
|
|
</q-inner-loading> |
|
|
|
</template> |
|
|
|
<template #pagination="scope"> |
|
|
|
<template v-if="pageable && !tree"> |
|
|
|
<template v-if="table.refHeightWidth.middleWidth > 600"> |
|
|
|
<template v-if="state.refHeightWidth.middleWidth > 600"> |
|
|
|
<q-pagination |
|
|
|
v-model="table.pagination.page" |
|
|
|
:boundary-links="table.pagination.config.boundaryLinks" |
|
|
|
:boundary-numbers="table.pagination.config.boundaryNumbers" |
|
|
|
:direction-links="table.pagination.config.directionLinks" |
|
|
|
:ellipses="table.pagination.config.ellipses" |
|
|
|
:max-pages="table.pagination.config.maxPages" |
|
|
|
v-model="state.pagination.page" |
|
|
|
:boundary-links="state.pagination.config.boundaryLinks" |
|
|
|
:boundary-numbers="state.pagination.config.boundaryNumbers" |
|
|
|
:direction-links="state.pagination.config.directionLinks" |
|
|
|
:ellipses="state.pagination.config.ellipses" |
|
|
|
:max-pages="state.pagination.config.maxPages" |
|
|
|
:min="1" |
|
|
|
:max="scope.pagesNumber" |
|
|
|
:size="denseBottomComputed ? '10px' : ''" |
|
|
|
@update:model-value="pageChange" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<q-pagination |
|
|
|
v-model="table.pagination.page" |
|
|
|
:boundary-links="table.pagination.config.boundaryLinks" |
|
|
|
:boundary-numbers="table.pagination.config.boundaryNumbers" |
|
|
|
:direction-links="table.pagination.config.directionLinks" |
|
|
|
:ellipses="table.pagination.config.ellipses" |
|
|
|
v-model="state.pagination.page" |
|
|
|
:boundary-links="state.pagination.config.boundaryLinks" |
|
|
|
:boundary-numbers="state.pagination.config.boundaryNumbers" |
|
|
|
:direction-links="state.pagination.config.directionLinks" |
|
|
|
:ellipses="state.pagination.config.ellipses" |
|
|
|
:max-pages="3" |
|
|
|
:min="1" |
|
|
|
:max="scope.pagesNumber" |
|
|
|
:size="denseBottomComputed ? '10px' : ''" |
|
|
|
@update:model-value="pageChange" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
<span>共 {{ table.pagination.rowsNumber }} 条记录</span> |
|
|
|
<span>共 {{ state.pagination.rowsNumber }} 条记录</span> |
|
|
|
</template> |
|
|
|
<template v-else> 当前未启用分页,共 {{ table.pagination.rowsNumber }} 条记录 </template> |
|
|
|
<template v-else> 共 {{ state.pagination.rowsNumber }} 条记录 </template> |
|
|
|
</template> |
|
|
|
<template v-if="!attrs.hideBottom" #no-data="{ message }"> |
|
|
|
<div class="full-width row flex-center text-dark q-gutter-sm" :style="`height:` + noDataBottomHeightComputed"> |
|
|
@ -206,7 +218,7 @@ import { useQuasar, getCssVar, exportFile } from 'quasar'; |
|
|
|
import { IconEnum } from '@/platform/enums'; |
|
|
|
import { extractTableColumnsProps, arrayToMap, OperatorTypeEnum, isEmpty, PageStatusEnum } from '@/platform/components/utils'; |
|
|
|
import TreeGridRow from './TreeGridRow.vue'; |
|
|
|
import { mergeProps } from 'vue'; |
|
|
|
import GridConfig from './GridConfig.vue'; |
|
|
|
|
|
|
|
const attrs = useAttrs(); |
|
|
|
const gc = Environment.getConfigure(); |
|
|
@ -221,16 +233,19 @@ const props = defineProps({ |
|
|
|
autoFetchData: { type: Boolean, default: true }, // 自动加载数据 |
|
|
|
draggable: { type: Boolean, default: false }, // 开启行拖拽 |
|
|
|
pageable: { type: Boolean, default: true }, // 是否需要分页,当启用树形表格模式时该属性失效,树形表格不支持分页。 |
|
|
|
fullScreenButton: { type: Boolean, default: true }, // 是否显示全屏按钮 |
|
|
|
configButton: { type: Boolean, default: true }, // 是否显示表格配置按钮 |
|
|
|
dataUrl: { type: String, default: '' }, // 表格数据操作请求的URL前缀 |
|
|
|
fetchDataUrl: { type: String, default: '' }, // 获取数据URL |
|
|
|
addDataUrl: { type: String, default: '' }, // 新增数据url |
|
|
|
editDataUrl: { type: String, default: '' }, // 修改数据url |
|
|
|
removeDataUrl: { type: String, default: '' }, // 删除数据url |
|
|
|
denseHeader: { type: Boolean, default: false }, // 表格列标题紧凑模式 |
|
|
|
denseBody: { type: Boolean, default: false }, // 表格行紧凑模式 |
|
|
|
dense: { type: Boolean, default: undefined }, // 表格整体紧凑模式 |
|
|
|
denseHeader: { type: Boolean, default: undefined }, // 表格列标题紧凑模式 |
|
|
|
denseBody: { type: Boolean, default: undefined }, // 表格数据行紧凑模式 |
|
|
|
denseBottom: { type: Boolean, default: undefined }, // 表格底部分页栏紧凑模式 |
|
|
|
denseToolbar: { type: Boolean, default: undefined }, // 表格toolbar按钮栏紧凑模式 |
|
|
|
sortNo: { type: Boolean, default: false }, // 是否显示排序号 |
|
|
|
leftColumnStickyNumber: { type: Number, default: 0 }, // 从左侧开始冻结列数,复选框与排序列不计算在内,目前支持1-10列。,暂时不提供了以后放到列属性中,参考el |
|
|
|
stickyNum: { type: Number, default: 0 }, // 从左侧开始冻结列数,复选框与排序列不计算在内,目前支持1-10列。,暂时不提供了以后放到列属性中,参考el |
|
|
|
checkboxSelection: { type: Boolean, default: true }, // checkbox选择模式,默认启用 |
|
|
|
tree: { type: Boolean, default: false }, // 树形表格模式,按照层级关系构建数据并以树形展现 |
|
|
|
treeIcon: { type: Function, default: undefined }, // 树形表格模式,图标函数,带有一个参数,行数据 |
|
|
@ -540,7 +555,7 @@ const buttonObj = { |
|
|
|
.then((resp) => { |
|
|
|
table.selected = []; |
|
|
|
NotifyManager.info('操作成功'); |
|
|
|
onRequest({ pagination: table.pagination }); |
|
|
|
onRequest({ pagination: state.pagination }); |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
console.info('error====', error); |
|
|
@ -642,13 +657,85 @@ const table = reactive({ |
|
|
|
selected: <any>[], |
|
|
|
ticked: <any>[], |
|
|
|
spaceHeight: 4, |
|
|
|
headerCellHeight: props.denseHeader || attrs.dense ? 24 : 48, |
|
|
|
bodyCellHeight: attrs.dense ? 24 : 48, |
|
|
|
gridConfig: false, |
|
|
|
stickyNum: props.stickyNum, |
|
|
|
columns: extractTableColumns, |
|
|
|
checkboxSelection: props.checkboxSelection, |
|
|
|
sortNo: props.sortNo, |
|
|
|
dense: props.dense !== undefined ? props.dense : false, |
|
|
|
denseToolbar: props.denseToolbar !== undefined ? props.denseToolbar : false, |
|
|
|
denseHeader: props.denseHeader !== undefined ? props.denseHeader : false, |
|
|
|
denseBody: props.denseBody !== undefined ? props.denseBody : false, |
|
|
|
denseBottom: props.denseBottom !== undefined ? props.denseBottom : false, |
|
|
|
queryFormFields: [], |
|
|
|
moreQueryStatus: false, // 当前更多查询状态是否激活 |
|
|
|
rows: <any>[], |
|
|
|
inFullscreen: false, // 表格当前是否为全屏模式 |
|
|
|
}); |
|
|
|
provide('table', table); |
|
|
|
|
|
|
|
const denseToolbarComputed = computed(() => { |
|
|
|
if (table.denseToolbar) { |
|
|
|
return true; |
|
|
|
} else if (table.dense !== false) { |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
const denseHeaderComputed = computed(() => { |
|
|
|
if (table.denseHeader) { |
|
|
|
return true; |
|
|
|
} else if (table.dense !== false) { |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
const denseBodyComputed = computed(() => { |
|
|
|
if (table.denseBody) { |
|
|
|
return true; |
|
|
|
} else if (table.dense !== false) { |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
const denseBottomComputed = computed(() => { |
|
|
|
if (table.denseBottom) { |
|
|
|
return true; |
|
|
|
} else if (table.dense !== false) { |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
const visibleColumnsComputed = computed(() => { |
|
|
|
const visibleColumns: string[] = []; |
|
|
|
table.columns.forEach((item) => { |
|
|
|
if (!item.hidden && (!props.tree || (props.tree && item.name !== '_sortNo_'))) { |
|
|
|
visibleColumns.push(item.name); |
|
|
|
} |
|
|
|
}); |
|
|
|
return visibleColumns; |
|
|
|
}); |
|
|
|
|
|
|
|
const state = reactive({ |
|
|
|
noDataLabel: '没有可用数据', |
|
|
|
loading: false, |
|
|
|
loadingLabel: '数据加载中', |
|
|
|
queryFormFields: [], |
|
|
|
moreQueryStatus: false, |
|
|
|
bodyCellHeight: denseBodyComputed.value ? 24 : 48, |
|
|
|
// 表格响应式高宽 |
|
|
|
refHeightWidth: { |
|
|
|
yLocation: 0, // 表格当前所在Y轴位置 |
|
|
|
topHeight: 0, // 表格当前top区域高度(表格列头上方区域) |
|
|
|
bottomHeight: 0, // 表格当前bottom区域高度(无可用数据、分页那块区域) |
|
|
|
middleWidth: 0, // 表格当前middle区域宽度(表格列头及数据行区域) |
|
|
|
middleScrollWidth: 0, // 表格出现滚动条时的宽度,若无滚动条则与 middleWidth 一致 |
|
|
|
middleHeight: 0, // 表格当前middle区域高度(表格列头及数据行区域) |
|
|
|
columnHeadHeight: 0, // 表格当前列头高度 |
|
|
|
tableTitleWidth: 0, // 当前表格title宽度 |
|
|
|
}, |
|
|
|
pagination: { |
|
|
|
config: { |
|
|
|
boundaryLinks: true, // 显示边界按钮链接 |
|
|
@ -665,21 +752,7 @@ const table = reactive({ |
|
|
|
rowsNumber: 10, |
|
|
|
rowsPerPageOptions: [5, 10, 20, 50, 100], |
|
|
|
}, |
|
|
|
rows: <any>[], |
|
|
|
// 表格响应式高宽 |
|
|
|
refHeightWidth: { |
|
|
|
yLocation: 0, // 表格当前所在Y轴位置 |
|
|
|
topHeight: 0, // 表格当前top区域高度(表格列头上方区域) |
|
|
|
bottomHeight: 0, // 表格当前bottom区域高度(无可用数据、分页那块区域) |
|
|
|
middleWidth: 0, // 表格当前middle区域宽度(表格列头及数据行区域) |
|
|
|
middleScrollWidth: 0, // 表格出现滚动条时的宽度,若无滚动条则与 middleWidth 一致 |
|
|
|
middleHeight: 0, // 表格当前middle区域高度(表格列头及数据行区域) |
|
|
|
columnHeadHeight: 0, // 表格当前列头高度 |
|
|
|
tableTitleWidth: 0, // 当前表格title宽度 |
|
|
|
}, |
|
|
|
inFullscreen: false, // 表格当前是否为全屏模式 |
|
|
|
}); |
|
|
|
provide('table', table); |
|
|
|
|
|
|
|
const dialog = reactive({ |
|
|
|
dialogTitle: '新增', |
|
|
@ -865,9 +938,9 @@ const tableHeightComputed = computed(() => { |
|
|
|
const otherHeight = table.spaceHeight || 4; |
|
|
|
const resultHeight = |
|
|
|
screenHeight - |
|
|
|
table.refHeightWidth.yLocation - |
|
|
|
(table.refHeightWidth.topHeight || 0) - |
|
|
|
(table.refHeightWidth.bottomHeight || 0) - |
|
|
|
state.refHeightWidth.yLocation - |
|
|
|
(state.refHeightWidth.topHeight || 0) - |
|
|
|
(state.refHeightWidth.bottomHeight || 0) - |
|
|
|
footerHeight - |
|
|
|
mainPaddingBottom - |
|
|
|
mainContainerPaddingBottom - |
|
|
@ -878,7 +951,7 @@ const tableHeightComputed = computed(() => { |
|
|
|
}; |
|
|
|
} else { |
|
|
|
return { |
|
|
|
height: table.refHeightWidth.middleHeight + 'px', |
|
|
|
height: state.refHeightWidth.middleHeight + 'px', |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
@ -896,9 +969,9 @@ const noDataBottomHeightComputed = computed(() => { |
|
|
|
const mainContainerPaddingBottom = gc.theme.main.containerPaddingBottom || 0; |
|
|
|
const resultHeight = |
|
|
|
screenHeight - |
|
|
|
table.refHeightWidth.yLocation - |
|
|
|
table.refHeightWidth.topHeight - |
|
|
|
table.refHeightWidth.middleHeight - |
|
|
|
state.refHeightWidth.yLocation - |
|
|
|
state.refHeightWidth.topHeight - |
|
|
|
state.refHeightWidth.middleHeight - |
|
|
|
mainPaddingBottom - |
|
|
|
mainContainerPaddingBottom - |
|
|
|
footerHeight - |
|
|
@ -915,9 +988,9 @@ let tableY = 0; |
|
|
|
const tableFullscreenFun = (value) => { |
|
|
|
table.inFullscreen = !table.inFullscreen; |
|
|
|
if (value) { |
|
|
|
tableY = table.refHeightWidth.yLocation; |
|
|
|
tableY = state.refHeightWidth.yLocation; |
|
|
|
} else { |
|
|
|
table.refHeightWidth.yLocation = tableY; |
|
|
|
state.refHeightWidth.yLocation = tableY; |
|
|
|
tableY = 0; |
|
|
|
} |
|
|
|
}; |
|
|
@ -943,22 +1016,22 @@ const rowDbClick = (evt, row, index) => { |
|
|
|
const onResize = () => { |
|
|
|
handlerQueryFormShowField(); |
|
|
|
if (tableRef.value) { |
|
|
|
table.refHeightWidth.yLocation = tableRef.value.$el.getBoundingClientRect().y; |
|
|
|
table.refHeightWidth.topHeight = tableRef.value.$el.getElementsByClassName('q-table__top')[0]?.clientHeight; |
|
|
|
table.refHeightWidth.middleWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientWidth; |
|
|
|
table.refHeightWidth.middleScrollWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
|
table.refHeightWidth.columnHeadHeight = tableRef.value.$el.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
|
state.refHeightWidth.yLocation = tableRef.value.$el.getBoundingClientRect().y; |
|
|
|
state.refHeightWidth.topHeight = tableRef.value.$el.getElementsByClassName('q-table__top')[0]?.clientHeight; |
|
|
|
state.refHeightWidth.middleWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientWidth; |
|
|
|
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) { |
|
|
|
table.refHeightWidth.middleHeight = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
|
state.refHeightWidth.middleHeight = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
|
} else { |
|
|
|
let scrollHeight = 0; |
|
|
|
if (table.refHeightWidth.middleScrollWidth - table.refHeightWidth.middleWidth > 0) { |
|
|
|
if (state.refHeightWidth.middleScrollWidth - state.refHeightWidth.middleWidth > 0) { |
|
|
|
scrollHeight = 15; |
|
|
|
} |
|
|
|
table.refHeightWidth.middleHeight = table.refHeightWidth.columnHeadHeight + scrollHeight; |
|
|
|
state.refHeightWidth.middleHeight = state.refHeightWidth.columnHeadHeight + scrollHeight; |
|
|
|
} |
|
|
|
table.refHeightWidth.tableTitleWidth = tableRef.value.$el.getElementsByClassName('_table-title')[0]?.clientWidth; |
|
|
|
state.refHeightWidth.tableTitleWidth = tableRef.value.$el.getElementsByClassName('_table-title')[0]?.clientWidth; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@ -1007,7 +1080,7 @@ const buildQueryEntity = (reqParams) => { |
|
|
|
}; |
|
|
|
|
|
|
|
const pageChange = (value) => { |
|
|
|
table.pagination.page = value; |
|
|
|
state.pagination.page = value; |
|
|
|
onRequest(table); |
|
|
|
}; |
|
|
|
const requestHandler = async (ops) => { |
|
|
@ -1034,34 +1107,34 @@ const requestHandler = async (ops) => { |
|
|
|
}); |
|
|
|
const resp = await axios.get(url.fetchDataUrl || url.dataUrl, { params: urlSearchParams }).catch((error) => { |
|
|
|
console.info('error-------------', error); |
|
|
|
table.loading = false; |
|
|
|
state.loading = false; |
|
|
|
}); |
|
|
|
return resp; |
|
|
|
}; |
|
|
|
const onRequest = async (ops: any) => { |
|
|
|
table.loading = true; |
|
|
|
state.loading = true; |
|
|
|
const resp: any = await requestHandler(ops); |
|
|
|
table.loading = false; |
|
|
|
state.loading = false; |
|
|
|
if (resp && resp.data && !props.tree) { |
|
|
|
const responseData = resp.data; |
|
|
|
if (Array.isArray(responseData)) { |
|
|
|
table.rows = responseData; |
|
|
|
table.pagination.rowsNumber = responseData.length; |
|
|
|
state.pagination.rowsNumber = responseData.length; |
|
|
|
} else if (typeof responseData === 'object' && responseData.content) { |
|
|
|
if (props.pageable) { |
|
|
|
table.pagination.page = table.pagination.reqPageStart === 0 ? responseData.number + 1 : responseData.number; |
|
|
|
table.pagination.rowsPerPage = responseData.size || table.pagination.rowsPerPage; |
|
|
|
state.pagination.page = state.pagination.reqPageStart === 0 ? responseData.number + 1 : responseData.number; |
|
|
|
state.pagination.rowsPerPage = responseData.size || state.pagination.rowsPerPage; |
|
|
|
} |
|
|
|
table.pagination.rowsNumber = responseData.totalElements; |
|
|
|
table.pagination.sortBy = ops.pagination.sortBy; |
|
|
|
table.pagination.descending = ops.pagination.descending; |
|
|
|
state.pagination.rowsNumber = responseData.totalElements; |
|
|
|
state.pagination.sortBy = ops.pagination.sortBy; |
|
|
|
state.pagination.descending = ops.pagination.descending; |
|
|
|
table.rows = responseData.content; |
|
|
|
} |
|
|
|
} else if (resp && resp.data && props.tree) { |
|
|
|
const responseData = resp.data; |
|
|
|
if (Array.isArray(responseData)) { |
|
|
|
table.pagination.rowsNumber = responseData.length; |
|
|
|
table.pagination.rowsPerPage = 0; |
|
|
|
state.pagination.rowsNumber = responseData.length; |
|
|
|
state.pagination.rowsPerPage = 0; |
|
|
|
if (props.treeRelationship === 'parent') { |
|
|
|
const treeRows = TreeBuilder.build(responseData, props.foreignKey, props.primaryKey); |
|
|
|
table.rows = treeRows; |
|
|
@ -1069,8 +1142,8 @@ const onRequest = async (ops: any) => { |
|
|
|
table.rows = responseData; |
|
|
|
} |
|
|
|
} else if (typeof responseData === 'object' && responseData.content) { |
|
|
|
table.pagination.rowsNumber = responseData.content.length; |
|
|
|
table.pagination.rowsPerPage = 0; |
|
|
|
state.pagination.rowsNumber = responseData.content.length; |
|
|
|
state.pagination.rowsPerPage = 0; |
|
|
|
if (props.treeRelationship === 'parent') { |
|
|
|
const treeRows = TreeBuilder.build(responseData.content, props.foreignKey, props.primaryKey); |
|
|
|
table.rows = treeRows; |
|
|
@ -1131,7 +1204,7 @@ const save = async () => { |
|
|
|
emit('addEditDataSubmitAfter', resp.data); |
|
|
|
NotifyManager.info('操作成功'); |
|
|
|
dialogRef.value.hide(); |
|
|
|
onRequest({ pagination: table.pagination }); |
|
|
|
onRequest({ pagination: state.pagination }); |
|
|
|
table.selected = []; |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
@ -1292,35 +1365,35 @@ watchEffect(() => { |
|
|
|
const refresh = () => { |
|
|
|
nextTick(() => { |
|
|
|
onRequest({ |
|
|
|
pagination: table.pagination, |
|
|
|
pagination: state.pagination, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
const stickyHeaderColumn = () => { |
|
|
|
const stickyHeaderColumn = (time = 500) => { |
|
|
|
setTimeout(() => { |
|
|
|
// 延迟处理锁定列及表格宽高的获取 |
|
|
|
if (tableRef.value) { |
|
|
|
table.refHeightWidth.yLocation = tableRef.value.$el.getBoundingClientRect()?.y; |
|
|
|
table.refHeightWidth.topHeight = tableRef.value.$el.getElementsByClassName('q-table__top')[0]?.clientHeight; |
|
|
|
table.refHeightWidth.bottomHeight = tableRef.value.$el.getElementsByClassName('q-table__bottom')[0]?.clientHeight; |
|
|
|
table.refHeightWidth.middleWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientWidth; |
|
|
|
table.refHeightWidth.middleScrollWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
|
table.refHeightWidth.columnHeadHeight = tableRef.value.$el.getElementsByTagName('thead')[0]?.clientHeight; |
|
|
|
table.refHeightWidth.tableTitleWidth = tableRef.value.$el.getElementsByClassName('_table-title')[0]?.clientWidth; |
|
|
|
state.refHeightWidth.yLocation = tableRef.value.$el.getBoundingClientRect()?.y; |
|
|
|
state.refHeightWidth.topHeight = tableRef.value.$el.getElementsByClassName('q-table__top')[0]?.clientHeight; |
|
|
|
state.refHeightWidth.bottomHeight = tableRef.value.$el.getElementsByClassName('q-table__bottom')[0]?.clientHeight; |
|
|
|
state.refHeightWidth.middleWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientWidth; |
|
|
|
state.refHeightWidth.middleScrollWidth = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.scrollWidth; |
|
|
|
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) { |
|
|
|
table.refHeightWidth.middleHeight = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
|
state.refHeightWidth.middleHeight = tableRef.value.$el.getElementsByClassName('q-table__middle')[0]?.clientHeight; |
|
|
|
} else { |
|
|
|
let scrollHeight = 0; |
|
|
|
if (table.refHeightWidth.middleScrollWidth - table.refHeightWidth.middleWidth > 0) { |
|
|
|
if (state.refHeightWidth.middleScrollWidth - state.refHeightWidth.middleWidth > 0) { |
|
|
|
scrollHeight = 15; |
|
|
|
} |
|
|
|
table.refHeightWidth.middleHeight = table.refHeightWidth.columnHeadHeight + scrollHeight; |
|
|
|
state.refHeightWidth.middleHeight = state.refHeightWidth.columnHeadHeight + scrollHeight; |
|
|
|
} |
|
|
|
|
|
|
|
const tableDom = tableRef.value.$el.getElementsByTagName('table')[0]; |
|
|
|
if (props.leftColumnStickyNumber > 0) { |
|
|
|
if (table.stickyNum > 0) { |
|
|
|
if (columnTitleState.columnTitleRowNum > 1) { |
|
|
|
const theadDom = tableDom.getElementsByTagName('thead')[0]; |
|
|
|
const theadTrDom = theadDom.getElementsByTagName('tr'); |
|
|
@ -1385,20 +1458,41 @@ const stickyHeaderColumn = () => { |
|
|
|
tableDom.style.setProperty('--row9Height', row9Height + 'px'); |
|
|
|
} |
|
|
|
} |
|
|
|
}, 500); |
|
|
|
}, time); |
|
|
|
|
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--tableHeadBgColor', tableHeadBgColor); |
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--stickyBgColor', stickyBgColor); |
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--tableBorderColor', tableBorderColor); |
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--tableColumnTitleHeight', table.headerCellHeight + 'px'); |
|
|
|
// if (props.denseHeader || attrs.dense) { |
|
|
|
|
|
|
|
// } |
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--tableColumnTitleHeight', (denseHeaderComputed.value ? 24 : 48) + 'px'); |
|
|
|
let headerPadding = '8px'; |
|
|
|
if (denseHeaderComputed.value) { |
|
|
|
headerPadding = '4px'; |
|
|
|
} |
|
|
|
tableRef.value.$el.getElementsByTagName('table')[0].style.setProperty('--tableHeaderPadding', headerPadding); |
|
|
|
let bodyPadding = '8px'; |
|
|
|
if (denseBodyComputed.value) { |
|
|
|
bodyPadding = '4px'; |
|
|
|
} |
|
|
|
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) { |
|
|
|
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 { |
|
|
|
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'); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
const excludeColumnNum = computed(() => { |
|
|
|
let num = 1; |
|
|
|
if (props.sortNo) { |
|
|
|
let num = 0; |
|
|
|
if (props.tree) { |
|
|
|
return num; |
|
|
|
} |
|
|
|
if (table.sortNo) { |
|
|
|
num += 1; |
|
|
|
} |
|
|
|
if (table.checkboxSelection) { |
|
|
|
num += 1; |
|
|
|
} |
|
|
|
return num; |
|
|
@ -1436,7 +1530,7 @@ const handlerStickyChildrenColumn = (item, columns) => { |
|
|
|
}; |
|
|
|
const getStickyColumn = () => { |
|
|
|
const columns = props.columns.filter((item, index) => { |
|
|
|
return index < props.leftColumnStickyNumber; |
|
|
|
return index < table.stickyNum; |
|
|
|
}); |
|
|
|
const arr = []; |
|
|
|
columns.forEach((item) => { |
|
|
@ -1444,10 +1538,9 @@ const getStickyColumn = () => { |
|
|
|
}); |
|
|
|
return arr; |
|
|
|
}; |
|
|
|
const stickyColumnArr = getStickyColumn(); |
|
|
|
|
|
|
|
const moreColumnTitleTableSelectionStyle = computed(() => { |
|
|
|
if (props.leftColumnStickyNumber > 0) { |
|
|
|
if (table.stickyNum > 0) { |
|
|
|
if (props.tree) { |
|
|
|
return 'z-index: 3;position: sticky;left: 0px;'; |
|
|
|
} else { |
|
|
@ -1457,14 +1550,17 @@ const moreColumnTitleTableSelectionStyle = computed(() => { |
|
|
|
return ''; |
|
|
|
}); |
|
|
|
const moreColumnTitleTableSortNoStyle = computed(() => { |
|
|
|
if (props.sortNo && props.leftColumnStickyNumber > 0) { |
|
|
|
return 'z-index: 3;position: sticky;left: var(--columnWidth-1-1);'; |
|
|
|
if (table.checkboxSelection && table.sortNo && table.stickyNum > 0) { |
|
|
|
return 'z-index: 3;position: sticky;left: var(--columnWidth-1-1);width: 50px;'; |
|
|
|
} else if (table.sortNo && table.stickyNum > 0) { |
|
|
|
return 'z-index: 3;position: sticky;left: 0px;width: 50px;'; |
|
|
|
} |
|
|
|
return ''; |
|
|
|
}); |
|
|
|
|
|
|
|
const thStickyLastNameComputed = computed(() => { |
|
|
|
let result = <any>[]; |
|
|
|
const stickyColumnArr = getStickyColumn(); |
|
|
|
const lastColumn = getMoreRowColumnTitleIndex(stickyColumnArr[stickyColumnArr.length - 1].name); |
|
|
|
if (lastColumn.trIndex === 1) { |
|
|
|
// 多表头锁定列的结尾列如果行下标为1直接取最后一列 |
|
|
@ -1494,8 +1590,9 @@ const thStyleHandler = (c: any, scope: any) => { |
|
|
|
} |
|
|
|
style = c.style; |
|
|
|
} |
|
|
|
const stickyColumnArr = getStickyColumn(); |
|
|
|
if ( |
|
|
|
props.leftColumnStickyNumber > 0 && |
|
|
|
table.stickyNum > 0 && |
|
|
|
stickyColumnArr.findIndex((item: any) => { |
|
|
|
return item.name === c.name; |
|
|
|
}) > -1 |
|
|
@ -1604,11 +1701,11 @@ const thStyleHandler = (c: any, scope: any) => { |
|
|
|
|
|
|
|
const tableClassComputed = computed(() => { |
|
|
|
const classArr = <string[]>['sticky-header-column-table']; |
|
|
|
if (props.leftColumnStickyNumber && props.leftColumnStickyNumber > 0) { |
|
|
|
if (table.stickyNum && table.stickyNum > 0) { |
|
|
|
if (columnTitleState.columnTitleRowNum > 1) { |
|
|
|
// 存在多行列头 |
|
|
|
const stickyColumn = props.columns.filter((item, index) => { |
|
|
|
return index < props.leftColumnStickyNumber; |
|
|
|
return index < table.stickyNum; |
|
|
|
}); |
|
|
|
let tdNum = excludeColumnNum.value; |
|
|
|
stickyColumn.forEach((item: any, index: number) => { |
|
|
@ -1621,6 +1718,7 @@ const tableClassComputed = computed(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
console.info('excludeColumnNum======', excludeColumnNum.value); |
|
|
|
// 不存在多行列头 |
|
|
|
if (excludeColumnNum.value === 2) { |
|
|
|
classArr.push('sticky-header-column-table-tr-1' + '-' + 1); |
|
|
@ -1631,7 +1729,7 @@ const tableClassComputed = computed(() => { |
|
|
|
classArr.push('sticky-header-column-table-tr-1' + '-' + 1); |
|
|
|
classArr.push('sticky-header-column-table-td-' + 1); |
|
|
|
} |
|
|
|
for (let i = 1; i <= props.leftColumnStickyNumber; i++) { |
|
|
|
for (let i = 1; i <= table.stickyNum; i++) { |
|
|
|
classArr.push('sticky-header-column-table-tr-1' + '-' + (i + excludeColumnNum.value)); |
|
|
|
classArr.push('sticky-header-column-table-td-' + (i + excludeColumnNum.value)); |
|
|
|
} |
|
|
@ -1699,10 +1797,10 @@ const onDragLeave = (e) => { |
|
|
|
}; |
|
|
|
// 拖拽过程触发 |
|
|
|
const onDragOver = (e, scope) => { |
|
|
|
if (e.offsetY >= table.bodyCellHeight / 2 && dragRowIndex !== scope.rowIndex && e.target.parentNode.parentNode.children.length === scope.rowIndex + 1) { |
|
|
|
if (e.offsetY >= state.bodyCellHeight / 2 && dragRowIndex !== scope.rowIndex && e.target.parentNode.parentNode.children.length === scope.rowIndex + 1) { |
|
|
|
removeDragTopStyle(e); |
|
|
|
addDragBottomStyle(e); |
|
|
|
} else if (e.offsetY < table.bodyCellHeight / 2 && dragRowIndex !== scope.rowIndex && e.target.parentNode.parentNode.children.length === scope.rowIndex + 1) { |
|
|
|
} else if (e.offsetY < state.bodyCellHeight / 2 && dragRowIndex !== scope.rowIndex && e.target.parentNode.parentNode.children.length === scope.rowIndex + 1) { |
|
|
|
removeDragBottomStyle(e); |
|
|
|
addDragTopStyle(e); |
|
|
|
} |
|
|
@ -1715,7 +1813,7 @@ const onDrop = (e, scope) => { |
|
|
|
return; |
|
|
|
} |
|
|
|
const dragRow = table.rows[dragRowIndex]; |
|
|
|
if (e.offsetY < table.bodyCellHeight / 2 && dragRowIndex !== scope.rowIndex && e.target.parentNode.parentNode.children.length === scope.rowIndex + 1) { |
|
|
|
if (e.offsetY < state.bodyCellHeight / 2 && dragRowIndex !== scope.rowIndex && e.target.parentNode.parentNode.children.length === scope.rowIndex + 1) { |
|
|
|
table.rows.splice(dragRowIndex, 1); |
|
|
|
table.rows.splice(scope.rowIndex - 1, 0, dragRow); |
|
|
|
} else { |
|
|
@ -1757,7 +1855,7 @@ onMounted(() => { |
|
|
|
handlerQueryFormShowField(); |
|
|
|
if (props.autoFetchData) { |
|
|
|
onRequest({ |
|
|
|
pagination: table.pagination, |
|
|
|
pagination: state.pagination, |
|
|
|
}); |
|
|
|
} else { |
|
|
|
stickyHeaderColumn(); |
|
|
@ -1839,40 +1937,108 @@ defineExpose({ |
|
|
|
setAddDataUrl, |
|
|
|
setEditDataUrl, |
|
|
|
setRemoveDataUrl, |
|
|
|
stickyHeaderColumn, |
|
|
|
}); |
|
|
|
|
|
|
|
const instance = getCurrentInstance(); |
|
|
|
VueTools.expose2Instance(instance); |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="css"> |
|
|
|
:deep(.q-table__top) { |
|
|
|
<style lang="css"> |
|
|
|
/* :deep(.q-table__top) { |
|
|
|
padding: 8px 8px; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-table th:first-child) { |
|
|
|
:deep(.q-table tr:first-child th:first-child) { |
|
|
|
border-left: 1px solid var(--tableBorderColor); |
|
|
|
} |
|
|
|
:deep(.q-table tr td:first-child) { |
|
|
|
border-left: 1px solid var(--tableBorderColor); |
|
|
|
} |
|
|
|
:deep(.q-table th) { |
|
|
|
padding: 7px 8px; |
|
|
|
background-color: inherit; |
|
|
|
:deep(.q-table__middle .q-table th) { |
|
|
|
padding: var(--tableHeaderPadding) 8px; |
|
|
|
border-left-width: 0px; |
|
|
|
border-right-width: 1px; |
|
|
|
border-top-width: 0px; |
|
|
|
border-bottom-width: 1px; |
|
|
|
} |
|
|
|
:deep(.q-table__middle .q-table td) { |
|
|
|
height: var(--tableBodyHeight); |
|
|
|
padding: var(--tableBodyPadding) 8px; |
|
|
|
border-left-width: 0px; |
|
|
|
border-right-width: 1px; |
|
|
|
border-top-width: 0px; |
|
|
|
border-bottom-width: 1px; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-table__bottom) { |
|
|
|
min-height: var(--tableBottomHeight); |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-table__control .q-field__control) { |
|
|
|
min-height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-field__control q-field__append) { |
|
|
|
height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-field__control-container .q-field__native) { |
|
|
|
min-height: var(--tableBottomButtonHeight); |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.q-field__control .q-field__marginal) { |
|
|
|
height: var(--tableBottomButtonHeight); |
|
|
|
} */ |
|
|
|
|
|
|
|
.q-table__top { |
|
|
|
padding: 8px 8px; |
|
|
|
} |
|
|
|
|
|
|
|
.q-table tr:first-child th:first-child { |
|
|
|
border-left: 1px solid var(--tableBorderColor); |
|
|
|
} |
|
|
|
.q-table tr td:first-child { |
|
|
|
border-left: 1px solid var(--tableBorderColor); |
|
|
|
} |
|
|
|
.q-table__middle .q-table th { |
|
|
|
padding: var(--tableHeaderPadding) 8px; |
|
|
|
border-left-width: 0px; |
|
|
|
border-right-width: 1px; |
|
|
|
border-top-width: 0px; |
|
|
|
border-bottom-width: 1px; |
|
|
|
} |
|
|
|
:deep(.q-table td) { |
|
|
|
padding: 7px 8px; |
|
|
|
background-color: inherit; |
|
|
|
.q-table__middle .q-table td { |
|
|
|
height: var(--tableBodyHeight); |
|
|
|
padding: var(--tableBodyPadding) 8px; |
|
|
|
border-left-width: 0px; |
|
|
|
border-right-width: 1px; |
|
|
|
border-top-width: 0px; |
|
|
|
border-bottom-width: 1px; |
|
|
|
} |
|
|
|
|
|
|
|
.q-table__bottom { |
|
|
|
min-height: var(--tableBottomHeight); |
|
|
|
} |
|
|
|
|
|
|
|
.q-table__control .q-field__control { |
|
|
|
min-height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
|
|
|
|
.q-field__control q-field__append { |
|
|
|
height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
|
|
|
|
.q-field__control-container .q-field__native { |
|
|
|
min-height: var(--tableBottomButtonHeight); |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.q-field__control .q-field__marginal { |
|
|
|
height: var(--tableBottomButtonHeight); |
|
|
|
} |
|
|
|
|
|
|
|
.sticky-header-column-table thead tr { |
|
|
|
height: var(--tableColumnTitleHeight); |
|
|
|
} |
|
|
|