From 0cdd32319a601ffda7f77832b010305e359fccdd Mon Sep 17 00:00:00 2001 From: blp <2962632571@qq.com> Date: Fri, 6 Jan 2023 17:53:29 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E3=80=81=E7=8A=B6=E6=80=81=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 4 + src/components/BadgeStatus/index.vue | 33 +++ src/components/CardBox/index.vue | 382 +++++++++++++++++++++++++++ src/utils/consts.ts | 11 + src/views/demo/index.vue | 67 ++++- 5 files changed, 496 insertions(+), 1 deletion(-) create mode 100644 src/components/BadgeStatus/index.vue create mode 100644 src/components/CardBox/index.vue diff --git a/components.d.ts b/components.d.ts index 3d1de6e0..cfee8de8 100644 --- a/components.d.ts +++ b/components.d.ts @@ -7,6 +7,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { + ABadge: typeof import('ant-design-vue/es')['Badge'] ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb'] ABreadcrumbItem: typeof import('ant-design-vue/es')['BreadcrumbItem'] AButton: typeof import('ant-design-vue/es')['Button'] @@ -37,7 +38,10 @@ declare module '@vue/runtime-core' { ATabPane: typeof import('ant-design-vue/es')['TabPane'] ATabs: typeof import('ant-design-vue/es')['Tabs'] ATextarea: typeof import('ant-design-vue/es')['Textarea'] + ATooltip: typeof import('ant-design-vue/es')['Tooltip'] AUpload: typeof import('ant-design-vue/es')['Upload'] + BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default'] + CardBox: typeof import('./src/components/CardBox/index.vue')['default'] GeoComponent: typeof import('./src/components/GeoComponent/index.vue')['default'] MonacoEditor: typeof import('./src/components/MonacoEditor/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/components/BadgeStatus/index.vue b/src/components/BadgeStatus/index.vue new file mode 100644 index 00000000..47870618 --- /dev/null +++ b/src/components/BadgeStatus/index.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/components/CardBox/index.vue b/src/components/CardBox/index.vue new file mode 100644 index 00000000..7eda82d6 --- /dev/null +++ b/src/components/CardBox/index.vue @@ -0,0 +1,382 @@ + + + + + diff --git a/src/utils/consts.ts b/src/utils/consts.ts index 49022e9a..68b9fbaa 100644 --- a/src/utils/consts.ts +++ b/src/utils/consts.ts @@ -17,3 +17,14 @@ export const STATE_COLOR = { // 已停止 'stopped': '#F2994A' } + +/** + * 卡片组件状态 + */ +export const StatusColorEnum = { + 'success': 'success', + 'error': 'error', + 'processing': 'processing', + 'warning': 'warning', + 'default': 'default', +} diff --git a/src/views/demo/index.vue b/src/views/demo/index.vue index 03fc9182..839a08d8 100644 --- a/src/views/demo/index.vue +++ b/src/views/demo/index.vue @@ -3,13 +3,78 @@
父级: {{ testValue }} + +
卡片组件: + + + + + + + +
- +