
- 发布:2020-09-29 11:38
- 更新:2020-09-29 11:38
- 阅读:558
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 10.13.6 (17G14019)
HBuilderX类型: 正式
HBuilderX版本号: 2.8.13
手机系统: 全部
手机厂商: 华为
页面类型: vue
打包方式: 离线
项目创建方式: HBuilderX
测试过的手机:
示例代码:
<template>
<view class="content">
<image class="logo" :src="root + '/logo.png'"></image>
<view>
<text class="title">{{ title }}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
computed: {
root() {
return '/static';
}
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200 rpx;
width: 200 rpx;
margin: 200 rpx auto 50 rpx auto;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36 rpx;
color: #8f8f94;
}
</style>
<template>
<view class="content">
<image class="logo" :src="root + '/logo.png'"></image>
<view>
<text class="title">{{ title }}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
computed: {
root() {
return '/static';
}
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200 rpx;
width: 200 rpx;
margin: 200 rpx auto 50 rpx auto;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36 rpx;
color: #8f8f94;
}
</style>
操作步骤:
直接运行编译小程序即可复现
直接运行编译小程序即可复现
预期结果:
和h5一样的方式运行
和h5一样的方式运行
实际结果:
h5 正常加载
小程序 多次加载还报错
h5 正常加载
小程序 多次加载还报错
bug描述:
用计算属性的方式写小程序 为什么 各种报错 图片还加载了4次 有点懵 ?!


