feat: 新增 antd 模式的代码生成示例
This commit is contained in:
24
apps/web-antd/src/components/content-wrap/content-wrap.vue
Normal file
24
apps/web-antd/src/components/content-wrap/content-wrap.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script lang="ts" setup>
|
||||
import type { CSSProperties } from 'vue';
|
||||
|
||||
import { Card } from 'ant-design-vue';
|
||||
|
||||
defineOptions({ name: 'ContentWrap' });
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
bodyStyle?: CSSProperties;
|
||||
title?: string;
|
||||
}>(),
|
||||
{
|
||||
bodyStyle: () => ({ padding: '10px' }),
|
||||
title: '',
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Card :body-style="bodyStyle" :title="title" class="mb-4">
|
||||
<slot></slot>
|
||||
</Card>
|
||||
</template>
|
||||
1
apps/web-antd/src/components/content-wrap/index.ts
Normal file
1
apps/web-antd/src/components/content-wrap/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default as ContentWrap } from './content-wrap.vue';
|
||||
Reference in New Issue
Block a user