/*
 * @Author: LiZhiWei
 * @Date: 2025-04-24 15:29:17
 * @LastEditors: LiZhiWei
 * @LastEditTime: 2025-04-24 15:48:14
 * @Description: 
 */
import { createApp } from 'vue'
import PdfView from './PdfView.vue'
export default async function renderPdf(buffer, target) {
  const app = createApp(PdfView, { data: buffer })
  app.mount(target)
  
  return {
    $el: target,
    $destroy() {
      app.unmount()
    }
  }
}
