诸葛龙ovo
诸葛龙ovo
  • 发布:2024-03-07 19:50
  • 更新:2024-03-11 19:18
  • 阅读:430

uniapp打包运行华为快应用报错TypeError: Cannot read properties of undefined (reading 'onLoad')

分类:快应用

用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>
2024-03-07 19:50 负责人:无 分享
已邀请:
JXWang

JXWang

感谢您的反馈,已复现该问题,已加分,我排查一下

  • 1***@qq.com

    你好,我问下这问题怎么样了,我被困扰了好久

    2024-03-27 13:53

要回复问题请先登录注册