@cloudbase/weda-ui 2.0.8 → 2.0.11

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 (91) hide show
  1. package/package.json +9 -2
  2. package/src/mp/components/button/index.js +1 -1
  3. package/src/mp/components/button/index.wxml +19 -19
  4. package/src/mp/components/calendar/index.js +64 -37
  5. package/src/mp/components/calendar/index.wxml +28 -8
  6. package/src/mp/components/carousel/index.wxml +30 -3
  7. package/src/mp/components/chart/bar/index.js +1 -2
  8. package/src/mp/components/chart/bar/index.wxml +7 -2
  9. package/src/mp/components/chart/common/config/bar.js +1 -1
  10. package/src/mp/components/chart/common/core/eChartBar.js +29 -34
  11. package/src/mp/components/chart/common/core/eChartBase.js +46 -32
  12. package/src/mp/components/chart/common/core/eChartLine.js +34 -40
  13. package/src/mp/components/chart/common/core/eChartPie.js +12 -9
  14. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +19 -2
  15. package/src/mp/components/chart/ec-canvas/wx-canvas.js +24 -22
  16. package/src/mp/components/chart/line/index.js +2 -2
  17. package/src/mp/components/chart/line/index.wxml +7 -2
  18. package/src/mp/components/chart/pie/index.js +1 -1
  19. package/src/mp/components/chart/pie/index.wxml +7 -3
  20. package/src/mp/components/chart/statisticsCard/index.wxml +5 -1
  21. package/src/mp/components/dataView/index.wxml +2 -2
  22. package/src/mp/components/form/checkbox/index.js +10 -6
  23. package/src/mp/components/form/checkbox/index.wxml +26 -23
  24. package/src/mp/components/form/form/index.wxml +3 -3
  25. package/src/mp/components/form/formcell/index.wxml +9 -9
  26. package/src/mp/components/form/formcell/index.wxss +1 -1
  27. package/src/mp/components/form/input/index.js +3 -3
  28. package/src/mp/components/form/input/index.wxml +36 -30
  29. package/src/mp/components/form/input/index.wxss +2 -2
  30. package/src/mp/components/form/location/components/mapChoose/index.wxml +59 -12
  31. package/src/mp/components/form/location/index.wxml +39 -7
  32. package/src/mp/components/form/radio/index.js +9 -5
  33. package/src/mp/components/form/radio/index.wxml +23 -23
  34. package/src/mp/components/form/select/index.js +156 -97
  35. package/src/mp/components/form/select/index.wxml +39 -37
  36. package/src/mp/components/form/select/index.wxss +5 -3
  37. package/src/mp/components/form/select/region/index.js +18 -12
  38. package/src/mp/components/form/switch/index.wxml +20 -16
  39. package/src/mp/components/form/textarea/index.wxml +12 -8
  40. package/src/mp/components/form/tips/index.wxml +1 -3
  41. package/src/mp/components/form/uploader/index.js +1 -1
  42. package/src/mp/components/form/uploader/index.wxml +19 -18
  43. package/src/mp/components/form/uploader/weui-uploader.js +210 -200
  44. package/src/mp/components/form/uploader/weui-uploader.wxml +81 -38
  45. package/src/mp/components/form/uploaderFile/index.js +5 -4
  46. package/src/mp/components/form/uploaderFile/index.wxml +97 -41
  47. package/src/mp/components/graphicCard/index.js +26 -24
  48. package/src/mp/components/graphicCard/index.wxml +30 -6
  49. package/src/mp/components/image/index.wxml +25 -18
  50. package/src/mp/components/image/index.wxss +3 -1
  51. package/src/mp/components/listView/index.wxml +34 -11
  52. package/src/mp/components/lottery/index.wxml +29 -7
  53. package/src/mp/components/lottery/index.wxss +31 -25
  54. package/src/mp/components/navLayout/index.wxml +29 -7
  55. package/src/mp/components/navigationBar/index.wxml +162 -53
  56. package/src/mp/components/swiper/index.wxml +12 -7
  57. package/src/mp/components/tabs/index.js +14 -10
  58. package/src/mp/components/tabs/index.wxml +2 -1
  59. package/src/mp/components/text/index.wxml +2 -1
  60. package/src/mp/components/text/index.wxss +1 -1
  61. package/src/mp/components/wxOpenApi/phone/index.wxml +11 -12
  62. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +11 -12
  63. package/src/mp/components/wxOpenApi/share/index.wxml +11 -12
  64. package/src/mp/components/wxOpenApi/userInfo/index.wxml +10 -11
  65. package/src/mp/style/weda-ui.wxss +8 -3
  66. package/src/mp/utils/deepEqual.js +37 -37
  67. package/src/mp/utils/destr.js +41 -40
  68. package/src/mp/utils/dr_square_point.js +10 -6
  69. package/src/setupTests.js +13 -13
  70. package/src/web/components/button/index.tsx +44 -40
  71. package/src/web/components/carousel/index.tsx +1 -1
  72. package/src/web/components/chart/common/config/bar.js +1 -1
  73. package/src/web/components/chart/common/core/eChartBar.js +28 -34
  74. package/src/web/components/chart/common/core/eChartLine.js +34 -40
  75. package/src/web/components/chart/common/core/eChartPie.js +12 -9
  76. package/src/web/components/form/form/index.tsx +5 -5
  77. package/src/web/components/form/formcell/index.css +5 -1
  78. package/src/web/components/form/formcell/index.tsx +1 -1
  79. package/src/web/components/form/select/h5.tsx +154 -103
  80. package/src/web/components/form/select/index.css +3 -0
  81. package/src/web/components/form/textarea/index.tsx +1 -1
  82. package/src/web/components/form/uploader/uploader.h5.tsx +26 -20
  83. package/src/web/components/image/index.css +2 -2
  84. package/src/web/components/image/index.tsx +1 -1
  85. package/src/web/components/link/index.tsx +1 -1
  86. package/src/web/components/navLayout/index.tsx +1 -1
  87. package/src/web/components/navigationBar/index.tsx +2 -2
  88. package/src/web/components/picker/timePicker.tsx +1 -1
  89. package/src/web/components/text/index.tsx +13 -14
  90. package/src/web/utils/isObjectEqual.js +2 -1
  91. package/src/web/weda-ui.css +4 -0
@@ -3,19 +3,41 @@
3
3
  <block wx:for="{{optionList}}" wx:key="colIndex" wx:for-item="row">
4
4
  <view class="weda-grid weda-grid-navigation__row">
5
5
  <block wx:for="{{row}}" wx:key="colIndex" wx:for-item="col">
6
- <view class="weda-col weda-grid__item weda-grid-navigation__col weda-grid-navigation__col--{{iconSize}}" style="width: {{(1 / mobileCol)*100}}%" data-item="{{col}}" bindtap="navigaTo">
6
+ <view
7
+ class="weda-col weda-grid__item weda-grid-navigation__col weda-grid-navigation__col--{{iconSize}}"
8
+ style="width: {{(1 / mobileCol)*100}}%"
9
+ data-item="{{col}}"
10
+ bindtap="navigaTo"
11
+ >
7
12
  <view class="weda-grid__box">
8
13
  <view class="weda-grid-navigation__col">
9
- <view wx:if="{{col.icon!='自定义图片'}}" class="weda-grid-navigation__icon">
14
+ <view
15
+ wx:if="{{col.icon!='自定义图片'}}"
16
+ class="weda-grid-navigation__icon"
17
+ >
18
+ <view
19
+ wx:if="{{col.tdicon}}"
20
+ class="weda-icon t-icon t-icon-{{col.tdicon}}"
21
+ ></view>
10
22
 
11
- <view wx:if="{{col.tdicon}}" class="weda-icon t-icon t-icon-{{col.tdicon}}"></view>
12
-
13
- <view wx:if="{{!col.tdicon}}" class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{col.icon}}">
23
+ <view
24
+ wx:if="{{!col.tdicon}}"
25
+ class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{col.icon}}"
26
+ >
14
27
  </view>
15
28
  </view>
16
- <image wx:if="{{col.icon=='自定义图片'&&col.iconSrc}}" src="{{col.iconSrc}}" class="weda-grid-navigation__img"></image>
29
+ <image
30
+ wx:if="{{col.icon=='自定义图片'&&col.iconSrc}}"
31
+ src="{{col.iconSrc}}"
32
+ class="weda-grid-navigation__img"
33
+ ></image>
17
34
  </view>
18
- <view class="weda-grid-navigation__text" wx-if="{{col.title}}" style="-webkit-line-clamp:{{maxLines?maxLines:'revert'}};{{titleStyle}}">{{col.title}}</view>
35
+ <view
36
+ class="weda-grid-navigation__text"
37
+ wx-if="{{col.title}}"
38
+ style="-webkit-line-clamp:{{maxLines?maxLines:'revert'}};{{titleStyle}}"
39
+ >{{col.title}}</view
40
+ >
19
41
  </view>
20
42
  </view>
21
43
  </block>
@@ -1,16 +1,40 @@
1
- <view class="weda-menu weda-menu-mobile" style="display: {{menuData.length?'block':'none'}};">
2
- <view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
1
+ <view
2
+ class="weda-menu weda-menu-mobile"
3
+ style="display: {{menuData.length?'block':'none'}};"
4
+ >
5
+ <view
6
+ class="weda-menu__wrapper"
7
+ style="background:{{navigationStyle.menuBackgroundColor}}"
8
+ >
3
9
  <view class="weda-menu__bar-main">
4
10
  <view class="weda-menu__main-logo">
5
- <image wx:if="{{navigationStyle.showLogo}}" class="weda-menu__main-icon" style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};" src="{{navigationStyle.logoUrl||defaultLogoUrl}}"></image>
6
- <text wx:if="{{navigationStyle.showTitle}}" style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;">
7
- {{navigationStyle.title}}
11
+ <image
12
+ wx:if="{{navigationStyle.showLogo}}"
13
+ class="weda-menu__main-icon"
14
+ style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};"
15
+ src="{{navigationStyle.logoUrl||defaultLogoUrl}}"
16
+ ></image>
17
+ <text
18
+ wx:if="{{navigationStyle.showTitle}}"
19
+ style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;"
20
+ >
21
+ {{navigationStyle.title}}
8
22
  </text>
9
23
  </view>
10
24
  </view>
11
25
  <view class="weda-menu__bar-extra">
12
- <view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
13
- <view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
26
+ <view
27
+ wx:if="{{!visible}}"
28
+ class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list"
29
+ bindtap="showMenu"
30
+ style="color:{{navigationStyle.titleColor}}"
31
+ ></view>
32
+ <view
33
+ wx:else
34
+ class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close"
35
+ bindtap="showMenu"
36
+ style="color:{{navigationStyle.titleColor}}"
37
+ ></view>
14
38
  </view>
15
39
  </view>
16
40
  <view class="menu-solt">
@@ -18,71 +42,156 @@
18
42
  </view>
19
43
  </view>
20
44
 
21
-
22
- <view class="weda-menu-mobile__drawer" wx-if="{{visible}}">
23
-
45
+ <view class="weda-menu-mobile__drawer" wx-if="{{visible}}">
24
46
  <view class="weda-menu weda-menu-mobile">
25
- <view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
47
+ <view
48
+ class="weda-menu__wrapper"
49
+ style="background:{{navigationStyle.menuBackgroundColor}}"
50
+ >
26
51
  <view class="weda-menu__bar-main">
27
52
  <view class="weda-menu__main-logo">
28
- <image wx:if="{{navigationStyle.showLogo}}" class="weda-menu__main-icon" style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};" src="{{navigationStyle.logoUrl||defaultLogoUrl}}"></image>
29
- <text wx:if="{{navigationStyle.showTitle}}" style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;">
30
- {{navigationStyle.title}}
53
+ <image
54
+ wx:if="{{navigationStyle.showLogo}}"
55
+ class="weda-menu__main-icon"
56
+ style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};"
57
+ src="{{navigationStyle.logoUrl||defaultLogoUrl}}"
58
+ ></image>
59
+ <text
60
+ wx:if="{{navigationStyle.showTitle}}"
61
+ style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;"
62
+ >
63
+ {{navigationStyle.title}}
31
64
  </text>
32
65
  </view>
33
66
  </view>
34
67
  <view class="weda-menu__bar-extra">
35
- <view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
36
- <view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
68
+ <view
69
+ wx:if="{{!visible}}"
70
+ class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list"
71
+ bindtap="showMenu"
72
+ style="color:{{navigationStyle.titleColor}}"
73
+ ></view>
74
+ <view
75
+ wx:else
76
+ class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close"
77
+ bindtap="showMenu"
78
+ style="color:{{navigationStyle.titleColor}}"
79
+ ></view>
37
80
  </view>
38
81
  </view>
39
82
  </view>
40
83
  <view class="weda-drawer-drawer__body">
41
- <scroll-view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" scroll-y >
42
- <view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" style="background:{{navigationStyle.menuBackgroundColor}}">
43
- <view class="weda-drawer-menu__body">
44
- <view class="weda-drawer-menu__list">
45
- <block wx:for="{{menuData}}" wx:key="menuIndex" wx:for-item="menu">
46
- <view class="{{menu.children ? 'weda-drawer-menu__submenu' : ''}} {{menu.expand?'expand':''}}" >
47
- <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===menu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{menu}}">
48
- <view wx:if="{{navigationStyle.showMenuIcon && menu.iconType!=='image'}}" class="weda-grid-navigation__icon">
49
- <view wx:if="{{menu.iconType === 't-icon'}}" class="weda-icon t-icon t-icon-{{menu.ticon}}" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"></view>
50
- <view wx:if="{{menu.iconType !== 't-icon'}}" class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{menu.iconUrl}}" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">
84
+ <scroll-view
85
+ class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light"
86
+ scroll-y
87
+ >
88
+ <view
89
+ class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light"
90
+ style="background:{{navigationStyle.menuBackgroundColor}}"
91
+ >
92
+ <view class="weda-drawer-menu__body">
93
+ <view class="weda-drawer-menu__list">
94
+ <block wx:for="{{menuData}}" wx:key="menuIndex" wx:for-item="menu">
95
+ <view
96
+ class="{{menu.children ? 'weda-drawer-menu__submenu' : ''}} {{menu.expand?'expand':''}}"
97
+ >
98
+ <view
99
+ class="weda-drawer-menu__item"
100
+ style="background-color:{{selectedKey===menu.key?navigationStyle.menuHoverColor:'unset'}};"
101
+ bindtap="menuClick"
102
+ data-menu="{{menu}}"
103
+ >
104
+ <view
105
+ wx:if="{{navigationStyle.showMenuIcon && menu.iconType!=='image'}}"
106
+ class="weda-grid-navigation__icon"
107
+ >
108
+ <view
109
+ wx:if="{{menu.iconType === 't-icon'}}"
110
+ class="weda-icon t-icon t-icon-{{menu.ticon}}"
111
+ style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"
112
+ ></view>
113
+ <view
114
+ wx:if="{{menu.iconType !== 't-icon'}}"
115
+ class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{menu.iconUrl}}"
116
+ style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"
117
+ >
118
+ </view>
51
119
  </view>
120
+ <image
121
+ wx:if="{{navigationStyle.showMenuIcon && menu.iconType==='image'}}"
122
+ class="weda-drawer-menu__list-icon"
123
+ src="{{menu.iconUrl}}"
124
+ alt="icon"
125
+ ></image>
126
+ <view
127
+ class="weda-drawer-menu__text"
128
+ style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"
129
+ >{{menu.title}}</view
130
+ >
131
+ <view
132
+ wx-if="{{menu.children.length>0}}"
133
+ class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"
134
+ ></view>
52
135
  </view>
53
- <image wx:if="{{navigationStyle.showMenuIcon && menu.iconType==='image'}}" class="weda-drawer-menu__list-icon" src="{{menu.iconUrl}}" alt="icon"></image>
54
- <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{menu.title}}</view>
55
- <view wx-if="{{menu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
56
- </view>
57
- <view class="weda-drawer-menu__list">
58
- <block wx-if="{{menu.children}}">
59
- <block wx:for="{{menu.children}}" wx:key="secondIndex" wx:for-item="secondMenu">
60
- <view class="{{secondMenu.children ? 'weda-drawer-menu__submenu weda-menu__submenu' : ''}} {{secondMenu.expand?'expand':''}}">
61
- <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===secondMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{secondMenu}}">
62
- <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{secondMenu.title}}</view>
63
- <view wx-if="{{secondMenu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
64
- </view>
65
- <view class="weda-drawer-menu__list">
66
- <block wx-if="{{secondMenu.children}}">
67
- <block wx:for="{{secondMenu.children}}" wx:key="thridIndex" wx:for-item="thridMenu">
68
- <view class="">
69
- <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===thridMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{thridMenu}}">
70
- <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{thridMenu.title}}</view>
136
+ <view class="weda-drawer-menu__list">
137
+ <block wx-if="{{menu.children}}">
138
+ <block
139
+ wx:for="{{menu.children}}"
140
+ wx:key="secondIndex"
141
+ wx:for-item="secondMenu"
142
+ >
143
+ <view
144
+ class="{{secondMenu.children ? 'weda-drawer-menu__submenu weda-menu__submenu' : ''}} {{secondMenu.expand?'expand':''}}"
145
+ >
146
+ <view
147
+ class="weda-drawer-menu__item"
148
+ style="background-color:{{selectedKey===secondMenu.key?navigationStyle.menuHoverColor:'unset'}};"
149
+ bindtap="menuClick"
150
+ data-menu="{{secondMenu}}"
151
+ >
152
+ <view
153
+ class="weda-drawer-menu__text"
154
+ style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"
155
+ >{{secondMenu.title}}</view
156
+ >
157
+ <view
158
+ wx-if="{{secondMenu.children.length>0}}"
159
+ class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"
160
+ ></view>
161
+ </view>
162
+ <view class="weda-drawer-menu__list">
163
+ <block wx-if="{{secondMenu.children}}">
164
+ <block
165
+ wx:for="{{secondMenu.children}}"
166
+ wx:key="thridIndex"
167
+ wx:for-item="thridMenu"
168
+ >
169
+ <view class="">
170
+ <view
171
+ class="weda-drawer-menu__item"
172
+ style="background-color:{{selectedKey===thridMenu.key?navigationStyle.menuHoverColor:'unset'}};"
173
+ bindtap="menuClick"
174
+ data-menu="{{thridMenu}}"
175
+ >
176
+ <view
177
+ class="weda-drawer-menu__text"
178
+ style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"
179
+ >{{thridMenu.title}}</view
180
+ >
181
+ </view>
71
182
  </view>
72
- </view>
183
+ </block>
73
184
  </block>
74
- </block>
185
+ </view>
75
186
  </view>
76
- </view>
187
+ </block>
77
188
  </block>
78
- </block>
189
+ </view>
79
190
  </view>
80
- </view>
81
- </block>
191
+ </block>
192
+ </view>
82
193
  </view>
83
194
  </view>
84
- </view>
85
- </scroll-view>
195
+ </scroll-view>
86
196
  </view>
87
-
88
197
  </view>
@@ -1,11 +1,16 @@
1
1
  <swiper
2
- id="{{id}}" class="weda-ui {{className}}" style="{{style}}"
3
- indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}"
4
- current="{{current}}" interval="{{interval}}" duration="{{duration}}"
5
- circular="{{circular}}" vertical="{{vertical}}"
2
+ id="{{id}}"
3
+ class="weda-ui {{className}}"
4
+ style="{{style}}"
5
+ indicator-dots="{{indicatorDots}}"
6
+ autoplay="{{autoplay}}"
7
+ current="{{current}}"
8
+ interval="{{interval}}"
9
+ duration="{{duration}}"
10
+ circular="{{circular}}"
11
+ vertical="{{vertical}}"
6
12
  indicator-color="{{indicatorColor}}"
7
- indicator-active-color="{{indicatorActiveColor}}">
13
+ indicator-active-color="{{indicatorActiveColor}}"
14
+ >
8
15
  <slot></slot>
9
16
  </swiper>
10
-
11
-
@@ -9,7 +9,7 @@ Component({
9
9
  properties: {
10
10
  isMultipleSlot: {
11
11
  type: Boolean,
12
- value: true
12
+ value: true,
13
13
  },
14
14
  tabs: { type: Array, value: [] },
15
15
  scrollCellId: {
@@ -18,8 +18,8 @@ Component({
18
18
  },
19
19
  selectedIndex: {
20
20
  type: Number,
21
- value: 0
22
- }
21
+ value: 0,
22
+ },
23
23
  },
24
24
 
25
25
  data: {
@@ -41,15 +41,19 @@ Component({
41
41
  },
42
42
  },
43
43
  observers: {
44
- 'selectedIndex': function(selectedIndex) {
45
- if(selectedIndex !== this.data.currentIndex) {
44
+ selectedIndex: function (selectedIndex) {
45
+ if (selectedIndex !== this.data.currentIndex) {
46
46
  this.setData({
47
- currentIndex: selectedIndex
47
+ currentIndex: selectedIndex,
48
48
  });
49
49
  }
50
50
  },
51
- 'currentIndex, tabs': function(currentIndex, tabs) {
52
- this.triggerEvent('change', {id: currentIndex, label: tabs[currentIndex].title, value: tabs[currentIndex].value});
53
- }
54
- }
51
+ 'currentIndex, tabs': function (currentIndex, tabs) {
52
+ this.triggerEvent('change', {
53
+ id: currentIndex,
54
+ label: tabs[currentIndex].title,
55
+ value: tabs[currentIndex].value,
56
+ });
57
+ },
58
+ },
55
59
  });
@@ -15,7 +15,8 @@
15
15
  wx:for-index="index"
16
16
  wx:for-item="tab"
17
17
  wx:key="index"
18
- >{{ tab.title }}</view>
18
+ >{{ tab.title }}</view
19
+ >
19
20
 
20
21
  <view
21
22
  class="weda-tabs__nav-sticky"
@@ -3,4 +3,5 @@
3
3
  id="{{id}}"
4
4
  user-select="{{userSelect}}"
5
5
  style="white-space: {{ space ? 'pre-warp' : 'pre-line'}}; {{style}}"
6
- >{{text}}</text>
6
+ >{{text}}</text
7
+ >
@@ -23,4 +23,4 @@
23
23
  }
24
24
  .weda-text.level_6 {
25
25
  font-size: 24px !important;
26
- }
26
+ }
@@ -1,15 +1,14 @@
1
1
  <button
2
- id="{{id}}"
3
- class="{{cls}}"
4
- style="{{style}}"
5
- size="{{size}}"
6
- loading="{{loading}}"
7
- disabled="{{disabled}}"
8
- form-type="{{formType}}"
9
- open-type="{{openType}}"
10
- bindgetphonenumber="getPhoneNumber"
2
+ id="{{id}}"
3
+ class="{{cls}}"
4
+ style="{{style}}"
5
+ size="{{size}}"
6
+ loading="{{loading}}"
7
+ disabled="{{disabled}}"
8
+ form-type="{{formType}}"
9
+ open-type="{{openType}}"
10
+ bindgetphonenumber="getPhoneNumber"
11
11
  >
12
- {{text ? text : ''}}
13
- <slot name="contentSlot" wx:if="{{!text}}" />
12
+ {{text ? text : ''}}
13
+ <slot name="contentSlot" wx:if="{{!text}}" />
14
14
  </button>
15
-
@@ -1,15 +1,14 @@
1
1
  <button
2
- id="{{id}}"
3
- class="{{cls}}"
4
- style="{{style}}"
5
- size="{{size}}"
6
- loading="{{loading}}"
7
- disabled="{{disabled}}"
8
- form-type="{{formType}}"
9
- open-type="{{openType}}"
10
- bindgetphonenumber="getPhoneCodeNumber"
2
+ id="{{id}}"
3
+ class="{{cls}}"
4
+ style="{{style}}"
5
+ size="{{size}}"
6
+ loading="{{loading}}"
7
+ disabled="{{disabled}}"
8
+ form-type="{{formType}}"
9
+ open-type="{{openType}}"
10
+ bindgetphonenumber="getPhoneCodeNumber"
11
11
  >
12
- {{text ? text : ''}}
13
- <slot name="contentSlot" wx:if="{{!text}}" />
12
+ {{text ? text : ''}}
13
+ <slot name="contentSlot" wx:if="{{!text}}" />
14
14
  </button>
15
-
@@ -1,15 +1,14 @@
1
1
  <button
2
- id="{{id}}"
3
- class="{{cls}}"
4
- style="{{style}}"
5
- size="{{size}}"
6
- loading="{{loading}}"
7
- disabled="{{disabled}}"
8
- form-type="{{formType}}"
9
- open-type="{{openType}}"
10
- data-weda_share_info="{{shareInfo}}"
2
+ id="{{id}}"
3
+ class="{{cls}}"
4
+ style="{{style}}"
5
+ size="{{size}}"
6
+ loading="{{loading}}"
7
+ disabled="{{disabled}}"
8
+ form-type="{{formType}}"
9
+ open-type="{{openType}}"
10
+ data-weda_share_info="{{shareInfo}}"
11
11
  >
12
- {{text ? text : ''}}
13
- <slot name="contentSlot" wx:if="{{!text}}" />
12
+ {{text ? text : ''}}
13
+ <slot name="contentSlot" wx:if="{{!text}}" />
14
14
  </button>
15
-
@@ -1,14 +1,13 @@
1
1
  <button
2
- id="{{id}}"
3
- class="{{cls}}"
4
- style="{{style}}"
5
- size="{{size}}"
6
- loading="{{loading}}"
7
- disabled="{{disabled}}"
8
- form-type="{{formType}}"
9
- bindtap="getUserProfile"
2
+ id="{{id}}"
3
+ class="{{cls}}"
4
+ style="{{style}}"
5
+ size="{{size}}"
6
+ loading="{{loading}}"
7
+ disabled="{{disabled}}"
8
+ form-type="{{formType}}"
9
+ bindtap="getUserProfile"
10
10
  >
11
- {{text ? text : ''}}
12
- <slot name="contentSlot" wx:if="{{!text}}" />
11
+ {{text ? text : ''}}
12
+ <slot name="contentSlot" wx:if="{{!text}}" />
13
13
  </button>
14
-
@@ -45,12 +45,17 @@ page .weda-ui {
45
45
  font-size: 16px; /* 修改默认weui的17为16 */
46
46
  }
47
47
 
48
- .weui-cells__group_form .weui-cell::before, .weui-cells__group_form .weui-cells::before {
48
+ .weui-cells__group_form .weui-cell::before,
49
+ .weui-cells__group_form .weui-cells::before {
49
50
  left: 16px;
50
51
  right: 16px;
51
52
  }
52
53
 
53
54
  .weui-cells__group_form .weui-cells::after {
54
- left: 16px;
55
- right: 16px;
55
+ left: 16px;
56
+ right: 16px;
57
+ }
58
+
59
+ .weui-picker a:link:hover {
60
+ text-decoration: none;
56
61
  }
@@ -1,42 +1,42 @@
1
1
  function equal(a, b) {
2
- if (a === b) return true;
3
-
4
- if (a && b && typeof a == 'object' && typeof b == 'object') {
5
- if (a.constructor !== b.constructor) return false;
6
-
7
- var length, i, keys;
8
- if (Array.isArray(a)) {
9
- length = a.length;
10
- if (length != b.length) return false;
11
- for (i = length; i-- !== 0;)
12
- if (!equal(a[i], b[i])) return false;
13
- return true;
14
- }
15
-
16
-
17
-
18
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
19
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
20
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
21
-
22
- keys = Object.keys(a);
23
- length = keys.length;
24
- if (length !== Object.keys(b).length) return false;
25
-
26
- for (i = length; i-- !== 0;)
27
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
28
-
29
- for (i = length; i-- !== 0;) {
30
- var key = keys[i];
31
-
32
- if (!equal(a[key], b[key])) return false;
33
- }
34
-
2
+ if (a === b) return true;
3
+
4
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
5
+ if (a.constructor !== b.constructor) return false;
6
+
7
+ var length, i, keys;
8
+ if (Array.isArray(a)) {
9
+ length = a.length;
10
+ if (length != b.length) return false;
11
+ for (i = length; i-- !== 0; ) if (!equal(a[i], b[i])) return false;
35
12
  return true;
36
13
  }
37
-
38
- // true if both NaN, false otherwise
39
- return a!==a && b!==b;
14
+
15
+ if (a.constructor === RegExp)
16
+ return a.source === b.source && a.flags === b.flags;
17
+ if (a.valueOf !== Object.prototype.valueOf)
18
+ return a.valueOf() === b.valueOf();
19
+ if (a.toString !== Object.prototype.toString)
20
+ return a.toString() === b.toString();
21
+
22
+ keys = Object.keys(a);
23
+ length = keys.length;
24
+ if (length !== Object.keys(b).length) return false;
25
+
26
+ for (i = length; i-- !== 0; )
27
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
28
+
29
+ for (i = length; i-- !== 0; ) {
30
+ var key = keys[i];
31
+
32
+ if (!equal(a[key], b[key])) return false;
33
+ }
34
+
35
+ return true;
40
36
  }
41
37
 
42
- export default equal;
38
+ // true if both NaN, false otherwise
39
+ return a !== a && b !== b;
40
+ }
41
+
42
+ export default equal;