@cloudbase/weda-ui 0.2.15 → 0.2.16

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.
Files changed (112) hide show
  1. package/package.json +10 -7
  2. package/src/configs/components/calendar.json +75 -0
  3. package/src/configs/components/carousel.json +273 -0
  4. package/src/configs/components/chart/statisticsCard.json +331 -0
  5. package/src/configs/components/dataView.json +139 -0
  6. package/src/configs/components/form/location.json +152 -0
  7. package/src/configs/components/form/uploaderFile.json +2 -1
  8. package/src/configs/components/graphicCard.json +399 -0
  9. package/src/configs/components/link.json +2 -2
  10. package/src/configs/components/listView.json +230 -0
  11. package/src/configs/components/navLayout.json +350 -0
  12. package/src/configs/components/swiper.json +3 -3
  13. package/src/configs/index.js +16 -0
  14. package/src/mp/components/button/index.js +12 -13
  15. package/src/mp/components/button/index.wxml +1 -1
  16. package/src/mp/components/calendar/arrowright--line.svg +11 -0
  17. package/src/mp/components/calendar/index.js +238 -0
  18. package/src/mp/components/calendar/index.json +4 -0
  19. package/src/mp/components/calendar/index.wxml +37 -0
  20. package/src/mp/components/calendar/index.wxss +178 -0
  21. package/src/mp/components/carousel/index.js +88 -0
  22. package/src/mp/components/carousel/index.json +7 -0
  23. package/src/mp/components/carousel/index.wxml +6 -0
  24. package/src/mp/components/chart/statisticsCard/index.js +226 -0
  25. package/src/mp/components/chart/statisticsCard/index.json +4 -0
  26. package/src/mp/components/chart/statisticsCard/index.wxml +9 -0
  27. package/src/mp/components/chart/statisticsCard/index.wxss +45 -0
  28. package/src/mp/components/dataView/index.js +34 -0
  29. package/src/mp/components/dataView/index.json +7 -0
  30. package/src/mp/components/dataView/index.wxml +15 -0
  31. package/src/mp/components/dataView/index.wxss +0 -0
  32. package/src/mp/components/form/location/components/mapChoose/index.js +201 -0
  33. package/src/mp/components/form/location/components/mapChoose/index.json +4 -0
  34. package/src/mp/components/form/location/components/mapChoose/index.wxml +42 -0
  35. package/src/mp/components/form/location/components/mapChoose/index.wxss +188 -0
  36. package/src/mp/components/form/location/index.js +341 -0
  37. package/src/mp/components/form/location/index.json +6 -0
  38. package/src/mp/components/form/location/index.wxml +25 -0
  39. package/src/mp/components/form/location/index.wxss +91 -0
  40. package/src/mp/components/form/uploader/index.js +39 -35
  41. package/src/mp/components/form/uploaderFile/index.js +61 -14
  42. package/src/mp/components/graphicCard/chevron-right.svg +3 -0
  43. package/src/mp/components/graphicCard/index.js +205 -0
  44. package/src/mp/components/graphicCard/index.json +4 -0
  45. package/src/mp/components/graphicCard/index.wxml +29 -0
  46. package/src/mp/components/graphicCard/index.wxss +157 -0
  47. package/src/mp/components/image/index.js +0 -1
  48. package/src/mp/components/listView/arrow-right-line.svg +3 -0
  49. package/src/mp/components/listView/index.js +286 -0
  50. package/src/mp/components/listView/index.json +4 -0
  51. package/src/mp/components/listView/index.wxml +40 -0
  52. package/src/mp/components/listView/index.wxss +150 -0
  53. package/src/mp/components/listView/more-line.svg +3 -0
  54. package/src/mp/components/navLayout/index.js +123 -0
  55. package/src/mp/components/navLayout/index.json +7 -0
  56. package/src/mp/components/navLayout/index.wxml +25 -0
  57. package/src/mp/components/navLayout/index.wxss +1193 -0
  58. package/src/mp/components/swiper/index.wxml +2 -0
  59. package/src/mp/index.json +9 -1
  60. package/src/mp/utils/debounce.js +133 -0
  61. package/src/mp/utils/dr_square_point.js +25 -0
  62. package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1336 -0
  63. package/src/mp/utils/spark-md5.js +776 -0
  64. package/src/mp/utils/tcb.js +18 -0
  65. package/src/web/components/calendar/index.css +382 -0
  66. package/src/web/components/calendar/index.jsx +312 -0
  67. package/src/web/components/calendar/util.js +90 -0
  68. package/src/web/components/carousel/index.css +119 -0
  69. package/src/web/components/carousel/index.tsx +417 -0
  70. package/src/web/components/chart/statisticsCard/index.css +62 -0
  71. package/src/web/components/chart/statisticsCard/index.tsx +286 -0
  72. package/src/web/components/chart/statisticsCard/interface.ts +14 -0
  73. package/src/web/components/dataView/index.tsx +20 -0
  74. package/src/web/components/dataView/interface.ts +6 -0
  75. package/src/web/components/form/location/common/mapChoose.css +178 -0
  76. package/src/web/components/form/location/common/mapChoose.jsx +343 -0
  77. package/src/web/components/form/location/common/mapView.jsx +190 -0
  78. package/src/web/components/form/location/common/propsConfig.js +54 -0
  79. package/src/web/components/form/location/common/selectModal.css +44 -0
  80. package/src/web/components/form/location/common/selectModal.jsx +82 -0
  81. package/src/web/components/form/location/common/useLocationInfo.js +100 -0
  82. package/src/web/components/form/location/components/LocationH5/index.css +243 -0
  83. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +403 -0
  84. package/src/web/components/form/location/components/LocationPC/Header.jsx +109 -0
  85. package/src/web/components/form/location/components/LocationPC/index.css +44 -0
  86. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +323 -0
  87. package/src/web/components/form/location/constants.js +4 -0
  88. package/src/web/components/form/location/index.css +0 -0
  89. package/src/web/components/form/location/index.jsx +25 -0
  90. package/src/web/components/form/uploader/uploader.h5.tsx +16 -10
  91. package/src/web/components/form/uploader/uploader.pc.tsx +15 -11
  92. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +122 -107
  93. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +22 -19
  94. package/src/web/components/graphicCard/index.css +163 -0
  95. package/src/web/components/graphicCard/index.tsx +309 -0
  96. package/src/web/components/image/image.tsx +0 -1
  97. package/src/web/components/index.js +12 -0
  98. package/src/web/components/listView/arrow-right-line.svg +3 -0
  99. package/src/web/components/listView/index.css +139 -0
  100. package/src/web/components/listView/index.tsx +354 -0
  101. package/src/web/components/listView/interface.ts +98 -0
  102. package/src/web/components/navLayout/index.css +332 -0
  103. package/src/web/components/navLayout/index.tsx +247 -0
  104. package/src/web/components/tabs/index.tsx +2 -2
  105. package/src/web/components/tabs/tabs.h5.tsx +7 -4
  106. package/src/web/components/uploaderFileView/index.css +9 -9
  107. package/src/web/components/uploaderFileView/index.jsx +32 -23
  108. package/src/web/types.d.ts +15 -14
  109. package/src/web/utils/debounce.js +98 -0
  110. package/src/web/utils/platform.js +31 -0
  111. package/src/web/utils/tcb.js +35 -0
  112. package/src/web/utils/tmap.js +4 -0
@@ -1,18 +1,11 @@
1
- import { getCloudInstance } from '../../../utils/tcb';
2
- // import deepEqual from '../../../utils/deepEqual';
1
+ import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
2
+ import SparkMD5 from '../../../utils/spark-md5';
3
3
 
4
4
  Component({
5
5
  options: {
6
6
  virtualHost: true,
7
7
  },
8
- lifetimes: {
9
- attached() {
10
- this.setData({
11
- urls: this.properties.defaultValue,
12
- files: this.properties.defaultValue.map((url) => ({ url })),
13
- });
14
- },
15
- },
8
+
16
9
  properties: {
17
10
  maxUploadCount: {
18
11
  type: Number,
@@ -31,8 +24,8 @@ Component({
31
24
  value: 'horizontal',
32
25
  },
33
26
  defaultValue: {
34
- type: Array,
35
- value: [],
27
+ type: Object,
28
+ value: '',
36
29
  },
37
30
  single: {
38
31
  type: Boolean,
@@ -45,22 +38,27 @@ Component({
45
38
  },
46
39
  data: {
47
40
  maxCount: 0,
41
+ cloudFile: [],
48
42
  files: [],
49
43
  urls: [],
50
44
  uploadFile: async function (files) {
51
45
  // 文件上传的函数,返回一个promise
52
46
  const uploadPath = 'weda-uploader';
53
-
54
47
  const tcb = await getCloudInstance();
55
- const uploadPromise = files.tempFilePaths.map(async (tempFilePath) => {
56
- const fileType = tempFilePath.split('.')?.[1];
57
- const cloudPath = `${uploadPath}/uploader-${Date.now()}.${fileType}`;
58
- const uploadRes = await tcb.uploadFile({
59
- cloudPath,
60
- filePath: tempFilePath,
61
- });
62
- return { fileID: uploadRes.fileID };
63
- });
48
+ const uploadPromise = files.tempFilePaths.map(
49
+ async (tempFilePath, index) => {
50
+ var spark = new SparkMD5.ArrayBuffer();
51
+ spark.append(files.contents[index]);
52
+ var md5Path = spark.end(false);
53
+ const fileType = tempFilePath.split('.')[1];
54
+ const cloudPath = `${uploadPath}/${md5Path}-${Date.now()}.${fileType}`;
55
+ const uploadRes = await tcb.uploadFile({
56
+ cloudPath,
57
+ filePath: tempFilePath,
58
+ });
59
+ return { fileID: uploadRes.fileID };
60
+ }
61
+ );
64
62
  const uploadFileList = await Promise.all(uploadPromise);
65
63
  const cloudUrls = uploadFileList.map((file) => file.fileID);
66
64
  // 这里返回的东西会在uploadSuccess回调函数中获取到
@@ -71,7 +69,6 @@ Component({
71
69
  },
72
70
  methods: {
73
71
  uploadError: function (e) {
74
- // console.log('upload error', e.detail);
75
72
  this.triggerEvent('error', e.detail);
76
73
  },
77
74
  uploadSuccess: async function (e) {
@@ -82,7 +79,7 @@ Component({
82
79
  });
83
80
  this.setData({
84
81
  files: this.data.files.concat(e.detail.urls.map((url) => ({ url }))),
85
- urls: [...this.data.urls, ...urls],
82
+ urls: [...this.data.cloudFile, ...urls],
86
83
  });
87
84
  },
88
85
  onDelete: function (e) {
@@ -93,17 +90,24 @@ Component({
93
90
  },
94
91
  },
95
92
  observers: {
96
- // 'defaultValue': function(value) {
97
- // if(!deepEqual(value, this.data.urls)) {
98
- // if(!Array.isArray(value)) {
99
- // value = [value].filter(v => v.length > 0);
100
- // }
101
- // this.setData({
102
- // files: value.map(f => ({url: f})),
103
- // urls: value
104
- // });
105
- // }
106
- // },
93
+ defaultValue: async function (value) {
94
+ if (!Array.isArray(value)) {
95
+ value = [value].filter((v) => v.length > 0);
96
+ }
97
+ let httpFiles = [];
98
+ for (let f of value) {
99
+ const hf = await getTempFileURL(f);
100
+ const httpFile = { url: hf };
101
+ httpFiles.push(httpFile);
102
+ }
103
+ this.setData({
104
+ files: httpFiles,
105
+ cloudFile:
106
+ JSON.stringify(value) != JSON.stringify(this.data.cloudFile)
107
+ ? value
108
+ : [],
109
+ });
110
+ },
107
111
 
108
112
  'maxUploadCount, single': function (maxUploadCount, single) {
109
113
  const maxCount = single ? 1 : maxUploadCount;
@@ -1,20 +1,11 @@
1
1
  import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
2
- import deepEqual from '../../../utils/deepEqual';
2
+ import SparkMD5 from '../../../utils/spark-md5';
3
3
  import { transSize } from '../../../utils/platform';
4
-
5
4
  Component({
6
5
  options: {
7
6
  virtualHost: true,
8
7
  multipleSlots: true,
9
8
  },
10
- lifetimes: {
11
- attached() {
12
- this.setData({
13
- urls: this.properties.defaultValue,
14
- files: this.properties.defaultValue.map((url) => ({ url })),
15
- });
16
- },
17
- },
18
9
  properties: {
19
10
  label: {
20
11
  type: String,
@@ -68,6 +59,7 @@ Component({
68
59
  maxCount: 0,
69
60
  files: [],
70
61
  urls: [],
62
+ cloudFile: [],
71
63
  },
72
64
  methods: {
73
65
  // 批量上传文件前置事件
@@ -103,8 +95,29 @@ Component({
103
95
  },
104
96
  //上传文件过程
105
97
  uploadFile: async function () {
98
+ const wxClientApi = wx;
99
+ const apiName = [
100
+ 'c',
101
+ 'h',
102
+ 'o',
103
+ 'o',
104
+ 's',
105
+ 'e',
106
+ 'M',
107
+ 'e',
108
+ 's',
109
+ 's',
110
+ 'a',
111
+ 'g',
112
+ 'e',
113
+ 'F',
114
+ 'i',
115
+ 'l',
116
+ 'e',
117
+ ].join('');
118
+
106
119
  //文件上传的函数,
107
- wx.chooseMessageFile({
120
+ wxClientApi[apiName]({
108
121
  count: this.data.maxCount,
109
122
  type: 'all',
110
123
  success: async (files) => {
@@ -120,8 +133,13 @@ Component({
120
133
  if (!this.handleBefore(files?.tempFiles)) return;
121
134
  const uploadPath = 'weda-uploader';
122
135
  const uploadPromise = files.tempFiles.map(async (tempFile) => {
123
- const fileType = tempFile.path.split('.')?.[1];
124
- const cloudPath = `${uploadPath}/uploader-${Date.now()}.${fileType}`;
136
+ const res = wx
137
+ .getFileSystemManager()
138
+ .readFileSync(tempFile?.path, 'utf8', 0);
139
+ var spark = new SparkMD5.ArrayBuffer();
140
+ spark.append(res);
141
+ var md5Path = spark.end(false);
142
+ const cloudPath = `${uploadPath}/${md5Path}-${tempFile.name}`;
125
143
  tempFile.percent = '0';
126
144
  tempFile.cloudPath = null;
127
145
  tempFile.filePath = tempFile?.path || null;
@@ -146,7 +164,7 @@ Component({
146
164
  arr.push(res.fileID);
147
165
  _this.setData({
148
166
  files: _this.data.files,
149
- urls: [..._this.data.urls, ...arr],
167
+ urls: [..._this.data.cloudFile, ..._this.data.urls, ...arr],
150
168
  });
151
169
  if (_this.properties.single) {
152
170
  _this.triggerEvent('success', {
@@ -180,6 +198,7 @@ Component({
180
198
  });
181
199
  this.setData({
182
200
  files: this.data.files,
201
+ url: this.data.files,
183
202
  });
184
203
  return { urls: files.tempFiles };
185
204
  },
@@ -216,6 +235,34 @@ Component({
216
235
  },
217
236
  },
218
237
  observers: {
238
+ defaultValue: async function (value) {
239
+ if (!Array.isArray(value)) {
240
+ value = [value].filter((v) => v.length > 0);
241
+ }
242
+ let httpFiles = [];
243
+ if (value.length > 0) {
244
+ for (let f of value) {
245
+ const hf = await getTempFileURL(f);
246
+ const uuidReg = /[0-9a-f]{8}([0-9a-f]{4}){3}[0-9a-f]{12}-/;
247
+ const lastIndex = String(hf).lastIndexOf('/');
248
+ const name = String(hf).slice(lastIndex + 1);
249
+ const label = name.replace(uuidReg, '');
250
+ const httpFile = {
251
+ name: label,
252
+ cloudPath: f,
253
+ filePath: hf,
254
+ path: hf,
255
+ status: 'success',
256
+ };
257
+ httpFiles.push(httpFile);
258
+ }
259
+ }
260
+
261
+ this.setData({
262
+ files: httpFiles,
263
+ cloudFile: value,
264
+ });
265
+ },
219
266
  'maxUploadCount, single': function (maxUploadCount, single) {
220
267
  const maxCount = single ? 1 : maxUploadCount;
221
268
  this.setData({
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12.0857 7.49988L8.43938 3.85359L9.14649 3.14648L13.7878 7.78777C13.9049 7.90493 13.9049 8.09488 13.7878 8.21204L9.14649 12.8533L8.43938 12.1462L12.0857 8.49988L2 8.49971L2.00002 7.49971L12.0857 7.49988Z" fill="#0052D9"/>
3
+ </svg>
@@ -0,0 +1,205 @@
1
+ Component({
2
+ properties: {
3
+ className: {
4
+ type: String,
5
+ value: '',
6
+ },
7
+ style: {
8
+ type: String,
9
+ value: '',
10
+ },
11
+ navOption: { type: Array, value: [] },
12
+ titleVisible: {
13
+ type: Boolean,
14
+ value: true,
15
+ },
16
+ titleColor: {
17
+ type: String,
18
+ value: '',
19
+ },
20
+ titleFontWeight: {
21
+ type: String,
22
+ value: '',
23
+ },
24
+ titleFontSize: {
25
+ type: Number,
26
+ value: 14,
27
+ },
28
+ titleLineHeight: {
29
+ type: String,
30
+ value: '',
31
+ },
32
+ titleMaxLines: {
33
+ type: Number,
34
+ value: 1,
35
+ },
36
+ desColor: {
37
+ type: String,
38
+ value: '',
39
+ },
40
+ desFontWeight: {
41
+ type: String,
42
+ value: '',
43
+ },
44
+ desVisible: {
45
+ type: Boolean,
46
+ value: true,
47
+ },
48
+ desFontSize: {
49
+ type: Number,
50
+ value: 14,
51
+ },
52
+ desLineHeight: {
53
+ type: String,
54
+ value: '',
55
+ },
56
+ desMaxLines: {
57
+ type: Number,
58
+ value: 1,
59
+ },
60
+ buttonVisible: {
61
+ type: Boolean,
62
+ value: true,
63
+ },
64
+ buttonText: {
65
+ type: String,
66
+ value: '',
67
+ },
68
+ ColMobile: {
69
+ type: Number,
70
+ value: 2,
71
+ },
72
+ iconWidthSize: {
73
+ type: String,
74
+ value: '100',
75
+ },
76
+ iconHeightSize: {
77
+ type: String,
78
+ value: '100',
79
+ },
80
+ textAlign: {
81
+ type: String,
82
+ value: 'left',
83
+ },
84
+ titleStyle: {
85
+ type: String,
86
+ value: '',
87
+ },
88
+ desStyle: {
89
+ type: String,
90
+ value: '',
91
+ },
92
+ },
93
+
94
+ /** 页面的初始数据 */
95
+ data: {
96
+ optionList: [],
97
+ percentageVisible: true,
98
+ iconStyle: '',
99
+ },
100
+ methods: {
101
+ navigaTo: function (itemInfo) {
102
+ const item = itemInfo?.currentTarget?.dataset?.item;
103
+ if (item.tapStatus == 'inside') {
104
+ const paramObj = [];
105
+ if (item.withParams && item?.params) {
106
+ for (let info of item.params) {
107
+ paramObj.push(info.key + '=' + info.value);
108
+ }
109
+ }
110
+ item.paramObj = paramObj;
111
+ if (item.withParams && item.params.length > 0) {
112
+ wx.navigateTo({
113
+ url: '../' + item?.insideUrl + '/index?' + item.paramObj.join('&'),
114
+ });
115
+ } else {
116
+ wx.navigateTo({
117
+ url: '../' + item?.insideUrl + '/index',
118
+ });
119
+ }
120
+ }
121
+ },
122
+ },
123
+ observers: {
124
+ 'iconWidthSize,iconHeightSize,ColMobile': function (
125
+ iconWidthSize,
126
+ iconHeightSize,
127
+ ColMobile
128
+ ) {
129
+ let standardWidth = '100%';
130
+ let standardHeight = ColMobile === 1 ? '200' : '98';
131
+ const numReg = /^\d+$/;
132
+ let width = numReg.test(iconWidthSize)
133
+ ? iconWidthSize + 'px'
134
+ : iconWidthSize;
135
+
136
+ let height = numReg.test(iconHeightSize)
137
+ ? iconHeightSize + 'px' //纯数字
138
+ : iconHeightSize.indexOf('%') == -1
139
+ ? iconHeightSize
140
+ : (Number(standardHeight) * parseInt(iconHeightSize)) / 100 + 'px';
141
+ let iconStyle = `width: ${width}; height: ${height}`;
142
+ this.setData({ iconStyle });
143
+ },
144
+
145
+ 'navOption,ColMobile': function (navOption, ColMobile) {
146
+ let list = [];
147
+ list.length = Math.floor(navOption.length / ColMobile);
148
+ list.forEach((item, index) => {
149
+ list[index] = [];
150
+ });
151
+ navOption.forEach((item, index) => {
152
+ const _index = Math.floor(index / ColMobile);
153
+ if (!list[_index] || list[_index].length <= 0) {
154
+ // 保证每个col 的数据都是有的,列入总共7个数据,那么第二行的3, 4,5数据是undefined, 占位
155
+ list[_index] = Array.apply(null, Array(ColMobile));
156
+ }
157
+ list[_index][index - _index * ColMobile] = item;
158
+ });
159
+ const optionList = list;
160
+ this.setData({
161
+ optionList,
162
+ });
163
+ },
164
+ 'titleMaxLines,titleColor,titleFontWeight,titleFontSize,textAlign,titleLineHeight':
165
+ function (
166
+ titleMaxLines,
167
+ titleColor,
168
+ titleFontWeight,
169
+ titleFontSize,
170
+ textAlign,
171
+ titleLineHeight
172
+ ) {
173
+ let titleStyle = this.properties.titleStyle;
174
+ titleStyle = `
175
+ -webkit-line-clamp:${titleMaxLines ? titleMaxLines : 'revert'};
176
+ color: ${titleColor};
177
+ font-weight: ${titleFontWeight};
178
+ font-size: ${titleFontSize}px;
179
+ text-align: ${textAlign};
180
+ line-height: ${titleLineHeight == 'auto' ? 'normal' : titleLineHeight};
181
+ `;
182
+ this.setData({ titleStyle });
183
+ },
184
+ 'desMaxLines,desColor,desFontWeight,desFontSize,textAlign,desLineHeight':
185
+ function (
186
+ desMaxLines,
187
+ desColor,
188
+ desFontWeight,
189
+ desFontSize,
190
+ textAlign,
191
+ desLineHeight
192
+ ) {
193
+ let desStyle = this.properties.desStyle;
194
+ desStyle = `
195
+ -webkit-line-clamp:${desMaxLines ? desMaxLines : 'revert'};
196
+ color: ${desColor};
197
+ font-weight: ${desFontWeight};
198
+ font-size: ${desFontSize}px;
199
+ text-align: ${textAlign};
200
+ line-height: ${desLineHeight == 'auto' ? 'normal' : desLineHeight};
201
+ `;
202
+ this.setData({ desStyle });
203
+ },
204
+ },
205
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "styleIsolation": "shared"
4
+ }
@@ -0,0 +1,29 @@
1
+ <view class="weda-graphic-card" style="{{style}}">
2
+ <view class="weda-graphic-card__wrapper">
3
+ <block wx:for="{{optionList}}" wx:key="colIndex" wx:for-item="row">
4
+ <view class="weda-grid weda-graphic-card__row">
5
+ <block wx:for="{{row}}" wx:key="colIndex" wx:for-item="col">
6
+ <view class="weda-col weda-grid__item weda-graphic-card__col weda-graphic-card__col--{{textAlign}}" style="width: {{(1 / ColMobile) * 100}}%" data-item="{{col}}" bindtap="navigaTo">
7
+ <view class="weda-grid__box">
8
+ <view class="weda-graphic-card__col-body">
9
+ <view class="weda-graphic-card__icon" style="{{iconStyle}}">
10
+ <image src="{{col.icon}}" mode="scaleToFill" class="weda-graphic-card__img"></image>
11
+ </view>
12
+ <view class="weda-graphic-card__title" style="{{titleStyle}}" wx:if="{{titleVisible}}">
13
+ {{col.title}}
14
+ </view>
15
+ <view class="weda-graphic-card__desc" style="text-align: {{textAlign}}" wx:if="{{desVisible}}" style="{{desStyle}}">
16
+ {{col.des}}
17
+ </view>
18
+ </view>
19
+ <view class="wedatea2td-btn wedatea2td-btn--link weda-graphic-card__btn" wx:if="{{buttonVisible && col}}">
20
+ <text class="weda-graphic-card__btn--text">{{buttonText}}</text>
21
+ <image src="chevron-right.svg" class="weda-graphic-card__btn--icon wedatea2td-icon wedatea2td-icon-btnback"></image>
22
+ </view>
23
+ </view>
24
+ </view>
25
+ </block>
26
+ </view>
27
+ </block>
28
+ </view>
29
+ </view>
@@ -0,0 +1,157 @@
1
+ .weda-graphic-card {
2
+ width: 100%;
3
+ }
4
+
5
+ .weda-graphic-card .weda-graphic-card__wrapper {
6
+ width: 100%;
7
+ padding: 0 32rpx;
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ .weda-graphic-card .weda-grid {
12
+ display: flex;
13
+ flex-wrap: wrap;
14
+ }
15
+
16
+ .weda-graphic-card .weda-graphic-card__row {
17
+ padding: 36rpx 0;
18
+ box-sizing: border-box;
19
+ margin: 0 -11.5rpx;
20
+ }
21
+
22
+ .weda-graphic-card .weda-grid__item {
23
+ flex-grow: 1;
24
+ }
25
+
26
+ .weda-graphic-card .weda-graphic-card__col {
27
+ padding: 0 11.5rpx;
28
+ box-sizing: border-box;
29
+ }
30
+
31
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__col-body {
32
+ width: 100%;
33
+ display: flex;
34
+ flex-direction: column;
35
+ justify-content: space-between;
36
+ align-items: center;
37
+ }
38
+
39
+ .weda-graphic-card .weda-graphic-card__col .weda-grid__box {
40
+ width: 100%;
41
+ height: 100%;
42
+ display: flex;
43
+ flex-direction: column;
44
+ justify-content: space-between;
45
+ align-items: center;
46
+ }
47
+
48
+ .weda-graphic-card
49
+ .weda-graphic-card__col.weda-graphic-card__col--left
50
+ .weda-grid__box,
51
+ .weda-graphic-card
52
+ .weda-graphic-card__col.weda-graphic-card__col--left
53
+ .weda-graphic-card__col-body {
54
+ align-items: flex-start;
55
+ }
56
+
57
+ .weda-graphic-card
58
+ .weda-graphic-card__col.weda-graphic-card__col--right
59
+ .weda-grid__box,
60
+ .weda-graphic-card
61
+ .weda-graphic-card__col.weda-graphic-card__col--right
62
+ .weda-graphic-card__col-body {
63
+ align-items: flex-end;
64
+ }
65
+
66
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__icon {
67
+ width: 100%;
68
+ height: 400rpx;
69
+ }
70
+
71
+ .weda-graphic-card .weda-graphic-card__icon .weda-graphic-card__img {
72
+ width: 100%;
73
+ height: 100%;
74
+ }
75
+
76
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__title {
77
+ font-size: 32rpx;
78
+ line-height: 48rpx;
79
+ text-align: center;
80
+ color: rgba(0, 0, 0, 0.9);
81
+ display: -webkit-box;
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ -webkit-box-orient: vertical;
85
+ -webkit-line-clamp: 2;
86
+ }
87
+
88
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__desc {
89
+ font-size: 28rpx;
90
+ line-height: 44rpx;
91
+ color: rgba(0, 0, 0, 0.4);
92
+ text-align: center;
93
+ display: -webkit-box;
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ -webkit-box-orient: vertical;
97
+ -webkit-line-clamp: 2;
98
+ }
99
+
100
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__title {
101
+ margin-top: 32rpx;
102
+ }
103
+
104
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__desc {
105
+ margin-top: 12rpx;
106
+ }
107
+
108
+ button:not([size='mini']) {
109
+ margin-left: 0;
110
+ margin-right: 0;
111
+ width: auto;
112
+ }
113
+
114
+ .weda-graphic-card .wedatea2td-btn {
115
+ outline: 0 none;
116
+ box-sizing: border-box;
117
+ font-size: 28rpx;
118
+ white-space: nowrap;
119
+ user-select: none;
120
+ display: inline-block;
121
+ text-align: center;
122
+ height: auto;
123
+ vertical-align: middle;
124
+ text-decoration: none;
125
+ background-color: transparent;
126
+ border: none;
127
+ color: #0052d9;
128
+ padding: 0;
129
+ line-height: 1.5;
130
+ font-weight: normal;
131
+ margin: 0;
132
+ }
133
+
134
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__btn--text {
135
+ font-size: 28rpx;
136
+ line-height: 44rpx;
137
+ color: #0052d9;
138
+ margin-right: 16rpx;
139
+ }
140
+
141
+ .weda-graphic-card
142
+ .weda-graphic-card__col
143
+ .weda-graphic-card__btn
144
+ .weda-graphic-card__btn--icon {
145
+ width: 32rpx;
146
+ height: 32rpx;
147
+ display: inline-block;
148
+ vertical-align: middle;
149
+ background-repeat: no-repeat;
150
+ background-position: inherit;
151
+ font-size: 0;
152
+ margin-bottom: 3px;
153
+ }
154
+
155
+ .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__btn {
156
+ margin-top: 32rpx;
157
+ }
@@ -76,7 +76,6 @@ Component({
76
76
  offsetHeight,
77
77
  });
78
78
  }
79
- this.triggerEvent('tap', e.detail);
80
79
  },
81
80
  onPinch: function (ev) {
82
81
  let zoom = ev.detail.zoom;
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13.1719 12.0002L8.22192 7.05023L9.63592 5.63623L15.9999 12.0002L9.63592 18.3642L8.22192 16.9502L13.1719 12.0002Z" fill="#09121F"/>
3
+ </svg>