<template>
  <div>
    <a-button type="primary" icon="eye" @click="preView"> 预览 </a-button>
         <print-preview ref="preView" @initPrint="handleInitPrint" @refreshList="handleRefreshList" :addPrint="addPrint"/>

  </div>
</template>

<script>
import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
// disAutoConnect();

let hiprintTemplate
import panel from './panel'
import printData from './print-data'
import printPreview from './preview'

export default {
  name: 'printDesign',
  components: {},
  data() {
    return {}
  },

  methods: {
    preView() {} ,
    handleRefreshList(){
      this.recordSelected = []
      this.$refs.pageRef.refreshList()

    },
    handleInitPrint(){
      this.$nextTick(() => {
      this.initPrint()
    })
    }
  }
}
</script>

<style scoped>
td {
  border: none !important;
}
.drag_item_box {
  height: 100%;
  padding: 6px;
}

.drag_item_box > div {
  height: 100%;
  width: 100%;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.drag_item_box > div > a {
  text-align: center;
  text-decoration-line: none;
}

.drag_item_box > div > a > span {
  font-size: 28px;
}

.drag_item_box > div > a > p {
  margin: 0;
}

.drag_item_title {
  font-size: 16px;
  padding: 12px 6px 0 6px;
  font-weight: bold;
}

.card-design {
  overflow: hidden;
  overflow-x: auto;
  overflow-y: auto;
}
</style>
