Переглянути джерело

fix: linkList type & CardList a-card actions

Sendya 6 роки тому
батько
коміт
b04b6add0f

+ 1 - 1
src/components/layout/PageLayout.vue

@@ -49,7 +49,7 @@
         default: null
       },
       linkList: {
-        type: String,
+        type: Array,
         default: null
       },
       extraImage: {

+ 32 - 0
src/components/tools/DetailList.vue

@@ -0,0 +1,32 @@
+<template>
+  <div :class="['detail-list', size === 'small' ? 'small' : 'large', layout === 'vertical' ? 'vertical': 'horizontal']">
+    <div v-if="title" class="title">{{ title }}</div>
+    <a-row>
+      <slot></slot>
+    </a-row>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "DetailList",
+    props: {
+      term: {
+        type: String,
+        default: null
+      }
+    },
+    inject: {
+      col: {
+        type: Number
+      }
+    },
+    methods: {
+
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/router/index.js

@@ -172,7 +172,7 @@ export const asyncRouterMap = [
       {
         path: '/profile/basic',
         name: 'ProfileBasic',
-        component: () => import('../views/list/TableList'),
+        component: () => import('../views/profile/basic/Index'),
         meta: { title: '基础详情页' }
       },
       {

+ 4 - 4
src/views/list/CardList.vue

@@ -18,10 +18,10 @@
               <a-avatar class="card-avatar" slot="avatar" :src="item.avatar" size="large"/>
               <div class="meta-content" slot="description">{{ item.content }}</div>
             </a-card-meta>
-            <ul class="ant-card-actions" slot="actions">
-              <li><a>操作一</a></li>
-              <li><a>操作二</a></li>
-            </ul>
+            <template class="ant-card-actions" slot="actions">
+              <a>操作一</a>
+              <a>操作二</a>
+            </template>
           </a-card>
         </template>
       </a-list-item>

+ 13 - 0
src/views/profile/basic/Index.vue

@@ -0,0 +1,13 @@
+<template>
+  <a-card :bordered="false">
+    basic
+  </a-card>
+</template>
+
+<script>
+  export default {}
+</script>
+
+<style scoped>
+
+</style>