1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| <template>
| <view class="container">
| <!-- 使用 <image> 组件显示图片 -->
| <image :src="imageUrl" mode="widthFix" style="width: 100%;"></image>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| imageUrl: "" ,// 用于存储图片的 URL
| };
| },
| onLoad(options) {
| // 从页面跳转的参数中获取图片 URL
| if (options.url) {
| this.imageUrl = decodeURIComponent(options.url);
| }
| }
| };
| </script>
|
| <style scoped>
| .container {
| display: flex;
| justify-content: center;
| align-items: center;
| height: 100vh;
| }
| </style>
|
|