u
This commit is contained in:
1 parent
aa813c9649
commit
62550b8182
45 files changed
+12535
-566
No files matched your search
@@ -1,7 +0,0 @@
|
||||
<script lang="js" setup></script>
|
||||
|
||||
<template>
|
||||
<div class=""></div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -1,17 +0,0 @@
|
||||
<script lang="js" setup>
|
||||
defineOptions({
|
||||
name: "G3RecursiveColumn",
|
||||
});
|
||||
|
||||
const isGroup = computed(() => {
|
||||
return Array.isArray(props.column.children) && props.column.children.length > 0;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<vxe-colgroup v-if="isGroup" :title="column.label" :field="column.field">
|
||||
|
||||
</vxe-colgroup>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,53 @@
|
||||
<script lang="js" setup>
|
||||
import { getAlignByFormat, formatValueByFormat } from "@/utils/columns";
|
||||
|
||||
defineOptions({
|
||||
name: "G3RecursiveColumn",
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
column: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const isGroup = computed(() => {
|
||||
return (
|
||||
Array.isArray(props.column.children) && props.column.children.length > 0
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<vxe-colgroup v-if="isGroup" :title="column.label" :field="column.field">
|
||||
<G3RecursiveColumn
|
||||
v-for="(child, index) in column.children"
|
||||
:key="index"
|
||||
:column="child"
|
||||
></G3RecursiveColumn>
|
||||
</vxe-colgroup>
|
||||
|
||||
<vxe-column
|
||||
v-else
|
||||
:field="column.col_FieldName"
|
||||
:title="column.col_Caption"
|
||||
:width="column.col_Width"
|
||||
:align="getAlignByFormat(column.col_DisplayFormat)"
|
||||
:params="column"
|
||||
:sortable="props.sortable"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
formatValueByFormat(row[column.col_FieldName], column.col_DisplayFormat)
|
||||
}}
|
||||
</template>
|
||||
<template v-if="column.showSummary === '1'" #footer="{ row }">
|
||||
{{
|
||||
formatValueByFormat(row[column.col_FieldName], column.col_DisplayFormat)
|
||||
}}
|
||||
</template>
|
||||
</vxe-column>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in new issue
Block a user