guhongwei 5 سال پیش
والد
کامیت
9c75a780eb
2فایلهای تغییر یافته به همراه46 افزوده شده و 3 حذف شده
  1. 30 0
      src/layout/index/top.vue
  2. 16 3
      src/views/index/index.vue

+ 30 - 0
src/layout/index/top.vue

@@ -0,0 +1,30 @@
+<template>
+  <div id="top">
+    <el-row>
+      <el-col :span="24" v-for="(item, index) in newList" :key="index" :name="`${index}`">
+        <el-col :span="12">
+        {{item.title}}
+        </el-col>
+        <el-col :span="12">
+        {{item.time}}
+      </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'top',
+  props: {
+    newList: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 16 - 3
src/views/index/index.vue

@@ -1,14 +1,27 @@
 <template>
   <div id="index">
-    <el-row>首页</el-row>
+    <el-row>
+      <el-col :span="24">
+        <div class="w_1200">
+          <el-col :span="24" class="top">
+            <top></top>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import top from '../../layout/index/top.vue';
 export default {
   name: 'index',
-  props: {},
-  components: {},
+  props: {
+    newList:null,
+  },
+  components: {
+    top,
+  },
   data: () => ({}),
   created() {},
   computed: {},