diff --git a/apps/web-antd/src/components/summary-card/index.ts b/apps/web-antd/src/components/summary-card/index.ts deleted file mode 100644 index 598d73d61..000000000 --- a/apps/web-antd/src/components/summary-card/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as SummaryCard } from './summary-card.vue'; -export type { SummaryCardProps } from './typing'; diff --git a/apps/web-antd/src/components/summary-card/summary-card.vue b/apps/web-antd/src/components/summary-card/summary-card.vue deleted file mode 100644 index c88d33199..000000000 --- a/apps/web-antd/src/components/summary-card/summary-card.vue +++ /dev/null @@ -1,60 +0,0 @@ - - diff --git a/apps/web-antd/src/components/summary-card/typing.ts b/apps/web-antd/src/components/summary-card/typing.ts deleted file mode 100644 index 0ef1fdc6f..000000000 --- a/apps/web-antd/src/components/summary-card/typing.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface SummaryCardProps { - title: string; - tooltip?: string; - icon?: string; - iconColor?: string; - iconBgColor?: string; - prefix?: string; - value?: number; - decimals?: number; - percent?: number | string; -} diff --git a/apps/web-antd/src/views/mall/statistics/member/index.vue b/apps/web-antd/src/views/mall/statistics/member/index.vue index 5d0aef9b2..da8c8b243 100644 --- a/apps/web-antd/src/views/mall/statistics/member/index.vue +++ b/apps/web-antd/src/views/mall/statistics/member/index.vue @@ -3,13 +3,12 @@ import type { MallMemberStatisticsApi } from '#/api/mall/statistics/member'; import { onMounted, ref } from 'vue'; -import { DocAlert, Page } from '@vben/common-ui'; +import { DocAlert, Page, SummaryCard } from '@vben/common-ui'; import { fenToYuan } from '@vben/utils'; import { Col, Row } from 'ant-design-vue'; import * as MemberStatisticsApi from '#/api/mall/statistics/member'; -import { SummaryCard } from '#/components/summary-card'; import MemberAreaCard from './modules/area-card.vue'; import MemberFunnelCard from './modules/funnel-card.vue'; diff --git a/packages/effects/common-ui/src/components/index.ts b/packages/effects/common-ui/src/components/index.ts index bd12f89f7..efba68250 100644 --- a/packages/effects/common-ui/src/components/index.ts +++ b/packages/effects/common-ui/src/components/index.ts @@ -4,6 +4,7 @@ export * from './col-page'; export * from './content-wrap'; export * from './count-to'; export * from './doc-alert'; +export * from './summary-card'; export * from './ellipsis-text'; export * from './icon-picker'; export * from './iframe'; diff --git a/packages/effects/common-ui/src/components/summary-card/index.ts b/packages/effects/common-ui/src/components/summary-card/index.ts new file mode 100644 index 000000000..fca98f38c --- /dev/null +++ b/packages/effects/common-ui/src/components/summary-card/index.ts @@ -0,0 +1,3 @@ +// add by 芋艿:总结卡片,目前 mall 模块在使用 +export { default as SummaryCard } from './summary-card.vue'; +export * from './types'; diff --git a/packages/effects/common-ui/src/components/summary-card/summary-card.vue b/packages/effects/common-ui/src/components/summary-card/summary-card.vue new file mode 100644 index 000000000..97cc64b0d --- /dev/null +++ b/packages/effects/common-ui/src/components/summary-card/summary-card.vue @@ -0,0 +1,79 @@ + + + diff --git a/packages/effects/common-ui/src/components/summary-card/types.ts b/packages/effects/common-ui/src/components/summary-card/types.ts new file mode 100644 index 000000000..b05b70889 --- /dev/null +++ b/packages/effects/common-ui/src/components/summary-card/types.ts @@ -0,0 +1,22 @@ +import type { Component } from 'vue'; + +export interface SummaryCardProps { + /** 标题 */ + title: string; + /** 提示信息 */ + tooltip?: string; + /** 图标 */ + icon?: Component | string; + /** 图标颜色 */ + iconColor?: string; + /** 图标背景色 */ + iconBgColor?: string; + /** 前缀 */ + prefix?: string; + /** 数值 */ + value?: number; + /** 小数位数 */ + decimals?: number; + /** 百分比 */ + percent?: number | string; +}