fix(workspace): 收敛 MP、ERP 和 demo 类型兼容问题
parent
e1731f5394
commit
1e4436561c
|
|
@ -3,6 +3,19 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace MpFreePublishApi {
|
export namespace MpFreePublishApi {
|
||||||
|
/** 图文文章内容 */
|
||||||
|
export interface FreePublishArticle {
|
||||||
|
title?: string;
|
||||||
|
thumbUrl?: string;
|
||||||
|
picUrl?: string;
|
||||||
|
url?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 图文内容 */
|
||||||
|
export interface FreePublishContent {
|
||||||
|
newsItem?: FreePublishArticle[];
|
||||||
|
}
|
||||||
|
|
||||||
/** 自由发布文章信息 */
|
/** 自由发布文章信息 */
|
||||||
export interface FreePublish {
|
export interface FreePublish {
|
||||||
id?: number;
|
id?: number;
|
||||||
|
|
@ -12,7 +25,7 @@ export namespace MpFreePublishApi {
|
||||||
title: string;
|
title: string;
|
||||||
author: string;
|
author: string;
|
||||||
digest: string;
|
digest: string;
|
||||||
content: string;
|
content?: FreePublishContent;
|
||||||
thumbUrl: string;
|
thumbUrl: string;
|
||||||
status: number;
|
status: number;
|
||||||
publishTime?: Date;
|
publishTime?: Date;
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,6 @@ import TimeSummaryChart from './modules/time-summary-chart.vue';
|
||||||
defineOptions({ name: 'ErpHome' });
|
defineOptions({ name: 'ErpHome' });
|
||||||
|
|
||||||
const loading = ref(false); // 加载中
|
const loading = ref(false); // 加载中
|
||||||
|
|
||||||
/** 图表组件引用 */
|
|
||||||
const saleChartRef = ref();
|
|
||||||
const purchaseChartRef = ref();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -36,15 +32,11 @@ const purchaseChartRef = ref();
|
||||||
<Row :gutter="16">
|
<Row :gutter="16">
|
||||||
<!-- 销售统计 -->
|
<!-- 销售统计 -->
|
||||||
<Col :md="12" :sm="12" :xs="24">
|
<Col :md="12" :sm="12" :xs="24">
|
||||||
<TimeSummaryChart ref="saleChartRef" title="销售统计" type="sale" />
|
<TimeSummaryChart title="销售统计" type="sale" />
|
||||||
</Col>
|
</Col>
|
||||||
<!-- 采购统计 -->
|
<!-- 采购统计 -->
|
||||||
<Col :md="12" :sm="12" :xs="24">
|
<Col :md="12" :sm="12" :xs="24">
|
||||||
<TimeSummaryChart
|
<TimeSummaryChart title="采购统计" type="purchase" />
|
||||||
ref="purchaseChartRef"
|
|
||||||
title="采购统计"
|
|
||||||
type="purchase"
|
|
||||||
/>
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { EchartsUIType } from '@vben/plugins/echarts';
|
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
|
||||||
|
|
||||||
import type { ErpPurchaseStatisticsApi } from '#/api/erp/statistics/purchase';
|
import type { ErpPurchaseStatisticsApi } from '#/api/erp/statistics/purchase';
|
||||||
import type { ErpSaleStatisticsApi } from '#/api/erp/statistics/sale';
|
import type { ErpSaleStatisticsApi } from '#/api/erp/statistics/sale';
|
||||||
|
|
@ -49,7 +49,7 @@ const chartRef = ref<EchartsUIType>();
|
||||||
const { renderEcharts } = useEcharts(chartRef);
|
const { renderEcharts } = useEcharts(chartRef);
|
||||||
|
|
||||||
/** 折线图配置 */
|
/** 折线图配置 */
|
||||||
const lineChartOptions: echarts.EChartsOption = {
|
const lineChartOptions: EChartsOption = {
|
||||||
grid: {
|
grid: {
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ watch(
|
||||||
|
|
||||||
/** 提供获取表格数据的方法供父组件调用 */
|
/** 提供获取表格数据的方法供父组件调用 */
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getData: (): InfraCodegenApi.CodegenColumn[] => gridApi.grid.getData(),
|
getData: (): InfraCodegenApi.CodegenColumn[] =>
|
||||||
|
gridApi.grid.getData() as InfraCodegenApi.CodegenColumn[],
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
||||||
|
|
||||||
import { nextTick, watch } from 'vue';
|
import { nextTick, watch } from 'vue';
|
||||||
|
|
@ -34,7 +35,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<Demo03StudentApi.Demo03Course>,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 添加学生课程 */
|
/** 添加学生课程 */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/normal';
|
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/normal';
|
||||||
|
|
||||||
import { nextTick, watch } from 'vue';
|
import { nextTick, watch } from 'vue';
|
||||||
|
|
@ -33,7 +34,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<Demo03StudentApi.Demo03Course>,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 添加学生课程 */
|
/** 添加学生课程 */
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -213,7 +219,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="示例联系人">
|
<ContentWrap title="示例联系人">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -249,7 +255,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,12 @@ function toggleExpand() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -169,7 +175,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="示例分类">
|
<ContentWrap title="示例分类">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button @click="toggleExpand" class="mr-2">
|
<Button @click="toggleExpand" class="mr-2">
|
||||||
|
|
@ -197,7 +203,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
:tree-config="{
|
:tree-config="{
|
||||||
parentField: 'parentId',
|
parentField: 'parentId',
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -224,7 +230,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -260,7 +266,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
@cell-click="onCellClick"
|
@cell-click="onCellClick"
|
||||||
:row-config="{
|
:row-config="{
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,12 @@ watch(
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -213,7 +219,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -239,7 +245,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,12 @@ watch(
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -213,7 +219,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -239,7 +245,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -217,7 +223,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -253,7 +259,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -214,7 +220,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -250,7 +256,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
search: true,
|
search: true,
|
||||||
},
|
},
|
||||||
} as VxeTableGridOptions<FreePublish.FreePublish>,
|
} as VxeTableGridOptions<MpFreePublishApi.FreePublish>,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,19 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace MpFreePublishApi {
|
export namespace MpFreePublishApi {
|
||||||
|
/** 图文文章内容 */
|
||||||
|
export interface FreePublishArticle {
|
||||||
|
title?: string;
|
||||||
|
thumbUrl?: string;
|
||||||
|
picUrl?: string;
|
||||||
|
url?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 图文内容 */
|
||||||
|
export interface FreePublishContent {
|
||||||
|
newsItem?: FreePublishArticle[];
|
||||||
|
}
|
||||||
|
|
||||||
/** 自由发布文章信息 */
|
/** 自由发布文章信息 */
|
||||||
export interface FreePublish {
|
export interface FreePublish {
|
||||||
id?: number;
|
id?: number;
|
||||||
|
|
@ -12,7 +25,7 @@ export namespace MpFreePublishApi {
|
||||||
title: string;
|
title: string;
|
||||||
author: string;
|
author: string;
|
||||||
digest: string;
|
digest: string;
|
||||||
content: string;
|
content?: FreePublishContent;
|
||||||
thumbUrl: string;
|
thumbUrl: string;
|
||||||
status: number;
|
status: number;
|
||||||
publishTime?: Date;
|
publishTime?: Date;
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,6 @@ import TimeSummaryChart from './modules/time-summary-chart.vue';
|
||||||
defineOptions({ name: 'ErpHome' });
|
defineOptions({ name: 'ErpHome' });
|
||||||
|
|
||||||
const loading = ref(false); // 加载中
|
const loading = ref(false); // 加载中
|
||||||
|
|
||||||
/** 图表组件引用 */
|
|
||||||
const saleChartRef = ref();
|
|
||||||
const purchaseChartRef = ref();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -36,15 +32,11 @@ const purchaseChartRef = ref();
|
||||||
<Row :gutter="16">
|
<Row :gutter="16">
|
||||||
<!-- 销售统计 -->
|
<!-- 销售统计 -->
|
||||||
<Col :md="12" :sm="12" :xs="24">
|
<Col :md="12" :sm="12" :xs="24">
|
||||||
<TimeSummaryChart ref="saleChartRef" title="销售统计" type="sale" />
|
<TimeSummaryChart title="销售统计" type="sale" />
|
||||||
</Col>
|
</Col>
|
||||||
<!-- 采购统计 -->
|
<!-- 采购统计 -->
|
||||||
<Col :md="12" :sm="12" :xs="24">
|
<Col :md="12" :sm="12" :xs="24">
|
||||||
<TimeSummaryChart
|
<TimeSummaryChart title="采购统计" type="purchase" />
|
||||||
ref="purchaseChartRef"
|
|
||||||
title="采购统计"
|
|
||||||
type="purchase"
|
|
||||||
/>
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { EchartsUIType } from '@vben/plugins/echarts';
|
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
|
||||||
|
|
||||||
import type { ErpPurchaseStatisticsApi } from '#/api/erp/statistics/purchase';
|
import type { ErpPurchaseStatisticsApi } from '#/api/erp/statistics/purchase';
|
||||||
import type { ErpSaleStatisticsApi } from '#/api/erp/statistics/sale';
|
import type { ErpSaleStatisticsApi } from '#/api/erp/statistics/sale';
|
||||||
|
|
@ -49,7 +49,7 @@ const chartRef = ref<EchartsUIType>();
|
||||||
const { renderEcharts } = useEcharts(chartRef);
|
const { renderEcharts } = useEcharts(chartRef);
|
||||||
|
|
||||||
/** 折线图配置 */
|
/** 折线图配置 */
|
||||||
const lineChartOptions: echarts.EChartsOption = {
|
const lineChartOptions: EChartsOption = {
|
||||||
grid: {
|
grid: {
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ watch(
|
||||||
|
|
||||||
/** 提供获取表格数据的方法供父组件调用 */
|
/** 提供获取表格数据的方法供父组件调用 */
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getData: (): InfraCodegenApi.CodegenColumn[] => gridApi.grid.getData(),
|
getData: (): InfraCodegenApi.CodegenColumn[] =>
|
||||||
|
gridApi.grid.getData() as InfraCodegenApi.CodegenColumn[],
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
||||||
|
|
||||||
import { nextTick, watch } from 'vue';
|
import { nextTick, watch } from 'vue';
|
||||||
|
|
@ -34,7 +35,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<Demo03StudentApi.Demo03Course>,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 添加学生课程 */
|
/** 添加学生课程 */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/normal';
|
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/normal';
|
||||||
|
|
||||||
import { nextTick, watch } from 'vue';
|
import { nextTick, watch } from 'vue';
|
||||||
|
|
@ -33,7 +34,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<Demo03StudentApi.Demo03Course>,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 添加学生课程 */
|
/** 添加学生课程 */
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -208,7 +214,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="示例联系人">
|
<ContentWrap title="示例联系人">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -244,7 +250,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,12 @@ function toggleExpand() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -176,7 +182,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="示例分类">
|
<ContentWrap title="示例分类">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button @click="toggleExpand" class="mr-2">
|
<Button @click="toggleExpand" class="mr-2">
|
||||||
|
|
@ -204,7 +210,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
:tree-config="{
|
:tree-config="{
|
||||||
parentField: 'parentId',
|
parentField: 'parentId',
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -219,7 +225,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -255,7 +261,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
@cell-click="onCellClick"
|
@cell-click="onCellClick"
|
||||||
:row-config="{
|
:row-config="{
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,12 @@ watch(
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -214,7 +220,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -240,7 +246,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,12 @@ watch(
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -214,7 +220,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -240,7 +246,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -212,7 +218,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -248,7 +254,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -209,7 +215,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -245,7 +251,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
search: true,
|
search: true,
|
||||||
},
|
},
|
||||||
} as VxeTableGridOptions<FreePublish.FreePublish>,
|
} as VxeTableGridOptions<MpFreePublishApi.FreePublish>,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,19 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||||
import { requestClient } from '#/api/request';
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace MpFreePublishApi {
|
export namespace MpFreePublishApi {
|
||||||
|
/** 图文文章内容 */
|
||||||
|
export interface FreePublishArticle {
|
||||||
|
title?: string;
|
||||||
|
thumbUrl?: string;
|
||||||
|
picUrl?: string;
|
||||||
|
url?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 图文内容 */
|
||||||
|
export interface FreePublishContent {
|
||||||
|
newsItem?: FreePublishArticle[];
|
||||||
|
}
|
||||||
|
|
||||||
/** 自由发布文章信息 */
|
/** 自由发布文章信息 */
|
||||||
export interface FreePublish {
|
export interface FreePublish {
|
||||||
id?: number;
|
id?: number;
|
||||||
|
|
@ -12,7 +25,7 @@ export namespace MpFreePublishApi {
|
||||||
title: string;
|
title: string;
|
||||||
author: string;
|
author: string;
|
||||||
digest: string;
|
digest: string;
|
||||||
content: string;
|
content?: FreePublishContent;
|
||||||
thumbUrl: string;
|
thumbUrl: string;
|
||||||
status: number;
|
status: number;
|
||||||
publishTime?: Date;
|
publishTime?: Date;
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,6 @@ import TimeSummaryChart from './modules/time-summary-chart.vue';
|
||||||
defineOptions({ name: 'ErpHome' });
|
defineOptions({ name: 'ErpHome' });
|
||||||
|
|
||||||
const loading = ref(false); // 加载中
|
const loading = ref(false); // 加载中
|
||||||
|
|
||||||
/** 图表组件引用 */
|
|
||||||
// @ts-expect-error unused
|
|
||||||
const saleChartRef = ref();
|
|
||||||
// @ts-expect-error unused
|
|
||||||
const purchaseChartRef = ref();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -37,15 +31,11 @@ const purchaseChartRef = ref();
|
||||||
<ElRow :gutter="16">
|
<ElRow :gutter="16">
|
||||||
<!-- 销售统计 -->
|
<!-- 销售统计 -->
|
||||||
<ElCol :md="12" :sm="12" :xs="24">
|
<ElCol :md="12" :sm="12" :xs="24">
|
||||||
<TimeSummaryChart ref="saleChartRef" title="销售统计" type="sale" />
|
<TimeSummaryChart title="销售统计" type="sale" />
|
||||||
</ElCol>
|
</ElCol>
|
||||||
<!-- 采购统计 -->
|
<!-- 采购统计 -->
|
||||||
<ElCol :md="12" :sm="12" :xs="24">
|
<ElCol :md="12" :sm="12" :xs="24">
|
||||||
<TimeSummaryChart
|
<TimeSummaryChart title="采购统计" type="purchase" />
|
||||||
ref="purchaseChartRef"
|
|
||||||
title="采购统计"
|
|
||||||
type="purchase"
|
|
||||||
/>
|
|
||||||
</ElCol>
|
</ElCol>
|
||||||
</ElRow>
|
</ElRow>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { EchartsUIType } from '@vben/plugins/echarts';
|
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
|
||||||
|
|
||||||
import type { ErpPurchaseStatisticsApi } from '#/api/erp/statistics/purchase';
|
import type { ErpPurchaseStatisticsApi } from '#/api/erp/statistics/purchase';
|
||||||
import type { ErpSaleStatisticsApi } from '#/api/erp/statistics/sale';
|
import type { ErpSaleStatisticsApi } from '#/api/erp/statistics/sale';
|
||||||
|
|
@ -49,7 +49,7 @@ const chartRef = ref<EchartsUIType>();
|
||||||
const { renderEcharts } = useEcharts(chartRef);
|
const { renderEcharts } = useEcharts(chartRef);
|
||||||
|
|
||||||
/** 折线图配置 */
|
/** 折线图配置 */
|
||||||
const lineChartOptions: echarts.EChartsOption = {
|
const lineChartOptions: EChartsOption = {
|
||||||
grid: {
|
grid: {
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ watch(
|
||||||
|
|
||||||
/** 提供获取表格数据的方法供父组件调用 */
|
/** 提供获取表格数据的方法供父组件调用 */
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getData: (): InfraCodegenApi.CodegenColumn[] => gridApi.grid.getData(),
|
getData: (): InfraCodegenApi.CodegenColumn[] =>
|
||||||
|
gridApi.grid.getData() as InfraCodegenApi.CodegenColumn[],
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
||||||
|
|
||||||
import { nextTick, watch } from 'vue';
|
import { nextTick, watch } from 'vue';
|
||||||
|
|
@ -34,7 +35,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<Demo03StudentApi.Demo03Course>,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 添加学生课程 */
|
/** 添加学生课程 */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/normal';
|
import type { Demo03StudentApi } from '#/api/infra/demo/demo03/normal';
|
||||||
|
|
||||||
import { nextTick, watch } from 'vue';
|
import { nextTick, watch } from 'vue';
|
||||||
|
|
@ -33,7 +34,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<Demo03StudentApi.Demo03Course>,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 添加学生课程 */
|
/** 添加学生课程 */
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -211,7 +217,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="示例联系人">
|
<ContentWrap title="示例联系人">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<ElButton
|
<ElButton
|
||||||
|
|
@ -246,7 +252,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
@ -279,7 +285,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleEdit(row as any)"
|
@click="handleEdit(row)"
|
||||||
v-access:code="['infra:demo01-contact:update']"
|
v-access:code="['infra:demo01-contact:update']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
{{ $t('ui.actionTitle.edit') }}
|
||||||
|
|
@ -289,7 +295,7 @@ onMounted(() => {
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo01-contact:delete']"
|
v-access:code="['infra:demo01-contact:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,12 @@ function toggleExpand() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -177,7 +183,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="示例分类">
|
<ContentWrap title="示例分类">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<ElButton @click="toggleExpand" class="mr-2">
|
<ElButton @click="toggleExpand" class="mr-2">
|
||||||
|
|
@ -205,7 +211,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
:tree-config="{
|
:tree-config="{
|
||||||
parentField: 'parentId',
|
parentField: 'parentId',
|
||||||
|
|
@ -231,7 +237,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleAppend(row as any)"
|
@click="handleAppend(row)"
|
||||||
v-access:code="['infra:demo02-category:create']"
|
v-access:code="['infra:demo02-category:create']"
|
||||||
>
|
>
|
||||||
新增下级
|
新增下级
|
||||||
|
|
@ -240,7 +246,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleEdit(row as any)"
|
@click="handleEdit(row)"
|
||||||
v-access:code="['infra:demo02-category:update']"
|
v-access:code="['infra:demo02-category:update']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
{{ $t('ui.actionTitle.edit') }}
|
||||||
|
|
@ -251,7 +257,7 @@ onMounted(() => {
|
||||||
link
|
link
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
:disabled="!isEmpty(row?.children)"
|
:disabled="!isEmpty(row?.children)"
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo02-category:delete']"
|
v-access:code="['infra:demo02-category:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,10 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
:data="demo02CategoryTree"
|
:data="demo02CategoryTree"
|
||||||
:props="{
|
:props="{
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'id',
|
|
||||||
children: 'children',
|
children: 'children',
|
||||||
}"
|
}"
|
||||||
check-strictly
|
check-strictly
|
||||||
|
node-key="id"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
placeholder="请选择父级编号"
|
placeholder="请选择父级编号"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -223,7 +229,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<ElButton
|
<ElButton
|
||||||
|
|
@ -258,7 +264,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
@cell-click="onCellClick"
|
@cell-click="onCellClick"
|
||||||
:row-config="{
|
:row-config="{
|
||||||
|
|
@ -296,7 +302,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleEdit(row as any)"
|
@click="handleEdit(row)"
|
||||||
v-access:code="['infra:demo03-student:update']"
|
v-access:code="['infra:demo03-student:update']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
{{ $t('ui.actionTitle.edit') }}
|
||||||
|
|
@ -306,7 +312,7 @@ onMounted(() => {
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo03-student:delete']"
|
v-access:code="['infra:demo03-student:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,12 @@ watch(
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -211,7 +217,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<ElButton
|
<ElButton
|
||||||
|
|
@ -236,7 +242,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
@ -259,7 +265,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleEdit(row as any)"
|
@click="handleEdit(row)"
|
||||||
v-access:code="['infra:demo03-student:update']"
|
v-access:code="['infra:demo03-student:update']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
{{ $t('ui.actionTitle.edit') }}
|
||||||
|
|
@ -269,7 +275,7 @@ onMounted(() => {
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo03-student:delete']"
|
v-access:code="['infra:demo03-student:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,12 @@ watch(
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -211,7 +217,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<ElButton
|
<ElButton
|
||||||
|
|
@ -236,7 +242,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
@ -259,7 +265,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleEdit(row as any)"
|
@click="handleEdit(row)"
|
||||||
v-access:code="['infra:demo03-student:update']"
|
v-access:code="['infra:demo03-student:update']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
{{ $t('ui.actionTitle.edit') }}
|
||||||
|
|
@ -269,7 +275,7 @@ onMounted(() => {
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo03-student:delete']"
|
v-access:code="['infra:demo03-student:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
<ElRadioGroup v-model="formData.sex">
|
<ElRadioGroup v-model="formData.sex">
|
||||||
<ElRadio
|
<ElRadio
|
||||||
v-for="dict in getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number')"
|
v-for="dict in getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number')"
|
||||||
:key="dict.value"
|
:key="String(dict.value)"
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
>
|
>
|
||||||
{{ dict.label }}
|
{{ dict.label }}
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -219,7 +225,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<ElButton
|
<ElButton
|
||||||
|
|
@ -254,7 +260,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
@ -300,7 +306,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleEdit(row as any)"
|
@click="handleEdit(row)"
|
||||||
v-access:code="['infra:demo03-student:update']"
|
v-access:code="['infra:demo03-student:update']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
{{ $t('ui.actionTitle.edit') }}
|
||||||
|
|
@ -310,7 +316,7 @@ onMounted(() => {
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo03-student:delete']"
|
v-access:code="['infra:demo03-student:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ watch(
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
@click="onDelete(row as any)"
|
@click="onDelete(row)"
|
||||||
v-access:code="['infra:demo03-student:delete']"
|
v-access:code="['infra:demo03-student:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,12 @@ async function handleExport() {
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
||||||
|
function setTableToolbarRef(el: any) {
|
||||||
|
tableToolbarRef.value = el;
|
||||||
|
}
|
||||||
|
function setTableRef(el: any) {
|
||||||
|
tableRef.value = el;
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
@ -212,7 +218,7 @@ onMounted(() => {
|
||||||
<ContentWrap title="学生">
|
<ContentWrap title="学生">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<VbenVxeTableToolbar
|
<VbenVxeTableToolbar
|
||||||
ref="tableToolbarRef"
|
:ref="setTableToolbarRef"
|
||||||
v-model:hidden-search="hiddenSearchBar"
|
v-model:hidden-search="hiddenSearchBar"
|
||||||
>
|
>
|
||||||
<ElButton
|
<ElButton
|
||||||
|
|
@ -247,7 +253,7 @@ onMounted(() => {
|
||||||
</VbenVxeTableToolbar>
|
</VbenVxeTableToolbar>
|
||||||
</template>
|
</template>
|
||||||
<VxeTable
|
<VxeTable
|
||||||
ref="tableRef"
|
:ref="setTableRef"
|
||||||
:data="list"
|
:data="list"
|
||||||
show-overflow
|
show-overflow
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|
@ -279,7 +285,7 @@ onMounted(() => {
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleEdit(row as any)"
|
@click="handleEdit(row)"
|
||||||
v-access:code="['infra:demo03-student:update']"
|
v-access:code="['infra:demo03-student:update']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.edit') }}
|
{{ $t('ui.actionTitle.edit') }}
|
||||||
|
|
@ -289,7 +295,7 @@ onMounted(() => {
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo03-student:delete']"
|
v-access:code="['infra:demo03-student:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ watch(
|
||||||
size="small"
|
size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
link
|
link
|
||||||
@click="handleDelete(row as any)"
|
@click="handleDelete(row)"
|
||||||
v-access:code="['infra:demo03-student:delete']"
|
v-access:code="['infra:demo03-student:delete']"
|
||||||
>
|
>
|
||||||
{{ $t('ui.actionTitle.delete') }}
|
{{ $t('ui.actionTitle.delete') }}
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
v-for="(item, index) in row.content.newsItem"
|
v-for="(item, index) in row.content.newsItem"
|
||||||
:key="index"
|
:key="index"
|
||||||
:src="item.picUrl || item.thumbUrl"
|
:src="item.picUrl || item.thumbUrl"
|
||||||
:preview-src-list="[item.picUrl || item.thumbUrl]"
|
:preview-src-list="[item.picUrl || item.thumbUrl || '']"
|
||||||
class="h-36 !w-[300px] rounded object-cover"
|
class="h-36 !w-[300px] rounded object-cover"
|
||||||
:alt="`文章 ${index + 1} 封面图`"
|
:alt="`文章 ${index + 1} 封面图`"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,9 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
isHover: true,
|
isHover: true,
|
||||||
height: type.value === UploadType.Image ? 220 : 'auto',
|
},
|
||||||
|
cellConfig: {
|
||||||
|
height: type.value === UploadType.Image ? 220 : undefined,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
|
|
@ -106,7 +108,9 @@ async function onTabChange() {
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
isHover: true,
|
isHover: true,
|
||||||
height: type.value === UploadType.Image ? 220 : 'auto',
|
},
|
||||||
|
cellConfig: {
|
||||||
|
height: type.value === UploadType.Image ? 220 : undefined,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
await gridApi.reload();
|
await gridApi.reload();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue