top.vue:
<template>
<view class="page-responsive-top">
<view>
<!--宽屏菜单-->
<match-media :min-width="1025">
<view>
宽屏菜单
</view>
</match-media>
<!--窄屏菜单-->
<match-media :min-width="0" :max-width="1024">
<view>窄屏菜单</view>
</match-media>
</view>
</view>
</template>
m***@sina.com (作者)
main.js:22 TypeError: Cannot read properties of undefined (reading '$page')
at new ServiceMediaQueryObserver (uni-h5.es.js:4701:30)
at uni-h5.es.js:4737:10
at Module.createMediaQueryObserver (uni-h5.es.js:3075:15)
at Proxy.mounted (uni-match-media.vue:53:30)
上传了一个测试项目,只要在h5框架top、left、right这个中,用到uni-match-media,就会提示报错,并且,这个uni-match-media组件 也不生效了。
2025-01-06 11:58
m***@sina.com (作者)
11:55:12.559 [Vue warn]: Unhandled error during execution of app errorHandler
11:55:12.573 [TypeError] {message: "Cannot read properties of undefined (reading '$page')"}
控制台报这个
2025-01-06 11:59
m***@sina.com (作者)
上传了测试项目,能否帮忙看一下问题。
2025-01-12 22:17