| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <List :class="prefixCls">
- <a-row :gutter="16">
- <template v-for="item in list" :key="item.title">
- <a-col :span="6">
- <ListItem>
- <Card :hoverable="true" :class="`${prefixCls}__card`">
- <img :src="demoImg" />
- <div :class="`${prefixCls}__card-title`">
- {{ item.title }}
- </div>
- <div :class="`${prefixCls}__card-content`">
- {{ item.content }}
- </div>
- </Card>
- </ListItem>
- </a-col>
- </template>
- </a-row>
- </List>
- </template>
- <script lang="ts">
- import { defineComponent } from 'vue';
- import { List, Card, Row, Col } from 'ant-design-vue';
- import demoImg from '/@/assets/images/header.png';
- import { projectList } from './data';
- export default defineComponent({
- components: {
- List,
- ListItem: List.Item,
- Card,
- [Row.name]: Row,
- [Col.name]: Col,
- },
- setup() {
- return {
- prefixCls: 'account-center-project',
- list: projectList,
- demoImg,
- };
- },
- });
- </script>
- <style lang="less">
- .account-center-project {
- &__card {
- width: 100%;
- .ant-card-body {
- padding: 0 0 24px 0;
- }
- img {
- width: 100%;
- height: 130px;
- }
- &-title {
- margin: 5px 10px;
- font-size: 16px;
- font-weight: 500;
- color: rgba(0, 0, 0, 0.85);
- }
- &-content {
- margin: 5px 10px;
- }
- }
- }
- </style>
|