无法让 vue3-google-map 在 codepen 中工作

问题描述

<template>
  <div>
    <div>{{ title }} ({{ version }})</div>
    <google-map :center="{ lat: 39.50024,lng: -98.350892 }" :zoom="4" />
  </div>
</template>

<script>
import * as vue3GoogleMap from 'https://cdn.skypack.dev/[email protected]'
const { ref,defineComponent,version } = Vue

export default {
   components: {
    'google-map': defineComponent(vue3GoogleMap.GoogleMap)
  },setup() {
    const title = ref("Hello,World")
    return { title,version }
  }
}
</script>

这是代码笔:https://codepen.io/haineault/pen/OJpxgdq

它只是引发了这个警告:

"[Vue 警告]: 缺少引用所有者上下文。引用不能用于提升 虚拟节点。必须在渲染函数内创建带有 ref 的 vnode。"

我也尝试返回一个渲染函数并使用“h”来渲染它,我得到了相同的结果..

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)