<template>
  <van-sticky>
    <van-nav-bar title="附件">
      <template #right>
        <van-icon name="close" color="#3c86f3" size="22" @click="closePage" />
      </template>
    </van-nav-bar>
  </van-sticky>
  <div class="iframe-container">
    <iframe :src="attachSrc" frameborder="0" ref="showAtt"></iframe>
  </div>
</template>

<script setup>
const props = defineProps({
  attachSrc: String,
});
const emit = defineEmits(["closeAttachPicker"]);

const closePage = () => {
  console.log("closePage");
  emit("closeAttachPicker");
};
</script>
<style scoped>
.iframe-container {
  height: 90%;
}
iframe {
  border: none;
  height: 90vh;
  width: 100vw;
}
</style>
