![genda_0927](http://img-cdn-tc.dcloud.net.cn/uploads/avatar/001/82/80/82_avatar_mid.jpg?v=1638523364)
- 发布:2021-10-25 11:25
- 更新:2021-12-27 16:57
- 阅读:1036
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 10.15.3
HBuilderX类型: 正式
HBuilderX版本号: 3.2.9
手机系统: 全部
手机厂商: 华为
页面类型: vue
打包方式: 云端
项目创建方式: HBuilderX
测试过的手机:
示例代码:
<template>
<page-meta root-font-size="9.2666666px"></page-meta>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text @click="clickHello" class="title">{{title}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
methods: {
clickHello() {
uni.navigateTo({url: '/pages/hello/hello?index=1'});
}
},
onLoad() {
// plus.navigator.closeSplashscreen();
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
<template>
<page-meta root-font-size="9.2666666px"></page-meta>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text @click="clickHello" class="title">{{title}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
methods: {
clickHello() {
uni.navigateTo({url: '/pages/hello/hello?index=1'});
}
},
onLoad() {
// plus.navigator.closeSplashscreen();
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
操作步骤:
3.2.9版本vue3 使用 page-meta 无效直接报错 11:14:52.537 TypeError: this.$pageVm.$on is not a function
vue2 可以正常使用,
vue2 与 vue3 代码一致
3.2.9版本vue3 使用 page-meta 无效直接报错 11:14:52.537 TypeError: this.$pageVm.$on is not a function
vue2 可以正常使用,
vue2 与 vue3 代码一致
预期结果:
可正常使用 page-meta 功能
可正常使用 page-meta 功能
实际结果:
vue3 中无法正常使用
vue3 中无法正常使用
bug描述:
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20211025/d379fa2322b195e95935261d9b5111e6.png)