提交 09275385 编写于 作者: W wanganxp

补充image组件的静态资源示例

上级 f359130e
...@@ -11,6 +11,12 @@ ...@@ -11,6 +11,12 @@
<image class="image" mode="widthFix" :src="item.src" @error="imageErrorEvent"></image> <image class="image" mode="widthFix" :src="item.src" @error="imageErrorEvent"></image>
</view> </view>
</view> </view>
<view>
<text class="uni-subtitle-text">非static目录的src静态路径:./logo.png</text>
<view class="uni-center" style="background:#FFFFFF;">
<image class="image" mode="widthFix" src="./logo.png" @error="imageErrorEvent"></image>
</view>
</view>
</view> </view>
</scroll-view> </scroll-view>
</template> </template>
...@@ -36,7 +42,7 @@ ...@@ -36,7 +42,7 @@
}, },
{ {
src: logo, src: logo,
description: '非static目录(需import才能访问)' description: 'import方式'
}, },
{ {
// #ifdef APP-ANDROID // #ifdef APP-ANDROID
...@@ -76,6 +82,10 @@ ...@@ -76,6 +82,10 @@
{ {
src: 'https://request.dcloud.net.cn/api/http/contentType/404.png', src: 'https://request.dcloud.net.cn/api/http/contentType/404.png',
description: '错误网络地址,不存在的图片' description: '错误网络地址,不存在的图片'
},
{
src: './logo.png',
description: '非static目录的动态路径(不显示是对的)'
} }
] as Array<ImagePath> ] as Array<ImagePath>
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册