index.vue 2.5 KB
Newer Older
陈小婷 已提交
1 2 3
<template>
  <div :class="prefixCls">
    <a-page-header title="卡片列表" :ghost="false">
V
vben 已提交
4
      基于Vue Next, TypeScript, Ant Design Vue实现的一套完整的企业级后台管理系统。
陈小婷 已提交
5 6 7 8 9 10 11 12
      <div :class="`${prefixCls}__link`">
        <a><Icon icon="bx:bx-paper-plane" color="#1890ff" /><span>开始</span></a>
        <a><Icon icon="carbon:warning" color="#1890ff" /><span>简介</span></a>
        <a><Icon icon="gg:loadbar-doc" color="#1890ff" /><span>文档</span></a>
      </div>
    </a-page-header>

    <div :class="`${prefixCls}__content`">
V
vben 已提交
13
      <a-list>
陈小婷 已提交
14 15 16
        <a-row :gutter="16">
          <template v-for="(item, index) in list" :key="index">
            <a-col :span="6">
V
vben 已提交
17 18
              <a-list-item>
                <a-card :hoverable="true" :class="`${prefixCls}__card`">
陈小婷 已提交
19 20 21 22 23
                  <div :class="`${prefixCls}__card-title`">
                    <Icon class="icon" v-if="item.icon" :icon="item.icon" :color="item.color" />
                    {{ item.title }}
                  </div>
                  <div :class="`${prefixCls}__card-detail`">
V
vben 已提交
24
                    基于Vue Next, TypeScript, Ant Design Vue实现的一套完整的企业级后台管理系统
陈小婷 已提交
25
                  </div>
V
vben 已提交
26 27
                </a-card>
              </a-list-item>
陈小婷 已提交
28 29 30
            </a-col>
          </template>
        </a-row>
V
vben 已提交
31
      </a-list>
陈小婷 已提交
32 33 34 35 36 37 38 39 40
    </div>
  </div>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import Icon from '/@/components/Icon/index';
  import { cardList } from './data';

  export default defineComponent({
V
vben 已提交
41
    components: { Icon },
陈小婷 已提交
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
    setup() {
      return {
        prefixCls: 'list-card',
        list: cardList,
      };
    },
  });
</script>
<style lang="less" scoped>
  .list-card {
    &__link {
      margin-top: 10px;
      font-size: 14px;

      a {
        margin-right: 30px;
      }

      span {
        margin-left: 5px;
      }
    }

    &__content {
      padding: 12px 24px;
      // background: #fff;
    }

    &__card {
      width: 100%;
      margin-bottom: -8px;

      .ant-card-body {
        padding: 16px;
      }

      &-title {
        margin-bottom: 5px;
        font-size: 16px;
        font-weight: 500;
        color: rgba(0, 0, 0, 0.85);

        .icon {
          margin-top: -5px;
          margin-right: 10px;
          font-size: 38px !important;
        }
      }

      &-detail {
        padding-top: 10px;
        padding-left: 30px;
        font-size: 14px;
        color: rgba(0, 0, 0, 0.5);
      }
    }
  }
</style>