feat: use common-ui ContentWrap
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
<!--
|
||||
参考自 https://github.com/yudaocode/yudao-ui-admin-vue3/blob/master/src/components/ContentWrap/src/ContentWrap.vue
|
||||
保证和 yudao-ui-admin-vue3 功能的一致性
|
||||
-->
|
||||
<script lang="ts" setup>
|
||||
import type { CSSProperties } from 'vue';
|
||||
|
||||
import { ShieldQuestion } from '@vben/icons';
|
||||
|
||||
import { ElCard, ElTooltip } from 'element-plus';
|
||||
|
||||
defineOptions({ name: 'ContentWrap' });
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
bodyStyle?: CSSProperties;
|
||||
message?: string;
|
||||
title?: string;
|
||||
}>(),
|
||||
{
|
||||
bodyStyle: () => ({ padding: '10px' }),
|
||||
title: '',
|
||||
message: '',
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElCard :body-style="bodyStyle" :header="title" class="mb-4">
|
||||
<template v-if="title" #header>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<span class="text-4 font-[700]">{{ title }}</span>
|
||||
<ElTooltip placement="right">
|
||||
<template #content>
|
||||
<div class="max-w-[200px]">{{ message }}</div>
|
||||
</template>
|
||||
<ShieldQuestion :size="14" class="ml-5px" />
|
||||
</ElTooltip>
|
||||
<div class="pl-20px flex flex-grow">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<slot name="extra"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #default>
|
||||
<slot></slot>
|
||||
</template>
|
||||
</ElCard>
|
||||
</template>
|
||||
@@ -1 +0,0 @@
|
||||
export { default as ContentWrap } from './content-wrap.vue';
|
||||
@@ -3,7 +3,7 @@ import type { Demo01ContactApi } from '#/api/infra/demo/demo01';
|
||||
|
||||
import { h, onMounted, reactive, ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { ContentWrap, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import { Download, Plus, Trash2 } from '@vben/icons';
|
||||
@@ -35,7 +35,6 @@ import {
|
||||
exportDemo01Contact,
|
||||
getDemo01ContactPage,
|
||||
} from '#/api/infra/demo/demo01';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Demo02CategoryApi } from '#/api/infra/demo/demo02';
|
||||
|
||||
import { h, onMounted, reactive, ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { ContentWrap, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { Download, Plus } from '@vben/icons';
|
||||
import { useTableToolbar, VbenVxeTableToolbar } from '@vben/plugins/vxe-table';
|
||||
import {
|
||||
@@ -29,7 +29,6 @@ import {
|
||||
exportDemo02Category,
|
||||
getDemo02CategoryList,
|
||||
} from '#/api/infra/demo/demo02';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import Demo02CategoryForm from './modules/form.vue';
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Demo03StudentApi } from '#/api/infra/demo/demo03/erp';
|
||||
|
||||
import { h, onMounted, reactive, ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { ContentWrap, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import { Download, Plus, Trash2 } from '@vben/icons';
|
||||
@@ -37,7 +37,6 @@ import {
|
||||
exportDemo03Student,
|
||||
getDemo03StudentPage,
|
||||
} from '#/api/infra/demo/demo03/erp';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Demo03StudentApi } from '#/api/infra/demo/demo03/erp';
|
||||
|
||||
import { h, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { ContentWrap, useVbenModal } from '@vben/common-ui';
|
||||
import { Plus, Trash2 } from '@vben/icons';
|
||||
import { useTableToolbar, VbenVxeTableToolbar } from '@vben/plugins/vxe-table';
|
||||
import { cloneDeep, formatDateTime, isEmpty } from '@vben/utils';
|
||||
@@ -25,7 +25,6 @@ import {
|
||||
deleteDemo03CourseList,
|
||||
getDemo03CoursePage,
|
||||
} from '#/api/infra/demo/demo03/erp';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import Demo03CourseForm from './demo03-course-form.vue';
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Demo03StudentApi } from '#/api/infra/demo/demo03/erp';
|
||||
|
||||
import { h, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { ContentWrap, useVbenModal } from '@vben/common-ui';
|
||||
import { Plus, Trash2 } from '@vben/icons';
|
||||
import { useTableToolbar, VbenVxeTableToolbar } from '@vben/plugins/vxe-table';
|
||||
import { cloneDeep, formatDateTime, isEmpty } from '@vben/utils';
|
||||
@@ -25,7 +25,6 @@ import {
|
||||
deleteDemo03GradeList,
|
||||
getDemo03GradePage,
|
||||
} from '#/api/infra/demo/demo03/erp';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import Demo03GradeForm from './demo03-grade-form.vue';
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
||||
|
||||
import { h, onMounted, reactive, ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { ContentWrap, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import { Download, Plus, Trash2 } from '@vben/icons';
|
||||
@@ -37,7 +37,6 @@ import {
|
||||
exportDemo03Student,
|
||||
getDemo03StudentPage,
|
||||
} from '#/api/infra/demo/demo03/inner';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
||||
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
import { formatDateTime } from '@vben/utils';
|
||||
|
||||
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||
import { getDemo03CourseListByStudentId } from '#/api/infra/demo/demo03/inner';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
|
||||
const props = defineProps<{
|
||||
studentId?: number; // 学生编号(主表的关联字段)
|
||||
|
||||
@@ -3,11 +3,11 @@ import type { Demo03StudentApi } from '#/api/infra/demo/demo03/inner';
|
||||
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
import { formatDateTime } from '@vben/utils';
|
||||
|
||||
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||
import { getDemo03GradeByStudentId } from '#/api/infra/demo/demo03/inner';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
|
||||
const props = defineProps<{
|
||||
studentId?: number; // 学生编号(主表的关联字段)
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Demo03StudentApi } from '#/api/infra/demo/demo03/normal';
|
||||
|
||||
import { h, onMounted, reactive, ref } from 'vue';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { ContentWrap, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import { Download, Plus, Trash2 } from '@vben/icons';
|
||||
@@ -35,7 +35,6 @@ import {
|
||||
exportDemo03Student,
|
||||
getDemo03StudentPage,
|
||||
} from '#/api/infra/demo/demo03/normal';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
|
||||
import { onMounted, ref } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
import { handleTree } from '@vben/utils';
|
||||
|
||||
import {
|
||||
@@ -24,7 +25,6 @@ import {
|
||||
|
||||
import * as ProductCategoryApi from '#/api/mall/product/category';
|
||||
import * as ProductSpuApi from '#/api/mall/product/spu';
|
||||
|
||||
/**
|
||||
* 商品表格选择对话框
|
||||
* 1. 单选模式:
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { MallCombinationActivityApi } from '#/api/mall/promotion/combinatio
|
||||
|
||||
import { onMounted, ref } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import {
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { MallCouponTemplateApi } from '#/api/mall/promotion/coupon/couponTe
|
||||
|
||||
import { reactive, ref } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
import { CouponTemplateTakeTypeEnum, DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { MallPointActivityApi } from '#/api/mall/promotion/point';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import { dateFormatter, fenToYuanFormat } from '@vben/utils';
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { MallSeckillActivityApi } from '#/api/mall/promotion/seckill/seckil
|
||||
|
||||
import { onMounted, ref } from 'vue';
|
||||
|
||||
import { ContentWrap } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import {
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { MallOrderApi } from '#/api/mall/trade/order';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { confirm, Page } from '@vben/common-ui';
|
||||
import { confirm, ContentWrap, Page } from '@vben/common-ui';
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
import { getDictLabel, getDictObj } from '@vben/hooks';
|
||||
import { $t } from '@vben/locales';
|
||||
@@ -21,7 +21,6 @@ import {
|
||||
} from 'element-plus';
|
||||
|
||||
import * as AfterSaleApi from '#/api/mall/trade/afterSale/index';
|
||||
import ContentWrap from '#/components/content-wrap/content-wrap.vue';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
|
||||
import UpdateAuditReasonForm from './disagree-form.vue';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { MallOrderApi } from '#/api/mall/trade/order';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { confirm, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { confirm, ContentWrap, Page, useVbenModal } from '@vben/common-ui';
|
||||
import {
|
||||
DeliveryTypeEnum,
|
||||
DICT_TYPE,
|
||||
@@ -26,7 +26,6 @@ import {
|
||||
import * as DeliveryExpressApi from '#/api/mall/trade/delivery/express';
|
||||
import * as DeliveryPickUpStoreApi from '#/api/mall/trade/delivery/pickUpStore';
|
||||
import * as TradeOrderApi from '#/api/mall/trade/order';
|
||||
import ContentWrap from '#/components/content-wrap/content-wrap.vue';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
|
||||
import OrderDeliveryForm from './delevery-form.vue';
|
||||
|
||||
Reference in New Issue
Block a user