<template>
  <a-card
    :bordered="false"
    size="small"
    :bodyStyle="{ padding:'12px', borderRadius: '8px', ...$router.currentRoute?.meta }">
    <XReport
      ref="main"
      v-if="configName"
      :key="`xreport-${configName}`"
      :use-oss-for-img="false"
      :config-name="configName"
      :show-img-in-cell="true"
      :display-only="true"
      :edit-mode="false"
      :dont-format="true"/>
    <a-empty v-else/>
  </a-card>
</template>

<script>
import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport.vue'

export default {
  name: 'GridView',
  components: {
    XReport
  },
  mounted () {
    // 获取当前路由中的meta
    this.configName = this.$router.currentRoute.meta.configName
    this.nothing = !this.configName
  },
  data () {
    return {
      configName: '',
      nothing: false
    }
  },
  methods: {
  }
}
</script>
<style scoped>

</style>
