vue-vben-admin/src/views/demo/page/account/center/Project.vue

72 lines
1.5 KiB
Vue
Raw Normal View History

2020-11-15 12:47:59 +08:00
<template>
<List :class="prefixCls">
2020-11-15 13:46:16 +08:00
<a-row :gutter="16">
2021-06-17 21:43:53 +08:00
<template v-for="item in list" :key="item.title">
2020-11-15 13:46:16 +08:00
<a-col :span="6">
2020-11-15 12:47:59 +08:00
<ListItem>
<Card :hoverable="true" :class="`${prefixCls}__card`">
<img :src="demoImg" />
<div :class="`${prefixCls}__card-title`">
{{ item.title }}
</div>
2021-01-28 23:28:50 +08:00
<div :class="`${prefixCls}__card-content`">
{{ item.content }}
</div>
2020-11-15 12:47:59 +08:00
</Card>
</ListItem>
2020-11-15 13:46:16 +08:00
</a-col>
2020-11-15 12:47:59 +08:00
</template>
2020-11-15 13:46:16 +08:00
</a-row>
2020-11-15 12:47:59 +08:00
</List>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
2021-01-18 23:37:36 +08:00
import { List, Card, Row, Col } from 'ant-design-vue';
2020-11-15 12:47:59 +08:00
import demoImg from '/@/assets/images/demo.png';
import { projectList } from './data';
export default defineComponent({
components: {
List,
ListItem: List.Item,
Card,
2021-01-18 23:37:36 +08:00
[Row.name]: Row,
[Col.name]: Col,
2020-11-15 12:47:59 +08:00
},
setup() {
return {
prefixCls: 'account-center-project',
list: projectList,
demoImg,
};
},
});
</script>
2020-11-20 22:54:40 +08:00
<style lang="less">
2020-11-15 12:47:59 +08:00
.account-center-project {
&__card {
width: 100%;
2020-11-20 22:54:40 +08:00
.ant-card-body {
2021-10-25 23:49:03 +08:00
padding: 0 0 24px;
2020-11-15 12:47:59 +08:00
}
img {
width: 100%;
2020-11-17 22:49:49 +08:00
height: 130px;
2020-11-15 12:47:59 +08:00
}
&-title {
margin: 5px 10px;
font-size: 16px;
font-weight: 500;
2021-10-25 23:49:03 +08:00
color: rgb(0 0 0 / 85%);
2020-11-15 12:47:59 +08:00
}
&-content {
margin: 5px 10px;
}
}
}
</style>