@cloudbase/weda-ui-mp 3.13.1 → 3.13.3

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.
@@ -149,3 +149,7 @@
149
149
  .form-location-con__icon-wrap {
150
150
  overflow: hidden;
151
151
  }
152
+
153
+ .wd-form-item.showMap .wd-form-input-wrap.size-height-md {
154
+ height: auto;
155
+ }
@@ -36,14 +36,15 @@
36
36
  <image class="weui-uploader__img {{shapeClass}}" src="{{item.url}}" mode="aspectFill" />
37
37
  </view>
38
38
  </block>
39
- </view>
40
- <view wx:if="{{currentFiles.length < maxCount && !readOnly}}" class="weui-uploader__input-box {{shapeClass}}" hover-class="weui-active">
39
+ <view wx:if="{{currentFiles.length < maxCount && !readOnly}}" class="weui-uploader__input-box {{shapeClass}}" hover-class="weui-active">
41
40
  <view wx:if="{{!disabled&&!isChooseAvatar}}" class="weui-uploader__input" bindtap="chooseImage"></view>
42
41
 
43
42
  <button class="weui-uploader__input weui-uploader__input-button" wx:if="{{!disabled&&isChooseAvatar}}" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar"></button>
44
43
 
45
44
  <view wx:if="{{disabled}}" class="weui-uploader__uploader_disabled"></view>
46
45
  </view>
46
+ </view>
47
+
47
48
  </view>
48
49
  <mp-gallery class="gallery" hide-on-click="{{true}}" show-delete="{{showDelete}}" show="{{showPreview}}" binddelete="deletePic" img-urls="{{previewImageUrls}}" current="{{previewCurrent}}"></mp-gallery>
49
50
  </view>
@@ -2,6 +2,7 @@ import { commonCompBehavior } from '../../utils/common-behavior';
2
2
  import formFieldBehavior from '../form-field-behavior/form-field-behavior';
3
3
  import itemBehavior from '../form-field-behavior/item-behavior';
4
4
  import equal from '../../utils/deepEqual';
5
+ import classNames from '../../utils/classnames';
5
6
 
6
7
  Component({
7
8
  options: { virtualHost: true },
@@ -22,6 +23,7 @@ Component({
22
23
  data: {
23
24
  _oldLocationValue: null,
24
25
  readValue: '',
26
+ cls: '',
25
27
  },
26
28
  methods: {
27
29
  handleChange: function (e) {
@@ -39,14 +41,19 @@ Component({
39
41
  },
40
42
  },
41
43
  observers: {
42
- 'name, value, label, required, visible, disabled, readOnly, before, after':
43
- function () {
44
- this.updateWidgetAPI();
45
- },
44
+ 'name, value, label, required, visible, disabled, readOnly, before, after': function () {
45
+ this.updateWidgetAPI();
46
+ },
46
47
  value: function (v) {
47
48
  const readValue = typeof v === 'object' ? v?.['address'] : v;
48
49
  this.setData({ readValue });
49
50
  },
51
+ 'className,showMap': function (className, showMap) {
52
+ const cls = classNames(className, {
53
+ showMap: showMap,
54
+ });
55
+ this.setData({ cls });
56
+ },
50
57
  },
51
58
  lifetimes: {
52
59
  attached: function () {
@@ -1,7 +1,7 @@
1
1
  <block wx:if="{{visible}}">
2
2
  <wd-form-item
3
3
  id="{{id}}"
4
- className="{{className}}"
4
+ className="{{cls}}"
5
5
  style="{{style}}"
6
6
  label="{{label}}"
7
7
  labelVisible="{{labelVisible}}"
@@ -1,7 +1,6 @@
1
- <view id="{{id}}" style="{{style}}" class="{{classPrefix + '-side-tab-root'}} {{classPrefix + '-mp-side-tab-root'}} {{className}}">
2
- <wd-tabs list="{{tabsData}}" selectedIndex="{{selectedValue}}" direction="vertical" bind:onCurrent="getCurrent" bind:change="change">
1
+
2
+ <wd-tabs id="{{id}}" style="{{style}}" class="{{classPrefix + '-side-tab-root'}} {{classPrefix + '-mp-side-tab-root'}} {{className}}" list="{{tabsData}}" selectedIndex="{{selectedValue}}" direction="vertical" bind:onCurrent="getCurrent" bind:change="change">
3
3
  <slot wx:if="{{isSlotAuto}}" name="autoPanel_{{isMultipleSlot?slotKey:'1'}}"></slot>
4
4
  <slot wx:elif="{{isMultipleSlot}}" name="panel{{currentIndex + 1}}"></slot>
5
5
  <slot wx:else name="panel1"></slot>
6
6
  </wd-tabs>
7
- </view>
@@ -1,6 +1,4 @@
1
- <view id="{{id}}" style="{{style}}" class="{{classPrefix + '-top-tab-root'}} {{classPrefix + '-mp-top-tab-root'}} {{className}}">
2
- <wd-tabs list="{{tabsData}}" selectedIndex="{{selectedValue}}" direction="horizontal" bind:onCurrent="getCurrent" bind:change="change" currentIndex="{{currentIndex}}">
1
+ <wd-tabs id="{{id}}" style="{{style}}" class="{{classPrefix + '-top-tab-root'}} {{classPrefix + '-mp-top-tab-root'}} {{className}}" list="{{tabsData}}" selectedIndex="{{selectedValue}}" direction="horizontal" bind:onCurrent="getCurrent" bind:change="change" currentIndex="{{currentIndex}}">
3
2
  <slot wx:if="{{isSlotAuto}}" name="autoPanel_{{isMultipleSlot?slotKey:'1'}}"></slot>
4
3
  <slot wx:elif="{{isMultipleSlot}}" name="panel{{currentIndex + 1}}"></slot>
5
4
  </wd-tabs>
6
- </view>
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "miniprogram": "./",
4
4
  "packageManager": "yarn@3.0.2",
5
5
  "dependencies": {},
6
- "version": "3.13.1",
6
+ "version": "3.13.3",
7
7
  "main": "./",
8
8
  "publishConfig": {
9
9
  "access": "public"
package/utils/date.js CHANGED
@@ -8,6 +8,9 @@ export const convertDayjs = (val) => {
8
8
  let m = null;
9
9
  try {
10
10
  m = dayjs(val);
11
+ if (Object.prototype.hasOwnProperty.call(val, '$date')) {
12
+ m = dayjs(val.$date);
13
+ }
11
14
  if (!m?.isValid()) return null;
12
15
  } catch (e) {
13
16
  console.warn('[function convertDayjs]: ', e);