【发布时间】:2021-01-16 15:50:11
【问题描述】:
安装vue-meta后,我的浏览器控制台报错。
为什么会出现这个错误?是我的代码还是错误?我正在使用vue-meta@2.4.0 和 Vue 3。
main.js
createApp(App)
.use(router)
.use(VueMeta)
.mount("#app");
App.vue
<template>
<div>
<router-view></router-view>
</div>
</template>
<script>
import Header from "./components/Header.vue";
export default {
components: {
"app-header": Header,
},
};
</script>
首页.vue
export default {
name: "Home",
metaInfo() {
return {
title: "test meta data with vue",
meta: [
{
vmid: "description",
name: "description",
content:
"hello world, this is an example of adding a description with vueMeta",
},
],
};
},
};
【问题讨论】:
-
你发现问题了吗?
-
还没有。但是对于替代解决方案,我将 vue 版本降级为 vue 2。
-
看起来,我也必须这样做。 ://