@cloudbase/weda-ui-mp 3.14.2 → 3.15.0

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 (48) hide show
  1. package/components/chart/bar/index.js +4 -20
  2. package/components/chart/bar/index.wxml +1 -1
  3. package/components/chart/common/data-transform.js +6 -16
  4. package/components/chart/ec-canvas/ec-canvas.js +35 -37
  5. package/components/chart/ec-canvas/ec-canvas.wxml +1 -1
  6. package/components/chart/line/index.js +4 -20
  7. package/components/chart/line/index.wxml +1 -1
  8. package/components/chart/pie/index.js +4 -20
  9. package/components/chart/pie/index.wxml +1 -1
  10. package/components/form/form/wd-form.wxss +15 -0
  11. package/components/form/select/dropdown-select/index.js +41 -58
  12. package/components/form/select/dropdown-select/index.wxml +1 -1
  13. package/components/form/select/dropdown-select/index.wxss +1 -2
  14. package/components/form/select/index.js +1 -1
  15. package/components/form/selectMultiple/dropdown-select/index.js +10 -20
  16. package/components/form/selectMultiple/dropdown-select/index.wxss +2 -6
  17. package/components/form/selectMultiple/index.js +94 -45
  18. package/components/form/uploader/index.js +7 -15
  19. package/components/form/uploaderFile/index.js +3 -2
  20. package/components/formdetail/index.js +9 -28
  21. package/components/listView/index.js +1 -1
  22. package/components/listView/index.wxml +5 -5
  23. package/components/listView/index.wxss +20 -67
  24. package/components/qrcode/index.js +3 -4
  25. package/components/wd-form/index.js +72 -163
  26. package/components/wd-form/wd-form.wxss +15 -0
  27. package/components/wd-form-item/wd-form-item.wxss +15 -0
  28. package/components/wd-form-item-obj/wd-form-item.wxss +15 -0
  29. package/components/wd-input/inner-input/index.js +22 -56
  30. package/components/wd-input/inner-input/index.wxml +6 -2
  31. package/components/wd-input/inner-input/wd-input.wxss +15 -0
  32. package/components/wd-progress/wd-progress.wxss +15 -0
  33. package/components/wd-rating/wd-rating.wxss +15 -0
  34. package/components/wd-select/index.js +14 -10
  35. package/components/wd-select/index.json +1 -1
  36. package/components/wd-select/index.wxml +3 -0
  37. package/components/wd-select/select/formats-util.js +9 -0
  38. package/components/wd-select/select/index.js +545 -0
  39. package/components/wd-select/select/index.json +8 -0
  40. package/components/wd-select/select/index.wxml +26 -0
  41. package/components/wd-select/select/index.wxss +5 -0
  42. package/components/wd-select-multiple/index.js +13 -5
  43. package/components/wd-select-multiple/index.wxml +3 -0
  44. package/components/wd-switch/wd-switch.wxss +15 -0
  45. package/components/wd-tag-select/wd-tag-select.wxss +15 -0
  46. package/package.json +1 -1
  47. package/utils/getModelParams.js +27 -1
  48. package/utils/tcb.js +11 -2
@@ -45,6 +45,7 @@
45
45
  padding: 5px 16px;
46
46
  overflow: auto;
47
47
  flex: 1 1 0px;
48
+ box-sizing: border-box;
48
49
  }
49
50
 
50
51
  .weda-ui-custom-picker__header-btn {
@@ -81,10 +82,6 @@
81
82
  /* height: 199px; */
82
83
  }
83
84
 
84
- .weda-ui-custom-picker__cloumn::-webkit-scrollbar {
85
- display: none;
86
- }
87
-
88
85
  .weda-ui-custom-picker__cloumn-item {
89
86
  display: flex;
90
87
  align-items: center;
@@ -292,8 +289,7 @@
292
289
  transform: translateX(0);
293
290
  }
294
291
 
295
- .weda-ui-custom-search.is-focused
296
- .weda-ui-custom-search-box__search-placeholder {
292
+ .weda-ui-custom-search.is-focused .weda-ui-custom-search-box__search-placeholder {
297
293
  display: none;
298
294
  }
299
295
 
@@ -4,7 +4,8 @@ import { callDataSourceApi } from '../../../utils/tcb';
4
4
  import { arrayToMap } from '../../../utils/tool';
5
5
  import lodashGet from 'lodash.get';
6
6
  import deepEqual from '../../../utils/deepEqual';
7
- import { getWhereList } from '../../../utils/platform';
7
+ import destr from '../../../utils/destr';
8
+ import { getDefaultQuery } from '../../../utils/getModelParams';
8
9
 
9
10
  // 判断值为空,展示placeholder
10
11
  export const isEmpty = (v) => {
@@ -118,6 +119,7 @@ Component({
118
119
  preWhere: [], // 对比 where 监听
119
120
  whereEffected: [], // 每次请求都加上
120
121
  fetchTimed: null, // 防抖
122
+ queryParam: { select: { $master: true } },
121
123
  },
122
124
  lifetimes: {
123
125
  attached() {
@@ -142,8 +144,6 @@ Component({
142
144
  this.setData({
143
145
  option: range,
144
146
  loadStatus: range.length > 0 ? 0 : -1,
145
- });
146
- this.setData({
147
147
  value: this.properties.defaultValue,
148
148
  cls,
149
149
  subCls,
@@ -198,10 +198,17 @@ Component({
198
198
  option: function (options) {
199
199
  this.triggerEvent('changeOptions', { value: { options } });
200
200
  },
201
- where: function (where) {
202
- if (deepEqual(where, this.data.preWhere)) return;
203
- const whereEffected = [].concat(getWhereList(where));
204
- this.setData({ preWhere: where, whereEffected }, () => {
201
+ 'where,queryCondition,sorter': function (where, queryCondition, sorter) {
202
+ const _queryParam = getDefaultQuery({
203
+ supportManyRelated: this.data.supportManyRelated,
204
+ queryCondition,
205
+ where,
206
+ sorter,
207
+ });
208
+ if (deepEqual(_queryParam, this.data.queryParam)) {
209
+ return;
210
+ }
211
+ this.setData({ queryParam: _queryParam }, () => {
205
212
  this._initFetchData();
206
213
  });
207
214
  },
@@ -247,30 +254,42 @@ Component({
247
254
  this.triggerEvent('change', e.detail);
248
255
  },
249
256
  // 初始化搜索数据,包括属性变化/搜索值变化
250
- _initFetchData: function (_where = []) {
257
+ _initFetchData: function (searchValue) {
251
258
  clearTimeout(this.data.fetchTimed);
252
259
  // eslint-disable-next-line rulesdir/no-timer
253
260
  this.data.fetchTimed = setTimeout(() => {
254
261
  const { format, dataSourceName, primaryField } = this.properties;
255
262
  if (['many-many', 'one-many'].concat(format) && dataSourceName && primaryField) {
256
263
  this.setData({ records: [], option: [], pageNo: 1 });
257
- this._fetchData(1, _where, true);
264
+ this._fetchData({ searchValue, _init: true });
258
265
  }
259
266
  }, 300);
260
267
  },
261
268
  // 获取数据列表:一对多,多对多
262
- _fetchData: async function (_pageNo, _where = [], _init = false) {
269
+
270
+ _fetchData: async function ({ queryParam = this.data.queryParam, searchValue = '', pageNo = 1, _init = false }) {
263
271
  const { dataSourceName, primaryField } = this.properties;
264
272
  if (!dataSourceName) return;
265
-
273
+ // 默认筛选条件
274
+ let _filter = destr(this.data.queryParam.filter) ?? {};
275
+ // 根据搜索值查询
276
+ if (searchValue) {
277
+ const search = this.data.ignoreCase ? '$search_ci' : '$search';
278
+ _filter = {
279
+ where: {
280
+ $and: [_filter.where, { $and: [{ [this.data.primaryField]: { [`${search}`]: searchValue } }] }],
281
+ },
282
+ };
283
+ }
266
284
  const records = _init ? [] : this.data.records;
267
- const pageSize = 200;
285
+ const pageSize = 50;
268
286
  const res = await callDataSourceApi({
269
287
  dataSourceName: dataSourceName,
270
- methodName: 'wedaGetRecords',
288
+ methodName: 'wedaGetRecordsV2',
271
289
  params: {
272
- where: [{ $and: [...this.data.whereEffected, ..._where] }],
273
- _pageNo,
290
+ ...queryParam,
291
+ filter: _filter,
292
+ pageNumber: pageNo,
274
293
  pageSize,
275
294
  },
276
295
  });
@@ -280,44 +299,41 @@ Component({
280
299
  label: item[primaryField],
281
300
  value: item._id,
282
301
  }));
283
- if (this.data.records.length === 0 && results?.length === 0) {
284
- // 当异常的时候,主要为了不引起records的observer变化变化设置默认值
285
- this.setData({
286
- loadStatus: -1,
287
- });
288
- } else {
289
- this.setData({
290
- records: records.concat(results || []),
291
- loadStatus: status,
292
- });
293
- }
294
- const finalRecords = records.concat(results || []);
295
302
 
296
- if (finalRecords && finalRecords.length > 0) {
297
- const { value } = this.data;
298
- const label = this.getLabels(value, finalRecords);
299
- const stringRange = this.getChecks(value, finalRecords);
300
- // 默认
301
- this.setData({
302
- option: stringRange,
303
- loadStatus: results.length > 0 ? 0 : -1,
304
- displayLabel: label,
303
+ let finalRecords = records.concat(results || []);
304
+ finalRecords = this.getUniqueOption(finalRecords);
305
+ const { value } = this.data;
306
+
307
+ const unchecked = value.filter((i) => !finalRecords.find((j) => i === j.value));
308
+ // 跨页勾选回显示
309
+ if (unchecked.length) {
310
+ const uncheckedItem = await this.fetchItem(unchecked);
311
+ uncheckedItem?.forEach((i) => {
312
+ if (i) {
313
+ finalRecords.unshift(i);
314
+ }
305
315
  });
306
- return;
307
316
  }
317
+ const label = this.getLabels(value, finalRecords);
318
+ const stringRange = this.getChecks(value, finalRecords);
308
319
  let status = 0;
309
320
  if (!results) {
310
321
  status = 2;
311
- } else if (results.length === 0) {
322
+ } else if (finalRecords.length === 0) {
312
323
  status = 3;
313
- } else {
314
- status = results.length === 200 ? 1 : 0;
315
324
  }
325
+
326
+ // 默认
327
+ this.setData({
328
+ option: stringRange,
329
+ displayLabel: label,
330
+ records: finalRecords,
331
+ loadStatus: status,
332
+ });
316
333
  },
317
334
  _childFetchData: function (e) {
318
335
  const { pageNo, searchValue } = e.detail;
319
- const _where = searchValue ? [{ [this.properties.primaryField]: { $search: searchValue } }] : [];
320
- this._fetchData(pageNo, _where);
336
+ this._fetchData({ pageNo, searchValue });
321
337
  },
322
338
  getLabels: function (values, options) {
323
339
  let labels = values;
@@ -341,6 +357,41 @@ Component({
341
357
  });
342
358
  return stringRange;
343
359
  },
360
+ fetchItem: async function (values) {
361
+ const { queryParam, dataSourceName, primaryField } = this.data;
362
+ const _filter = {
363
+ where: {
364
+ $and: [{ $or: values.map((i) => ({ _id: { $search: i } })) }],
365
+ },
366
+ };
367
+ let data = await callDataSourceApi({
368
+ dataSourceName: dataSourceName,
369
+ methodName: 'wedaGetRecordsV2',
370
+ params: {
371
+ ...queryParam,
372
+ filter: _filter,
373
+ pageNumber: 1,
374
+ pageSize: 200,
375
+ },
376
+ });
377
+ return (
378
+ data?.records?.map((item) => ({
379
+ ...item,
380
+ label: item[primaryField],
381
+ value: item._id,
382
+ })) || []
383
+ );
384
+ },
385
+ getUniqueOption: function (option) {
386
+ const optionMap = option.reduce((acc, item) => {
387
+ if (!acc[item.value]) {
388
+ acc[item.value] = item;
389
+ }
390
+ return acc;
391
+ }, {});
392
+ const uniqueOption = Object.values(optionMap)?.filter((item) => item?.value);
393
+ return uniqueOption;
394
+ },
344
395
  onSearch(event) {
345
396
  const { noEvent, value: searchValue } = event.detail;
346
397
 
@@ -348,10 +399,8 @@ Component({
348
399
  if (!noEvent) {
349
400
  this.triggerEvent('search', { value: searchValue });
350
401
  }
351
-
352
402
  // 接口搜索
353
- const _where = searchValue ? [{ [this.properties.primaryField]: { $search: searchValue } }] : [];
354
- this._initFetchData(_where);
403
+ this._initFetchData(searchValue);
355
404
  },
356
405
  },
357
406
  });
@@ -1,4 +1,4 @@
1
- import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
1
+ import { getCloudInstance, getTempFileURL, getDefaultUploadPath } from '../../../utils/tcb';
2
2
  import { randomStr } from '../../../utils/platform';
3
3
  import { compressImage } from './compress';
4
4
  import { isNil } from '../../../utils/lodash';
@@ -128,22 +128,14 @@ Component({
128
128
  try {
129
129
  const ret = await callbacks.beforeUpload({
130
130
  tempFilePaths: tempFilePaths,
131
- base64Uri: files.contents.map(
132
- (content) =>
133
- `data:image/jpg;base64,${wx.arrayBufferToBase64(content)}`
134
- ),
131
+ base64Uri: files.contents.map((content) => `data:image/jpg;base64,${wx.arrayBufferToBase64(content)}`),
135
132
  });
136
133
  if (typeof ret === 'boolean') {
137
134
  shouldUploadToCos = ret;
138
- } else if (
139
- Array.isArray(ret) &&
140
- ret.every((item) => typeof item === 'string')
141
- ) {
135
+ } else if (Array.isArray(ret) && ret.every((item) => typeof item === 'string')) {
142
136
  tempFilePaths = ret;
143
137
  } else if (!isNil(ret)) {
144
- throw new TypeError(
145
- '小程序端返回值接受布尔值 / 小程序文件临时路径数组'
146
- );
138
+ throw new TypeError('小程序端返回值接受布尔值 / 小程序文件临时路径数组');
147
139
  }
148
140
  } catch (err) {
149
141
  console.error('上传前处理函数抛错', err);
@@ -156,7 +148,8 @@ Component({
156
148
  const tcb = await getCloudInstance();
157
149
  const uploadPromise = tempFilePaths.map(async (tempFilePath) => {
158
150
  const fileType = tempFilePath.split('.')[1];
159
- const cloudPath = `${uploadPath}/${randomStr()}-${Date.now()}.${fileType}`;
151
+ const _uploadPath = await getDefaultUploadPath(uploadPath);
152
+ const cloudPath = `${_uploadPath}/${randomStr()}-${Date.now()}.${fileType}`;
160
153
  let filePath = tempFilePath;
161
154
  if (this.data.isCompressBeforeUpload) {
162
155
  try {
@@ -274,8 +267,7 @@ Component({
274
267
  },
275
268
  layout: function (layout) {
276
269
  const _layout = layout !== 'vertical' ? 'horizontal' : 'vertical';
277
- const layoutCls =
278
- _layout === 'horizontal' ? 'weda-formcells weui-flex' : '';
270
+ const layoutCls = _layout === 'horizontal' ? 'weda-formcells weui-flex' : '';
279
271
  this.setData({ _layout, layoutCls });
280
272
  },
281
273
  sourceType: function (sourceType) {
@@ -1,4 +1,4 @@
1
- import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
1
+ import { getCloudInstance, getTempFileURL, getDefaultUploadPath } from '../../../utils/tcb';
2
2
  import { transSize, randomStr } from '../../../utils/platform';
3
3
  import equal from '../../../utils/deepEqual';
4
4
 
@@ -250,7 +250,8 @@ Component({
250
250
  ..._tempFile,
251
251
  };
252
252
  const uploadPath = 'weda-uploader';
253
- const cloudPath = `${uploadPath}/${randomStr()}-${tempFile.name}`;
253
+ const _uploadPath = await getDefaultUploadPath(uploadPath);
254
+ const cloudPath = `${_uploadPath}/${randomStr()}-${tempFile.name}`;
254
255
  try {
255
256
  const tcb = await getCloudInstance();
256
257
  const uploadTask = await tcb.uploadFile({
@@ -71,9 +71,7 @@ Component({
71
71
  this.updateWidgetAPI();
72
72
  },
73
73
  layout: function (layout) {
74
- const _layout =
75
- WD_INPUT_LAYOUT.find((item) => item.value === layout)?.value ||
76
- 'vertical';
74
+ const _layout = WD_INPUT_LAYOUT.find((item) => item.value === layout)?.value || 'vertical';
77
75
  this.setData({ _layout });
78
76
  },
79
77
  },
@@ -115,7 +113,7 @@ Component({
115
113
  item._id = randomStr();
116
114
  return item;
117
115
  });
118
- console.log('formdetail', value, initialValues);
116
+ // console.log('formdetail', value, initialValues);
119
117
  this.setData({ contextData: initialValues });
120
118
  this.triggerEvent('onDataChange', {
121
119
  data: initialValues,
@@ -127,9 +125,7 @@ Component({
127
125
  const item = { ...i };
128
126
  Object.keys(i).forEach((j) => {
129
127
  if (item[j]?.name) {
130
- item[j].name = isPureArray
131
- ? `${name}[${index}]`
132
- : `${name}[${index}].${j}`;
128
+ item[j].name = isPureArray ? `${name}[${index}]` : `${name}[${index}].${j}`;
133
129
  }
134
130
  });
135
131
  item.index = index;
@@ -148,11 +144,7 @@ Component({
148
144
  return mock;
149
145
  },
150
146
  onChange(type, params) {
151
- if (
152
- this.data.disabled ||
153
- this.data.readOnly ||
154
- !this.data.fieldAuth.includes('w')
155
- ) {
147
+ if (this.data.disabled || this.data.readOnly || !this.data.fieldAuth.includes('w')) {
156
148
  return;
157
149
  }
158
150
  const { contextData } = this.data;
@@ -224,9 +216,7 @@ Component({
224
216
  },
225
217
  // 获取父表单容器
226
218
  getParentForm() {
227
- const parent = this?.$widget?.closest(
228
- (w) => w.getConfig?.().componentType === 'form'
229
- );
219
+ const parent = this?.$widget?.closest((w) => w.getConfig?.().componentType === 'form');
230
220
  return parent;
231
221
  },
232
222
  updateWidgetAPI(apis = {}) {
@@ -257,21 +247,12 @@ Component({
257
247
  let fieldSchema = null;
258
248
  if ('model' === parent?.datasourceType) {
259
249
  fieldSchema = parent?.dataSourceProfile?.schema?.properties?.[name];
260
- } else if (
261
- ['connector', 'custom-connector'].includes(parent?.datasourceType)
262
- ) {
263
- const method =
264
- parent?.methodCreate ||
265
- parent?.methodUpdate ||
266
- parent?.methodGetItem;
267
- const inParams = parent?.dataSourceProfile?.methods?.find(
268
- (i) => i.name === method
269
- )?.inParams;
250
+ } else if (['connector', 'custom-connector'].includes(parent?.datasourceType)) {
251
+ const method = parent?.methodCreate || parent?.methodUpdate || parent?.methodGetItem;
252
+ const inParams = parent?.dataSourceProfile?.methods?.find((i) => i.name === method)?.inParams;
270
253
  fieldSchema = inParams?.properties?.[name];
271
254
  }
272
- childFormItem = fieldSchema?.items?.properties
273
- ? Object.keys(fieldSchema?.items?.properties)
274
- : [];
255
+ childFormItem = fieldSchema?.items?.properties ? Object.keys(fieldSchema?.items?.properties) : [];
275
256
 
276
257
  // 兼容旧的子表单,form上取不到schema信息,取value值兜底
277
258
  if (!childFormItem?.length) {
@@ -605,7 +605,7 @@ Component({
605
605
  },
606
606
  'dataSourceType,dataSourceData,total,enableTotal': function () {
607
607
  if (this.properties.dataSourceType === 'expression') {
608
- console.log('====dataSourceData====', this.data.dataSourceData);
608
+ // console.log('====dataSourceData====', this.data.dataSourceData);
609
609
  this.setExpression();
610
610
  }
611
611
  },
@@ -1,4 +1,4 @@
1
- <view scroll-y scroll-with-animation style="{{style}}" class="weda-list-view__container weda-ui {{'weda-list-view__container-' + status}} {{className}}">
1
+ <view scroll-y scroll-with-animation style="{{style}}" class="weda-list-view__container weda-ui wd-list-view wd-mp-list-view {{'weda-list-view__container-' + status}} {{className}}">
2
2
  <!-- 列表插槽 -->
3
3
  <view class="{{template === 'cardList' ? 'weda-list-view-card' : ''}} {{ (status === 'fail' && isSetStatusFinal) ? 'weda-list-view__content-blank' : ''}} {{'weda-list-view__content-' + pagination}} {{records.length > 0 ? '' : 'weda-list-view__content-init'}} weda-list-view__content">
4
4
  <block wx:if="{{status === 'fail' && refType==='dataView'}}">
@@ -19,7 +19,7 @@
19
19
  <view class="weda-list-view__empty wd-status-content" wx:if="{{status === 'empty' && emptyText}}">
20
20
  <view class="weda-list-view__empty__content wd-status-content__content">
21
21
  <view class="weda-list-view__empty__content__image wd-status-content__status-icon empty"></view>
22
- <text class="title"> {{emptyText}} </text>
22
+ <text class="title wd-status-content__text"> {{emptyText}} </text>
23
23
  </view>
24
24
  </view>
25
25
  <view class="weda-list-view__error wd-status-content" wx:if="{{status === 'fail' && isSetStatusFinal}}">
@@ -39,10 +39,10 @@
39
39
  </block>
40
40
  <block wx:else>
41
41
  <block wx:if="{{pageSize * pageNo < listTotal}}">
42
- <view class="weda-list-view__more-text" bindtap="handleNext">{{loadButtonTextFinal}}</view>
42
+ <view class="weda-list-view__more-text wd-list-view__more-text" bindtap="handleNext">{{loadButtonTextFinal}}</view>
43
43
  </block>
44
44
  <block wx:else>
45
- <view wx:if="{{!!loadCompletedText && status === 'success'}}" class="weda-list-view__load-completed">{{loadCompletedText}}</view>
45
+ <view wx:if="{{!!loadCompletedText && status === 'success'}}" class="weda-list-view__load-completed wd-list-view__load-completed">{{loadCompletedText}}</view>
46
46
  </block>
47
47
  </block>
48
48
  </block>
@@ -54,7 +54,7 @@
54
54
  <view class="weda-list-view__symbol-item"></view>
55
55
  <view class="weda-list-view__symbol-item"></view>
56
56
  </view>
57
- <view wx:if="{{!!loadCompletedText && status === 'success' && pageSize * pageNo >= listTotal}}" class="weda-list-view__load-completed">{{loadCompletedText}}</view>
57
+ <view wx:if="{{!!loadCompletedText && status === 'success' && pageSize * pageNo >= listTotal}}" class="weda-list-view__load-completed wd-list-view__load-completed">{{loadCompletedText}}</view>
58
58
  </view>
59
59
  </block>
60
60
  <!-- 分页器 -->
@@ -29,8 +29,7 @@
29
29
  }
30
30
 
31
31
  /* 加载中-给触底加载最小高度 */
32
- .weda-list-view__container.weda-list-view__container-loading
33
- .weda-list-view__more-bottomLoad {
32
+ .weda-list-view__container.weda-list-view__container-loading .weda-list-view__more-bottomLoad {
34
33
  min-height: 35px;
35
34
  }
36
35
 
@@ -41,8 +40,7 @@
41
40
  }
42
41
 
43
42
  /* 列表内容加载中 */
44
- .weda-list-view__container
45
- .weda-list-view__more.weda-list-view__pagination-loading {
43
+ .weda-list-view__container .weda-list-view__more.weda-list-view__pagination-loading {
46
44
  background: transparent;
47
45
  position: absolute;
48
46
  top: 0;
@@ -54,9 +52,7 @@
54
52
  justify-content: center;
55
53
  }
56
54
 
57
- .weda-list-view__container
58
- .weda-list-view__more.weda-list-view__pagination-loading
59
- .weda-list-view__more-symbol {
55
+ .weda-list-view__container .weda-list-view__more.weda-list-view__pagination-loading .weda-list-view__more-symbol {
60
56
  padding: 0;
61
57
  }
62
58
 
@@ -65,9 +61,7 @@
65
61
  width: 100%;
66
62
  padding: 16px;
67
63
  }
68
- .weda-list-view__container
69
- .weda-list-view__empty
70
- .weda-list-view__empty__content {
64
+ .weda-list-view__container .weda-list-view__empty .weda-list-view__empty__content {
71
65
  color: rgba(0, 0, 0, 0.9);
72
66
  width: 100%;
73
67
  height: 200px;
@@ -91,40 +85,27 @@
91
85
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDQ4IDQ4IiBmaWxsPSJub25lIj4KPHJlY3QgeD0iNiIgeT0iMTQiIHdpZHRoPSIzNiIgaGVpZ2h0PSIyNiIgZmlsbD0iI0RDRENEQyIvPgo8cGF0aCBkPSJNMjQgMjEuNUMyMi4xMDI2IDIxLjUgMjAuNSAyMi45NDc5IDIwLjUgMjQuOEgyMS41QzIxLjUgMjMuNTY0MSAyMi41ODg4IDIyLjUgMjQgMjIuNUMyNS40MTEyIDIyLjUgMjYuNSAyMy41NjQxIDI2LjUgMjQuOEMyNi41IDI1LjY4NDEgMjUuNzI1MyAyNi41NTA4IDI0LjczOTkgMjYuOTI0NUwyNC43Mzc0IDI2LjkyNTRDMjQuMDI0NSAyNy4yIDIzLjUgMjcuODY4NSAyMy41IDI4LjY4VjMwSDI0LjVWMjguNjhDMjQuNSAyOC4zMjM4IDI0LjcyOTMgMjguMDAwNiAyNS4wOTU4IDI3Ljg1OUMyNi4zMDQyIDI3LjQwMDMgMjcuNSAyNi4yNTE0IDI3LjUgMjQuOEMyNy41IDIyLjk0NzkgMjUuODk3NCAyMS41IDI0IDIxLjVaIiBmaWxsPSJibGFjayIgZmlsbC1vcGFjaXR5PSIwLjkiLz4KPHBhdGggZD0iTTI0IDMxQzIzLjU4NTggMzEgMjMuMjUgMzEuMzM1OCAyMy4yNSAzMS43NUMyMy4yNSAzMi4xNjQyIDIzLjU4NTggMzIuNSAyNCAzMi41QzI0LjQxNDIg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gNDQuODIgNDUuMjAxIDQ0LjU4MDVDNDUuNDQyNCA0NC4zNDI4IDQ1LjUyMzQgNDQuMTM0NiA0NS41MjM0IDQzLjk2MzZaIiBmaWxsPSJibGFjayIgZmlsbC1vcGFjaXR5PSIwLjkiLz4KPC9zdmc+');
92
86
  }
93
87
 
94
- .weda-list-view__container
95
- .weda-list-view__empty
96
- .weda-list-view__empty__content
97
- .title {
88
+ .weda-list-view__container .weda-list-view__empty .weda-list-view__empty__content .title {
98
89
  padding: 10px 0 5px 0;
99
90
  font-weight: 400;
100
- color: rgba(0, 0, 0, 0.9);
101
91
  font-size: 16px;
102
92
  }
103
93
 
104
- .weda-list-view__container
105
- .weda-list-view__empty
106
- .weda-list-view__empty__content
107
- .code {
94
+ .weda-list-view__container .weda-list-view__empty .weda-list-view__empty__content .code {
108
95
  color: rgba(0, 0, 0, 0.4);
109
96
  font-size: 14px;
110
97
  font-weight: 400;
111
98
  margin-bottom: 5px;
112
99
  }
113
100
 
114
- .weda-list-view__container
115
- .weda-list-view__empty
116
- .weda-list-view__empty__content
117
- .detail {
101
+ .weda-list-view__container .weda-list-view__empty .weda-list-view__empty__content .detail {
118
102
  color: rgba(0, 0, 0, 0.6);
119
103
  font-size: 14px;
120
104
  font-weight: 400;
121
105
  padding-right: 7px;
122
106
  }
123
107
 
124
- .weda-list-view__container
125
- .weda-list-view__empty
126
- .weda-list-view__empty__content
127
- .arrow {
108
+ .weda-list-view__container .weda-list-view__empty .weda-list-view__empty__content .arrow {
128
109
  width: 6px;
129
110
  height: 10px;
130
111
  }
@@ -147,8 +128,7 @@
147
128
  }
148
129
 
149
130
  /* 触底加载 */
150
- .weda-list-view__container
151
- .weda-list-view__more.weda-list-view__more-bottomLoad {
131
+ .weda-list-view__container .weda-list-view__more.weda-list-view__more-bottomLoad {
152
132
  background: transparent;
153
133
  }
154
134
 
@@ -156,10 +136,7 @@
156
136
  padding-top: 1px;
157
137
  }
158
138
 
159
- .weda-list-view__container
160
- .weda-list-view__more
161
- .weda-list-view__bottom-load
162
- .weda-list-view__more-symbol {
139
+ .weda-list-view__container .weda-list-view__more .weda-list-view__bottom-load .weda-list-view__more-symbol {
163
140
  position: absolute;
164
141
  bottom: 0;
165
142
  left: 0;
@@ -185,9 +162,7 @@
185
162
  border-radius: 50%;
186
163
  }
187
164
 
188
- .weda-list-view__container
189
- .weda-list-view__more
190
- .weda-list-view__symbol-item:first-child {
165
+ .weda-list-view__container .weda-list-view__more .weda-list-view__symbol-item:first-child {
191
166
  width: 6px;
192
167
  height: 6px;
193
168
  margin-left: 0;
@@ -203,35 +178,21 @@
203
178
  box-sizing: border-box;
204
179
  }
205
180
 
206
- .weda-list-view__container
207
- .weda-list-view__more
208
- .weda-list-view__pagination-pre,
209
- .weda-list-view__container
210
- .weda-list-view__more
211
- .weda-list-view__pagination-next {
181
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-pre,
182
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-next {
212
183
  font-size: 12px;
213
184
  line-height: 24px;
214
185
  color: rgba(0, 0, 0, 0.4);
215
186
  padding: 0 24px;
216
187
  }
217
188
 
218
- .weda-list-view__container
219
- .weda-list-view__more
220
- .weda-list-view__pagination-pre.active,
221
- .weda-list-view__container
222
- .weda-list-view__more
223
- .weda-list-view__pagination-next.active {
189
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-pre.active,
190
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-next.active {
224
191
  color: rgba(0, 0, 0, 0.9);
225
192
  }
226
193
 
227
- .weda-list-view__container
228
- .weda-list-view__more
229
- .weda-list-view__pagination-pre
230
- .weda-list-view__pagination-icon,
231
- .weda-list-view__container
232
- .weda-list-view__more
233
- .weda-list-view__pagination-next
234
- .weda-list-view__pagination-icon {
194
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-pre .weda-list-view__pagination-icon,
195
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-next .weda-list-view__pagination-icon {
235
196
  position: absolute;
236
197
  width: 24px;
237
198
  height: 24px;
@@ -250,24 +211,16 @@
250
211
  opacity: 1;
251
212
  }
252
213
 
253
- .weda-list-view__container
254
- .weda-list-view__more
255
- .weda-list-view__pagination-pre
256
- .weda-list-view__pagination-icon {
214
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-pre .weda-list-view__pagination-icon {
257
215
  left: 16px;
258
216
  transform: rotate(180deg);
259
217
  }
260
218
 
261
- .weda-list-view__container
262
- .weda-list-view__more
263
- .weda-list-view__pagination-next
264
- .weda-list-view__pagination-icon {
219
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-next .weda-list-view__pagination-icon {
265
220
  right: 18px;
266
221
  }
267
222
 
268
- .weda-list-view__container
269
- .weda-list-view__more
270
- .weda-list-view__pagination-text {
223
+ .weda-list-view__container .weda-list-view__more .weda-list-view__pagination-text {
271
224
  font-size: 12px;
272
225
  line-height: 22px;
273
226
  color: rgba(0, 0, 0, 0.4);
@@ -70,8 +70,7 @@ Component({
70
70
  });
71
71
  },
72
72
  updateWidgetAPI() {
73
- const { text, backgroundColor, foregroundColor, showMenuByLongpress } =
74
- this.data;
73
+ const { text, backgroundColor, foregroundColor, showMenuByLongpress } = this.data;
75
74
 
76
75
  this.setReadonlyAttributes &&
77
76
  this.setReadonlyAttributes({
@@ -106,7 +105,7 @@ Component({
106
105
  wx.getImageInfo({
107
106
  src: res.tempFilePath,
108
107
  success(res) {
109
- console.log(res);
108
+ // console.log(res);
110
109
  that.setData({
111
110
  base64Url: res?.path,
112
111
  });
@@ -122,7 +121,7 @@ Component({
122
121
  console.error(res);
123
122
  },
124
123
  },
125
- this
124
+ this,
126
125
  );
127
126
  }, 500);
128
127
  },