uni-canvas-image 1.0.8 → 1.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uni-canvas-image",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "租房项目使用uniapp canvas合并图片",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -23,14 +23,14 @@ function handleItem(obj, canvasId, api) {
23
23
  dWidth: 375,
24
24
  dHeight: 170,
25
25
  }
26
- const paragraphInfos = handleParagraph(obj.title)
26
+ const paragraphInfos = handleParagraph(obj.title, 21)
27
27
  const titleInfos = paragraphInfos.map((text, index) => {
28
28
  return {
29
29
  type: 'text',
30
30
  text,
31
31
  x: 10,
32
- y: 180 + index * 20,
33
- fontSize: 14,
32
+ y: 180 + index * 24,
33
+ fontSize: 18,
34
34
  color: '#000',
35
35
  }
36
36
  })
@@ -40,8 +40,8 @@ function handleItem(obj, canvasId, api) {
40
40
  type: 'text',
41
41
  text,
42
42
  x: 10,
43
- y: (titleInfos.length > 1 ? 230 : 220) + index * 18,
44
- fontSize: 12,
43
+ y: (titleInfos.length > 1 ? 234 : 224) + index * 22,
44
+ fontSize: 16,
45
45
  color: '#9B9B9B',
46
46
  }
47
47
  })
@@ -65,25 +65,25 @@ function handleItems(arr, canvasId, api) {
65
65
  dWidth: 120,
66
66
  dHeight: 120,
67
67
  }
68
- const paragraphInfos = handleParagraph(obj.title, 16)
68
+ const paragraphInfos = handleParagraph(obj.title, 12)
69
69
  const titleInfos = paragraphInfos.map((text, index) => {
70
70
  return {
71
71
  type: 'text',
72
72
  text,
73
73
  x: 144,
74
- y: 10 + i * 140 + index * 20,
75
- fontSize: 14,
74
+ y: 10 + i * 140 + index * 24,
75
+ fontSize: 18,
76
76
  color: '#000',
77
77
  }
78
78
  })
79
- const contentInfos = handleParagraph(obj.content, 24, 4)
79
+ const contentInfos = handleParagraph(obj.content, 18, 4)
80
80
  const newContentInfos = contentInfos.map((text, index) => {
81
81
  return {
82
82
  type: 'text',
83
83
  text,
84
84
  x: 144,
85
- y: (titleInfos.length > 1 ? 60 : 50) + i * 140 + index * 18,
86
- fontSize: 10,
85
+ y: (titleInfos.length > 1 ? 64 : 54) + i * 140 + index * 22,
86
+ fontSize: 16,
87
87
  color: '#9B9B9B',
88
88
  }
89
89
  })