<template>
  <div id="index">
    <el-row>
      <el-col :span="24" class="info">
        <el-col :span="24" class="main">
          <el-col :span="7" class="column">
            <column @setCategory="data => (category = data)" @setList="data => (categoryList = data)"></column>
          </el-col>
          <el-col :span="17" class="message">
            <item-list :category="category" :categoryList="categoryList"></item-list>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import column from './parts/column.vue';
import itemList from './parts/itemList.vue';
import dataTable from '@/components/data-table.vue';
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'index',
  props: {},
  components: { column, itemList },
  data: () => {
    return {
      category: undefined,
      categoryList: [],
    };
  },
  created() {},
  methods: {},
  computed: {
    ...mapState(['user']),
    pageTitle() {
      return `${this.$route.meta.title}`;
    },
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
};
</script>

<style lang="less" scoped>
.main {
  padding: 20px;
  margin: 10px 20px;
  border: 1px solid #ccc;
  width: 96%;
}
.column {
  width: 27%;
  min-height: 690px;
  border: 1px solid #ccc;
  margin: 0 20px 0 0;
}
.message {
  border: 1px solid #ccc;
  min-height: 690px;
}
</style>
