index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="info">
  5. <el-col :span="24" class="main">
  6. <el-col :span="7" class="column">
  7. <column @setCategory="data => (category = data)" @setList="data => (categoryList = data)"></column>
  8. </el-col>
  9. <el-col :span="17" class="message">
  10. <item-list :category="category" :categoryList="categoryList"></item-list>
  11. </el-col>
  12. </el-col>
  13. </el-col>
  14. </el-row>
  15. </div>
  16. </template>
  17. <script>
  18. import column from './parts/column.vue';
  19. import itemList from './parts/itemList.vue';
  20. import dataTable from '@/components/data-table.vue';
  21. import { mapState, createNamespacedHelpers } from 'vuex';
  22. export default {
  23. name: 'index',
  24. props: {},
  25. components: { column, itemList },
  26. data: () => {
  27. return {
  28. category: undefined,
  29. categoryList: [],
  30. };
  31. },
  32. created() {},
  33. methods: {},
  34. computed: {
  35. ...mapState(['user']),
  36. pageTitle() {
  37. return `${this.$route.meta.title}`;
  38. },
  39. },
  40. metaInfo() {
  41. return { title: this.$route.meta.title };
  42. },
  43. };
  44. </script>
  45. <style lang="less" scoped>
  46. .main {
  47. padding: 20px;
  48. margin: 10px 20px;
  49. border: 1px solid #ccc;
  50. width: 96%;
  51. }
  52. .column {
  53. width: 27%;
  54. min-height: 690px;
  55. border: 1px solid #ccc;
  56. margin: 0 20px 0 0;
  57. }
  58. .message {
  59. border: 1px solid #ccc;
  60. min-height: 690px;
  61. }
  62. </style>