rvis-aiui-kit 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,11 +13,11 @@ export default {
13
13
  },
14
14
  width: {
15
15
  type: String,
16
- value: '66px'
16
+ value: '168px'
17
17
  },
18
18
  height: {
19
19
  type: String,
20
- value: '66px'
20
+ value: '104px'
21
21
  },
22
22
  objectFit: {
23
23
  type: String,
@@ -38,7 +38,7 @@ export default {
38
38
 
39
39
  <style>
40
40
  .image-content {
41
- border-radius: 4px;
41
+ border-radius: 2px;
42
42
  overflow: hidden;
43
43
  }
44
44
  </style>
@@ -0,0 +1,35 @@
1
+ # Image 图片组件
2
+
3
+ 注册路径:`rvis-aiui-kit/image`。
4
+
5
+ Image 用于在 AIUI 页面中显示应用图片,并与 Glass3 默认相机预览区域保持一致的尺寸和圆角。
6
+
7
+ | 属性 | 类型 | 默认值 | 说明 |
8
+ | --- | --- | --- | --- |
9
+ | `src` | String | `''` | 图片地址,支持运行时可读取的网络地址、本地路径或 Base64 Data URL。 |
10
+ | `width` | String | `'168px'` | 图片宽度。 |
11
+ | `height` | String | `'104px'` | 图片高度。 |
12
+ | `objectFit` | String | `'fill'` | 缩放方式:`contain`、`cover` 或 `fill`。 |
13
+
14
+ 组件使用固定 `2px` 圆角。默认 `168px × 104px` 几何与 `glass3.camera.startPreview()` 的默认预览尺寸一致,适合在预览停止后用拍照结果替换同一媒体区域。
15
+
16
+ ```json
17
+ {
18
+ "usingComponents": {
19
+ "rvis-image": "rvis-aiui-kit/image"
20
+ }
21
+ }
22
+ ```
23
+
24
+ ```xml
25
+ <rvis-image
26
+ src="{{ imageSrc }}"
27
+ objectFit="cover"
28
+ ></rvis-image>
29
+ ```
30
+
31
+ 拍照结果使用 Base64 时,将 `photoMime` 和 `photoBase64` 组成 Data URL 后传给 `src`:
32
+
33
+ ```js
34
+ const imageSrc = `data:${photo.photoMime || 'image/jpeg'};base64,${photo.photoBase64}`;
35
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rvis-aiui-kit",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "RVIS AIUI components and Glass3 extension SDK.",
5
5
  "type": "module",
6
6
  "main": "./sdk/index.js",
package/sdk/README.md CHANGED
@@ -589,7 +589,7 @@ const preview = await glass3.camera.startPreview();
589
589
  left: 0,
590
590
  top: 40,
591
591
  width: 168,
592
- height: 103,
592
+ height: 104,
593
593
  cornerRadius: 2,
594
594
  outline: true
595
595
  }
@@ -611,7 +611,7 @@ const preview = await glass3.camera.startPreview({
611
611
  | 字段 | 类型 | 约束 |
612
612
  | --- | --- | --- |
613
613
  | `left` | `number` | 有限、非负。 |
614
- | `top` | `number` | 有限、非负。自定义普通预览建议 `top >= 150`。 |
614
+ | `top` | `number` | 有限、非负。标准 HUD 布局使用默认值 `40`。 |
615
615
  | `width` | `number` | 有限且大于 0。 |
616
616
  | `height` | `number` | 有限且大于 0。 |
617
617
  | `cornerRadius` | `number` | 有限、非负。 |
@@ -19,7 +19,7 @@ const DEFAULT_PREVIEW_ARGS = {
19
19
  left: 0,
20
20
  top: 40,
21
21
  width: 168,
22
- height: 103,
22
+ height: 104,
23
23
  cornerRadius: 2,
24
24
  outline: true
25
25
  };
@@ -33,7 +33,7 @@ const preview = await glass3.camera.startPreview();
33
33
  left: 0,
34
34
  top: 40,
35
35
  width: 168,
36
- height: 103,
36
+ height: 104,
37
37
  cornerRadius: 2,
38
38
  outline: true
39
39
  }