<template>
  <div class="pa-3 white">
    <MTable
      :headers="headers"
      :items="items"
      :show-select="false"
      :loading="loading"
      :can-delete="false"
      @add="onAdd"
    ></MTable>
    <MDialog :visible.sync="show" title="图表编辑" fullscreen :footer="false">
      <DataChartEdit v-if="show"></DataChartEdit>
    </MDialog>
  </div>
</template>

<script>
import MTable from '@/components/List/table'
import MDialog from '@/components/Dialog'
import DataChartEdit from './dataChartEdit.vue'
export default {
  name: 'dataChart',
  components: {
    MTable,
    MDialog,
    DataChartEdit
  },
  data () {
    return {
      headers: [
        { text: '标题', value: 'title' },
        { text: '描述', value: 'describe' },
        { text: '创建日期', value: 'createDate' },
        { text: '操作', value: 'action' }
      ],
      items: [],
      loading: false,
      show: false
    }
  },
  created () {
  },
  methods: {
    onAdd () {
      this.show = true
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
