我在库 Html2Canvas - Vue 中有一个错误

I have a bug in the library Html2Canvas - Vue

我想在 google maps 地图上截屏。默认情况下,我实现了库的代码,但控制台出现以下错误。 未捕获(承诺)提供的元素不在文档中。他试图用 .then 实现一个承诺,但它也不起作用。不知道问题有没有看懂。

我把代码留在这里

HTML

<template>
  <div>
    <div ref="printMe">
      <h1>Print me!</h1>
    </div>
    <img :src="output">
  </div>
<template>

COMPONENT.VUE

<script>
export default {
  data() {
    return {
      output: null
    }
  },
  methods: {
    async print() {
      const el = this.$refs.printMe;
      const options = {
        type: 'dataURL'
      }
      this.output = await this.$html2canvas(el, options);
    }
  }
}
</script>

我显示了一个错误未捕获(承诺)提供的元素不在文档中

您有一个模板错误停止了 Vue 渲染器 </template>

<template>
  <div>
    <div ref="printMe">
      <h1>Print me!</h1>
    </div>
    <img :src="output">
  </div>
</template>

sandbox