用HBilderx工具创建了一个简单的vue3项目,打包华为快应用,运行到华为快应用开发者工具报错信息如下。
Runtime Error, Page : pages/index/index
03-07 17:05:44.505 E/jsLog (11888): Runtime Error, ErrorCode :
03-07 17:05:44.505 E/jsLog (11888): TypeError: Cannot read properties of undefined (reading 'onLoad')
03-07 17:05:44.505 E/jsLog (11888): at isPage (hbs:7080:31)
03-07 17:05:44.505 E/jsLog (11888): at Component.attached (hbs:7002:20)
03-07 17:05:44.505 E/jsLog (11888): at hbs-frk:1:221816
03-07 17:05:44.505 E/jsLog (11888): at Array.forEach (<anonymous>)
03-07 17:05:44.505 E/jsLog (11888): at t (hbs-frk:1:221789)
03-07 17:05:44.505 E/jsLog (11888): at Component.disposeLifetime (hbs-frk:1:221970)
03-07 17:05:44.505 E/jsLog (11888): at hbs-frk:1:223117
03-07 17:05:44.505 E/jsLog (11888): at Array.forEach (<anonymous>)
03-07 17:05:44.505 E/jsLog (11888): at Component._triggerLifetime (hbs-frk:1:223081)
03-07 17:05:44.505 E/jsLog (11888): at triggerLifetime (hbs-frk:1:236564)
index页面代码如下:
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
1***@qq.com
你好,我问下这问题怎么样了,我被困扰了好久
2024-03-27 13:53