@tplc/wot 0.1.98 → 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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.45...v1.0.1) (2025-11-10)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 图片自适应 ([a3f929c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a3f929c2145e6a965a8ffaa23a61479f4676f6a2))
11
+
12
+
13
+ ### 🚀 Chore | 构建/工程依赖/工具
14
+
15
+ * **release:** 0.2.1 ([94ae900](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/94ae90045996bf36e0705f430835f2363f00b2d0))
16
+
17
+ ### [0.2.1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.45...v0.2.1) (2025-11-10)
18
+
19
+
20
+ ### ✨ Features | 新功能
21
+
22
+ * 图片自适应 ([a3f929c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a3f929c2145e6a965a8ffaa23a61479f4676f6a2))
23
+
24
+ ### [0.1.100](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.1.99...v0.1.100) (2025-11-08)
25
+
26
+ ### [0.1.99](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.41...v0.1.99) (2025-11-08)
27
+
28
+
29
+ ### 🚀 Chore | 构建/工程依赖/工具
30
+
31
+ * **release:** 0.5.42 ([d607bbd](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d607bbdcd29fcfd3c8e19d588f6251c5d00de07f))
32
+
33
+
34
+ ### ✨ Features | 新功能
35
+
36
+ * 优化样式 ([0a1bfce](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/0a1bfce8ae529647eeadcc5188e9218dffb1d051))
37
+ * 支持二维码 ([18a1730](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/18a17306334e84fbf2fb1fa31c560864735c8060))
38
+ * 调整依赖 ([e468622](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e468622964f13c5b50d6ee3e7a5c8d39a94bc65f))
39
+
5
40
  ### [0.1.98](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.191...v0.1.98) (2025-09-09)
6
41
 
7
42
 
@@ -97,17 +97,17 @@ function wrapPhoto({ photo, width = 100, type = 1 }: any) {
97
97
  if (typeof width === 'string') {
98
98
  const imgWidth = parseInt(width.replace('rpx', ''))
99
99
  if (width.includes('rpx')) {
100
- finalWidth = imgWidth * 6
100
+ finalWidth = imgWidth * 2
101
101
  } else if (width.includes('px')) {
102
- finalWidth = imgWidth * 3
102
+ finalWidth = imgWidth
103
103
  } else if (width.includes('%')) {
104
- finalWidth = 1500
104
+ finalWidth = 1125
105
105
  }
106
106
  } else {
107
- finalWidth = width * 3
107
+ finalWidth = width
108
108
  }
109
- if (finalWidth > 1500) {
110
- finalWidth = 1500
109
+ if (finalWidth > 1125) {
110
+ finalWidth = 1125
111
111
  }
112
112
  }
113
113
 
@@ -116,14 +116,14 @@ function wrapPhoto({ photo, width = 100, type = 1 }: any) {
116
116
  if (isVideoUrl(photo)) {
117
117
  const suffix = isctyun
118
118
  ? `${sym}x-amz-process=video/snapshot,t_2000,w_${finalWidth},m_lfit`
119
- : `${sym}x-oss-process=video/snapshot,t_2000,w_${finalWidth}&imageView2/2/w/${finalWidth}`
119
+ : `${sym}x-oss-process=video/snapshot,t_2000,w_${finalWidth}/format,webp&imageView2/2/w/${finalWidth}`
120
120
  const url = `${photo}${suffix}`
121
121
  console.log(url, 'url')
122
122
  return url
123
123
  }
124
124
  const suffix = isctyun
125
125
  ? `${sym}x-amz-process=image/resize,w_${finalWidth},m_lfit`
126
- : `${sym}x-oss-process=image/resize,m_mfit,w_${finalWidth}&imageView2/2/w/${finalWidth}`
126
+ : `${sym}x-oss-process=image/resize,m_mfit,w_${finalWidth}/format,webp&imageView2/2/w/${finalWidth}`
127
127
  const url = `${photo}${suffix}`
128
128
  return url
129
129
  }
@@ -370,6 +370,8 @@ export default {
370
370
  size,
371
371
  width: size,
372
372
  height: size,
373
+ canvasWidth: size * 1.08,
374
+ canvasHeight: size * 1.08,
373
375
  })
374
376
  },
375
377
  /**
@@ -447,6 +449,7 @@ export default {
447
449
  this.templateOptions = this.getTemplateOptions()
448
450
  /* uQRCode选项 */
449
451
  this.uqrcodeOptions = this.getUqrcodeOptions()
452
+ console.log('this.templateOptions', this.templateOptions)
450
453
  /* 纠错等级兼容字母写法 */
451
454
  if (typeof this.uqrcodeOptions.errorCorrectLevel === 'string') {
452
455
  this.uqrcodeOptions.errorCorrectLevel =
@@ -685,6 +688,9 @@ export default {
685
688
  callback.complete = () => {}
686
689
  }
687
690
 
691
+ // 先更新模板选项的尺寸,确保容器大小正确
692
+ this.templateOptions = this.getTemplateOptions()
693
+
688
694
  this.resetCanvas(() => {
689
695
  clearTimeout(this.makeDelegate)
690
696
  this.makeDelegate = setTimeout(() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "@tplc/wot",
3
3
  "name": "@tplc/wot",
4
- "version": "0.1.98",
4
+ "version": "1.0.1",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",