|
@ -2,21 +2,21 @@ |
|
|
<div> |
|
|
<div> |
|
|
<q-table |
|
|
<q-table |
|
|
ref="tableRef" |
|
|
ref="tableRef" |
|
|
|
|
|
v-bind="attrs" |
|
|
v-model:pagination="table.pagination" |
|
|
v-model:pagination="table.pagination" |
|
|
v-model:selected="table.selected" |
|
|
v-model:selected="table.selected" |
|
|
:flat="true" |
|
|
flat |
|
|
binary-state-sort |
|
|
binary-state-sort |
|
|
:selection="'single'" |
|
|
selection="single" |
|
|
:separator="'cell'" |
|
|
separator="cell" |
|
|
|
|
|
:no-data-label="table.noDataLabel" |
|
|
|
|
|
:loading-label="table.loadingLabel" |
|
|
:rows="table.rows" |
|
|
:rows="table.rows" |
|
|
:columns="extractTableColumns" |
|
|
:columns="extractTableColumns" |
|
|
:rows-per-page-options="pagination.rowsPerPage && table.refHeightWidth.middleWidth > 600 ? table.pagination.rowsPerPageOptions : []" |
|
|
:rows-per-page-options="pagination.rowsPerPage && table.refHeightWidth.middleWidth > 600 ? table.pagination.rowsPerPageOptions : []" |
|
|
:loading="table.loading" |
|
|
:loading="table.loading" |
|
|
:no-data-label="table.noDataLabel" |
|
|
|
|
|
:loading-label="table.loadingLabel" |
|
|
|
|
|
:class="tableClassComputed" |
|
|
:class="tableClassComputed" |
|
|
:table-style="tableHeightComputed" |
|
|
:table-style="tableHeightComputed" |
|
|
v-bind="attrs" |
|
|
|
|
|
@request="onRequest" |
|
|
@request="onRequest" |
|
|
@fullscreen="tableFullscreenFun" |
|
|
@fullscreen="tableFullscreenFun" |
|
|
> |
|
|
> |
|
@ -88,7 +88,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<template #body="scope"> |
|
|
<template #body="scope"> |
|
|
<template v-if="tree"> |
|
|
<template v-if="tree"> |
|
|
<TreeGridRow :cols="scope.cols" :data="scope.row"></TreeGridRow> |
|
|
<TreeGridRow :props="scope" :columns-map="tableColumnsMap"></TreeGridRow> |
|
|
</template> |
|
|
</template> |
|
|
<q-tr v-else :props="scope" @click="rowClick($el, scope.row, scope.rowIndex)" @dblclick="rowDbClick($el, scope.row, scope.rowIndex)"> |
|
|
<q-tr v-else :props="scope" @click="rowClick($el, scope.row, scope.rowIndex)" @dblclick="rowDbClick($el, scope.row, scope.rowIndex)"> |
|
|
<q-td v-if="!attrs.selection || attrs.selection !== 'none'" class="text-center" style="padding: 0; width: 50px"> |
|
|
<q-td v-if="!attrs.selection || attrs.selection !== 'none'" class="text-center" style="padding: 0; width: 50px"> |
|
@ -110,8 +110,8 @@ |
|
|
<template v-if="col.name === '_sortNo_'"> |
|
|
<template v-if="col.name === '_sortNo_'"> |
|
|
{{ scope.rowIndex + 1 }} |
|
|
{{ scope.rowIndex + 1 }} |
|
|
</template> |
|
|
</template> |
|
|
<template v-else-if="col.value && typeof col.value === 'object' && col.value.componentsType"> |
|
|
<template v-else-if="col.value && typeof col.value === 'object' && col.value.componentType"> |
|
|
<component :is="col.value.componentsType" v-bind="col.value.attrs"></component> |
|
|
<component :is="col.value.componentType" v-bind="col.value.attrs"></component> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else> |
|
|
<template v-else> |
|
|
{{ col.value }} |
|
|
{{ col.value }} |
|
@ -123,8 +123,8 @@ |
|
|
<template v-if="col.name === '_sortNo_'"> |
|
|
<template v-if="col.name === '_sortNo_'"> |
|
|
{{ scope.rowIndex + 1 }} |
|
|
{{ scope.rowIndex + 1 }} |
|
|
</template> |
|
|
</template> |
|
|
<template v-else-if="col.value && typeof col.value === 'object' && col.value.componentsType"> |
|
|
<template v-else-if="col.value && typeof col.value === 'object' && col.value.componentType"> |
|
|
<component :is="col.value.componentsType" v-bind="col.value.attrs"></component> |
|
|
<component :is="col.value.componentType" v-bind="col.value.attrs"></component> |
|
|
</template> |
|
|
</template> |
|
|
<template v-else> |
|
|
<template v-else> |
|
|
{{ col.value }} |
|
|
{{ col.value }} |
|
@ -205,6 +205,10 @@ const tableHeadBgColor = gc.theme.dark ? darkBgColor : gc.theme?.grid?.headBgCol |
|
|
const tableBorderColor = gc.theme?.grid?.borderColor || 'rgba(0, 0, 0, 0.12)'; |
|
|
const tableBorderColor = gc.theme?.grid?.borderColor || 'rgba(0, 0, 0, 0.12)'; |
|
|
const stickyBgColor = gc.theme.dark ? darkBgColor : gc.theme?.grid?.stickyBgColor || '#ffffff'; |
|
|
const stickyBgColor = gc.theme.dark ? darkBgColor : gc.theme?.grid?.stickyBgColor || '#ffffff'; |
|
|
|
|
|
|
|
|
|
|
|
const aaa = (a) => { |
|
|
|
|
|
console.info('a============', a); |
|
|
|
|
|
return '111'; |
|
|
|
|
|
}; |
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
height: { type: Number, default: 0 }, // 表格高度 |
|
|
height: { type: Number, default: 0 }, // 表格高度 |
|
|
title: { type: String, default: '' }, // 表格标题 |
|
|
title: { type: String, default: '' }, // 表格标题 |
|
|