<template>
  <div id="editor-box" style="width: 100%; height: 100%">
    <iframe
      class="editor-iframe"
      :src="`${url}/#/manuals?token=${token}&baseRole=${$store.user.baseRole}`"
    ></iframe>
  </div>
</template>

<script>
export default {
  data () {
    return {
      token: JSON.parse(localStorage.getItem('token')),
      url: import.meta.env.VITE_APP_IFRAME_URL
    }
  },
  mounted () {
    console.log(this.$store.user, '111')
    // 处理当前iframe的父级为0
    // const editorBox = document.getElementById('editor-box')
    // editorBox.parentElement.style.padding = 0
  }
}
</script>

<style lang="scss" scoped>
.editor-iframe {
  width: 100%;
  height: 100%;
  border: none;
}
::v-deep .v-card {
  padding: 0;
}
</style>
