文件
OmniCard/mpuniapp/pages/component/image/image-orientation.uvue

30 行
939 B
Plaintext

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<template>
<!-- #ifdef APP && !VUE3-VAPOR -->
<scroll-view style="flex: 1;">
<!-- #endif -->
<view style="align-items: center;">
<text>原图是横向且orientation=90°的jpg图片,预期显示为竖向</text>
<image style="width: 100px;height: 200px;" :src="src1" @error="error1"></image>
<text>原图是横向且orientation=90°的heic图片(需要支持heic的平台方有效),预期显示为竖向</text>
<image style="width: 100px;height: 200px;" :src="src2" @error="error2"></image>
</view>
<!-- #ifdef APP && !VUE3-VAPOR -->
</scroll-view>
<!-- #endif -->
</template>
<script setup lang="uts">
const src1 = ref('/static/test-image/orientation-90.jpg');
const src2 = ref('/static/test-image/orientation-90.heic');
function error1() {
src1.value = '/static/dislike.png';
}
function error2() {
src2.value = '/static/dislike.png';
}
</script>
<style>
</style>