@cloudbase/weda-ui 2.0.11 → 2.0.12

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 (194) hide show
  1. package/README.md +1 -0
  2. package/package.json +5 -4
  3. package/src/configs/components/button.json +60 -13
  4. package/src/configs/components/calendar.json +3 -3
  5. package/src/configs/components/carousel.json +57 -47
  6. package/src/configs/components/chart/bar.json +4 -13
  7. package/src/configs/components/chart/line.json +4 -13
  8. package/src/configs/components/chart/pie.json +3 -10
  9. package/src/configs/components/chart/statisticsCard.json +1 -4
  10. package/src/configs/components/container.json +1 -3
  11. package/src/configs/components/dataView.json +7 -15
  12. package/src/configs/components/drawer.json +24 -6
  13. package/src/configs/components/form/form.json +19 -0
  14. package/src/configs/components/form/input.json +20 -5
  15. package/src/configs/components/form/location.json +51 -48
  16. package/src/configs/components/form/radio.json +1 -3
  17. package/src/configs/components/form/richText.json +14 -14
  18. package/src/configs/components/form/select.json +62 -82
  19. package/src/configs/components/form/textarea.json +6 -1
  20. package/src/configs/components/form/uploader.json +64 -64
  21. package/src/configs/components/form/uploaderFile.json +1 -2
  22. package/src/configs/components/graphicCard.json +43 -44
  23. package/src/configs/components/image.json +44 -40
  24. package/src/configs/components/link.json +5 -10
  25. package/src/configs/components/listView.json +2 -8
  26. package/src/configs/components/lottery.json +7 -3
  27. package/src/configs/components/modal.json +26 -21
  28. package/src/configs/components/navLayout.json +66 -67
  29. package/src/configs/components/navigationBar.json +4 -1
  30. package/src/configs/components/richtextview.json +1 -1
  31. package/src/configs/components/scrollVeiw.json +14 -42
  32. package/src/configs/components/swiper.json +9 -9
  33. package/src/configs/components/wedaVideo.json +86 -0
  34. package/src/configs/components/wxOpenApi/phone.json +7 -21
  35. package/src/configs/components/wxOpenApi/phoneCode.json +7 -19
  36. package/src/configs/components/wxOpenApi/share.json +14 -24
  37. package/src/configs/components/wxOpenApi/userInfo.json +9 -27
  38. package/src/configs/index.js +2 -0
  39. package/src/docs/common/format.tsx +4 -1
  40. package/src/docs/common/tableView.css +3 -3
  41. package/src/docs/common/tableView.tsx +18 -8
  42. package/src/docs/compsdocs/form/FormLocation.mdx +1 -1
  43. package/src/docs/compsdocs/form/FormSelect.mdx +0 -1
  44. package/src/docs/compsdocs/grid/Card.mdx +0 -1
  45. package/src/docs/compsdocs/grid/Container.mdx +0 -1
  46. package/src/docs/compsdocs/grid/GridLayout.mdx +0 -1
  47. package/src/docs/compsdocs/grid/ScrollView.mdx +2 -2
  48. package/src/docs/compsdocs/grid/Swiper.mdx +1 -2
  49. package/src/docs/compsdocs/media/Icon.mdx +1 -1
  50. package/src/docs/compsdocs/media/Image.mdx +6 -6
  51. package/src/docs/compsdocs/model/ModelCreate.mdx +24 -0
  52. package/src/docs/compsdocs/model/ModelDetail.mdx +24 -0
  53. package/src/docs/compsdocs/model/ModelTable.mdx +133 -1
  54. package/src/docs/compsdocs/model/ModelUpdate.mdx +24 -1
  55. package/src/docs/compsdocs/navmenu/Classification.mdx +2 -3
  56. package/src/docs/compsdocs/navmenu/NavBar.mdx +14 -5
  57. package/src/docs/compsdocs/navmenu/NavLayout.mdx +0 -1
  58. package/src/docs/compsdocs/navmenu/TabBar.mdx +3 -3
  59. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +1 -1
  60. package/src/docs/compsdocs/senior/Lottery.mdx +3 -6
  61. package/src/docs/compsdocs/senior/Modal.mdx +2 -3
  62. package/src/docs/compsdocs/senior/SlotMachine.mdx +2 -5
  63. package/src/docs/compsdocs/senior/_category_.json +1 -1
  64. package/src/docs/compsdocs/show/GraphicCard.mdx +0 -1
  65. package/src/docs/compsdocs/show/Item.mdx +0 -1
  66. package/src/docs/compsdocs/show/ItemList.mdx +1 -0
  67. package/src/docs/compsdocs/show/Tabs.mdx +2 -3
  68. package/src/docs/compsdocs/text/Link.mdx +1 -1
  69. package/src/docs/compsdocs/text/RichTextView.mdx +1 -2
  70. package/src/docs/compsdocs/text/Text.mdx +1 -1
  71. package/src/docs/compsdocs/text/Title.mdx +1 -2
  72. package/src/docs/compsdocs/wxOpen/Phone.mdx +1 -2
  73. package/src/docs/compsdocs/wxOpen/Share.mdx +0 -1
  74. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +1 -2
  75. package/src/mp/components/calendar/index.json +1 -1
  76. package/src/mp/components/calendar/index.wxml +5 -27
  77. package/src/mp/components/carousel/index.json +1 -1
  78. package/src/mp/components/carousel/index.wxml +3 -30
  79. package/src/mp/components/chart/bar/index.wxml +1 -6
  80. package/src/mp/components/chart/ec-canvas/ec-canvas.json +1 -1
  81. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +2 -19
  82. package/src/mp/components/chart/line/index.wxml +1 -6
  83. package/src/mp/components/chart/pie/index.wxml +1 -6
  84. package/src/mp/components/chart/statisticsCard/index.wxml +1 -5
  85. package/src/mp/components/dataView/index.wxml +1 -13
  86. package/src/mp/components/form/checkbox/index.wxml +3 -18
  87. package/src/mp/components/form/formcell/index.wxss +5 -0
  88. package/src/mp/components/form/input/index.wxml +3 -16
  89. package/src/mp/components/form/input/index.wxss +7 -1
  90. package/src/mp/components/form/location/components/mapChoose/index.json +1 -1
  91. package/src/mp/components/form/location/components/mapChoose/index.wxml +11 -58
  92. package/src/mp/components/form/location/index.js +7 -1
  93. package/src/mp/components/form/location/index.json +1 -1
  94. package/src/mp/components/form/location/index.wxml +7 -43
  95. package/src/mp/components/form/radio/index.wxml +2 -14
  96. package/src/mp/components/form/select/index.wxml +3 -33
  97. package/src/mp/components/form/select/index.wxss +9 -0
  98. package/src/mp/components/form/switch/index.wxml +2 -13
  99. package/src/mp/components/form/textarea/index.wxml +4 -23
  100. package/src/mp/components/form/textarea/index.wxss +5 -0
  101. package/src/mp/components/form/uploader/index.wxml +2 -20
  102. package/src/mp/components/form/uploader/weui-uploader.json +6 -6
  103. package/src/mp/components/form/uploader/weui-uploader.wxml +10 -53
  104. package/src/mp/components/form/uploaderFile/index.wxml +14 -71
  105. package/src/mp/components/graphicCard/index.js +9 -11
  106. package/src/mp/components/graphicCard/index.wxml +6 -34
  107. package/src/mp/components/image/index.wxml +3 -21
  108. package/src/mp/components/listView/index.wxml +8 -33
  109. package/src/mp/components/lottery/index.wxml +7 -31
  110. package/src/mp/components/navLayout/index.js +9 -12
  111. package/src/mp/components/navLayout/index.wxml +6 -30
  112. package/src/mp/components/navigationBar/index.json +1 -2
  113. package/src/mp/components/navigationBar/index.wxml +29 -146
  114. package/src/mp/components/swiper/index.wxml +1 -14
  115. package/src/mp/components/tabs/index.json +1 -1
  116. package/src/mp/components/tabs/index.wxml +3 -22
  117. package/src/mp/components/text/index.wxml +1 -7
  118. package/src/mp/components/wedaVideo/index.js +86 -0
  119. package/src/mp/components/wedaVideo/index.json +4 -0
  120. package/src/mp/components/wedaVideo/index.wxml +4 -0
  121. package/src/mp/components/wedaVideo/index.wxss +20 -0
  122. package/src/mp/components/wxOpenApi/phone/index.js +1 -9
  123. package/src/mp/components/wxOpenApi/phone/index.wxml +1 -11
  124. package/src/mp/components/wxOpenApi/phoneCode/index.json +1 -1
  125. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +1 -11
  126. package/src/mp/components/wxOpenApi/share/index.wxml +1 -11
  127. package/src/mp/components/wxOpenApi/userInfo/index.wxml +1 -10
  128. package/src/mp/index.json +1 -0
  129. package/src/mp/style/weda-ui.wxss +12 -4
  130. package/src/web/actions/showModal/index.tsx +5 -4
  131. package/src/web/components/calendar/index.css +81 -34
  132. package/src/web/components/chart/common/core/eChartBase.ts +55 -42
  133. package/src/web/components/chart/common/core/type.ts +23 -23
  134. package/src/web/components/chart/common/echart.css +12 -12
  135. package/src/web/components/chart/common/echarts.ts +3 -5
  136. package/src/web/components/chart/common/useChart.tsx +34 -16
  137. package/src/web/components/container/index.tsx +3 -4
  138. package/src/web/components/drawer/index.tsx +15 -4
  139. package/src/web/components/form/checkbox/index.tsx +32 -31
  140. package/src/web/components/form/enumSelect/NormalSelect.tsx +0 -2
  141. package/src/web/components/form/form/index.css +3 -6
  142. package/src/web/components/form/form/index.tsx +2 -1
  143. package/src/web/components/form/formcell/index.css +5 -3
  144. package/src/web/components/form/formcell/index.tsx +2 -6
  145. package/src/web/components/form/input/index.css +4 -4
  146. package/src/web/components/form/input/index.tsx +61 -53
  147. package/src/web/components/form/location/common/selectModal.jsx +2 -11
  148. package/src/web/components/form/location/common/useLocationInfo.js +4 -0
  149. package/src/web/components/form/location/components/LocationH5/index.css +0 -1
  150. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +11 -1
  151. package/src/web/components/form/location/components/LocationPC/Header.jsx +0 -13
  152. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +14 -5
  153. package/src/web/components/form/radio/index.tsx +32 -26
  154. package/src/web/components/form/renderDecorator.tsx +23 -26
  155. package/src/web/components/form/select/h5.tsx +1 -1
  156. package/src/web/components/form/select/index.css +9 -0
  157. package/src/web/components/form/select/index.tsx +75 -48
  158. package/src/web/components/form/select/region/index.ts +101 -80
  159. package/src/web/components/form/select/year.tsx +2 -0
  160. package/src/web/components/form/switch/index.tsx +40 -40
  161. package/src/web/components/form/textarea/index.css +4 -0
  162. package/src/web/components/form/textarea/index.tsx +26 -25
  163. package/src/web/components/form/types.d.ts +10 -10
  164. package/src/web/components/form/uploaderFile/index.jsx +0 -5
  165. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +15 -11
  166. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +14 -9
  167. package/src/web/components/image/image.tsx +2 -2
  168. package/src/web/components/image/index.css +9 -7
  169. package/src/web/components/image/index.tsx +28 -11
  170. package/src/web/components/index.js +1 -0
  171. package/src/web/components/link/index.tsx +12 -12
  172. package/src/web/components/lottery/index.css +43 -37
  173. package/src/web/components/lottery/index.tsx +2 -2
  174. package/src/web/components/modal/index.tsx +34 -34
  175. package/src/web/components/picker/datePicker.tsx +3 -3
  176. package/src/web/components/picker/picker.tsx +3 -3
  177. package/src/web/components/richText/index.jsx +41 -46
  178. package/src/web/components/richTextView/index.tsx +4 -6
  179. package/src/web/components/scrollView/index.tsx +2 -2
  180. package/src/web/components/slot/index.tsx +3 -4
  181. package/src/web/components/swiper/index.css +1 -1
  182. package/src/web/components/swiper/index.tsx +33 -15
  183. package/src/web/components/tabs/index.css +1 -1
  184. package/src/web/components/tabs/index.tsx +6 -6
  185. package/src/web/components/tabs/tabs.h5.tsx +17 -12
  186. package/src/web/components/tabs/tabs.pc.tsx +45 -34
  187. package/src/web/components/text/index.css +1 -1
  188. package/src/web/components/wedaVideo/index.css +42 -0
  189. package/src/web/components/wedaVideo/index.tsx +198 -0
  190. package/src/web/utils/constant.ts +2 -1
  191. package/src/web/utils/loading-fallback.tsx +2 -2
  192. package/src/web/utils/lodash.ts +1 -1
  193. package/src/web/utils/useSetState.ts +6 -2
  194. package/src/web/weda-ui.css +13 -0
@@ -54,25 +54,22 @@ Component({
54
54
 
55
55
  methods: {
56
56
  navigaTo: function (itemInfo) {
57
+ let { app } = getApp();
57
58
  const item = itemInfo?.currentTarget?.dataset?.item;
58
59
  if (item.tapStatus == 'inside') {
59
- const paramObj = [];
60
+ const paramObj = {};
60
61
  if (item.withParams && item?.params) {
61
62
  for (let info of item.params) {
62
- paramObj.push(info.key + '=' + info.value);
63
+ paramObj[info.key] = info.value;
63
64
  }
64
65
  }
65
66
  item.paramObj = paramObj;
66
- if (item.withParams && item.params.length > 0) {
67
- wx.redirectTo({
68
- url:
69
- '/pages/' + item?.insideUrl + '/index?' + item.paramObj.join('&'),
70
- });
71
- } else {
72
- wx.redirectTo({
73
- url: '/pages/' + item?.insideUrl + '/index',
74
- });
75
- }
67
+ app.navigateTo({
68
+ mode: 'weDa',
69
+ pageId: item?.insideUrl,
70
+ params:
71
+ item?.withParams && item?.params.length > 0 ? item.paramObj : null,
72
+ });
76
73
  }
77
74
  },
78
75
  },
@@ -3,41 +3,17 @@
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
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
- >
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">
12
7
  <view class="weda-grid__box">
13
8
  <view class="weda-grid-navigation__col">
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>
9
+ <view wx:if="{{col.icon!='自定义图片'}}" class="weda-grid-navigation__icon">
10
+ <view wx:if="{{col.tdicon}}" class="weda-icon t-icon t-icon-{{col.tdicon}}"></view>
22
11
 
23
- <view
24
- wx:if="{{!col.tdicon}}"
25
- class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{col.icon}}"
26
- >
27
- </view>
12
+ <view wx:if="{{!col.tdicon}}" class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{col.icon}}"> </view>
28
13
  </view>
29
- <image
30
- wx:if="{{col.icon=='自定义图片'&&col.iconSrc}}"
31
- src="{{col.iconSrc}}"
32
- class="weda-grid-navigation__img"
33
- ></image>
14
+ <image wx:if="{{col.icon=='自定义图片'&&col.iconSrc}}" src="{{col.iconSrc}}" class="weda-grid-navigation__img"></image>
34
15
  </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
- >
16
+ <view class="weda-grid-navigation__text" wx-if="{{col.title}}" style="-webkit-line-clamp:{{maxLines?maxLines:'revert'}};{{titleStyle}}">{{col.title}}</view>
41
17
  </view>
42
18
  </view>
43
19
  </block>
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "component": true,
3
3
  "styleIsolation": "shared",
4
- "usingComponents": {
5
- }
4
+ "usingComponents": {}
6
5
  }
@@ -1,40 +1,14 @@
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
- >
1
+ <view class="weda-menu weda-menu-mobile" style="display: {{menuData.length?'block':'none'}};">
2
+ <view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
9
3
  <view class="weda-menu__bar-main">
10
4
  <view class="weda-menu__main-logo">
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}}
22
- </text>
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;"> {{navigationStyle.title}} </text>
23
7
  </view>
24
8
  </view>
25
9
  <view class="weda-menu__bar-extra">
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>
10
+ <view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
11
+ <view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
38
12
  </view>
39
13
  </view>
40
14
  <view class="menu-solt">
@@ -44,140 +18,49 @@
44
18
 
45
19
  <view class="weda-menu-mobile__drawer" wx-if="{{visible}}">
46
20
  <view class="weda-menu weda-menu-mobile">
47
- <view
48
- class="weda-menu__wrapper"
49
- style="background:{{navigationStyle.menuBackgroundColor}}"
50
- >
21
+ <view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
51
22
  <view class="weda-menu__bar-main">
52
23
  <view class="weda-menu__main-logo">
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}}
64
- </text>
24
+ <image wx:if="{{navigationStyle.showLogo}}" class="weda-menu__main-icon" style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};" src="{{navigationStyle.logoUrl||defaultLogoUrl}}"></image>
25
+ <text wx:if="{{navigationStyle.showTitle}}" style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;"> {{navigationStyle.title}} </text>
65
26
  </view>
66
27
  </view>
67
28
  <view class="weda-menu__bar-extra">
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>
29
+ <view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
30
+ <view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
80
31
  </view>
81
32
  </view>
82
33
  </view>
83
34
  <view class="weda-drawer-drawer__body">
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
- >
35
+ <scroll-view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" scroll-y>
36
+ <view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" style="background:{{navigationStyle.menuBackgroundColor}}">
92
37
  <view class="weda-drawer-menu__body">
93
38
  <view class="weda-drawer-menu__list">
94
39
  <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>
40
+ <view class="{{menu.children ? 'weda-drawer-menu__submenu' : ''}} {{menu.expand?'expand':''}}">
41
+ <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===menu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{menu}}">
42
+ <view wx:if="{{navigationStyle.showMenuIcon && menu.iconType!=='image'}}" class="weda-grid-navigation__icon">
43
+ <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>
44
+ <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}}"> </view>
119
45
  </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>
46
+ <image wx:if="{{navigationStyle.showMenuIcon && menu.iconType==='image'}}" class="weda-drawer-menu__list-icon" src="{{menu.iconUrl}}" alt="icon"></image>
47
+ <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{menu.title}}</view>
48
+ <view wx-if="{{menu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
135
49
  </view>
136
50
  <view class="weda-drawer-menu__list">
137
51
  <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>
52
+ <block wx:for="{{menu.children}}" wx:key="secondIndex" wx:for-item="secondMenu">
53
+ <view class="{{secondMenu.children ? 'weda-drawer-menu__submenu weda-menu__submenu' : ''}} {{secondMenu.expand?'expand':''}}">
54
+ <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===secondMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{secondMenu}}">
55
+ <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{secondMenu.title}}</view>
56
+ <view wx-if="{{secondMenu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
161
57
  </view>
162
58
  <view class="weda-drawer-menu__list">
163
59
  <block wx-if="{{secondMenu.children}}">
164
- <block
165
- wx:for="{{secondMenu.children}}"
166
- wx:key="thridIndex"
167
- wx:for-item="thridMenu"
168
- >
60
+ <block wx:for="{{secondMenu.children}}" wx:key="thridIndex" wx:for-item="thridMenu">
169
61
  <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
- >
62
+ <view class="weda-drawer-menu__item" style="background-color:{{selectedKey===thridMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{thridMenu}}">
63
+ <view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{thridMenu.title}}</view>
181
64
  </view>
182
65
  </view>
183
66
  </block>
@@ -1,16 +1,3 @@
1
- <swiper
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}}"
12
- indicator-color="{{indicatorColor}}"
13
- indicator-active-color="{{indicatorActiveColor}}"
14
- >
1
+ <swiper id="{{id}}" class="weda-ui {{className}}" style="{{style}}" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" current="{{current}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" vertical="{{vertical}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}">
15
2
  <slot></slot>
16
3
  </swiper>
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {}
4
- }
4
+ }
@@ -1,27 +1,8 @@
1
1
  <view class="weda-tabs ext-class">
2
- <scroll-view
3
- class="weda-tabs__nav"
4
- scroll-into-view="{{ scrollCellId }}"
5
- scroll-with-animation
6
- scroll-x
7
- >
8
- <view
9
- bind:tap="toggle"
10
- class="weda-tabs__nav-cell {{ currentIndex === index ? 'active' : '' }} {{ tabs.length > 5 ? 'scroll' : '' }}"
11
- data-index="{{index}}"
12
- id="cell-{{index}}"
13
- style="width: {{ 1 / tabs.length * 100 }}%"
14
- wx:for="{{tabs}}"
15
- wx:for-index="index"
16
- wx:for-item="tab"
17
- wx:key="index"
18
- >{{ tab.title }}</view
19
- >
2
+ <scroll-view class="weda-tabs__nav" scroll-into-view="{{ scrollCellId }}" scroll-with-animation scroll-x>
3
+ <view bind:tap="toggle" class="weda-tabs__nav-cell {{ currentIndex === index ? 'active' : '' }} {{ tabs.length > 5 ? 'scroll' : '' }}" data-index="{{index}}" id="cell-{{index}}" style="width: {{ 1 / tabs.length * 100 }}%" wx:for="{{tabs}}" wx:for-index="index" wx:for-item="tab" wx:key="index">{{ tab.title }}</view>
20
4
 
21
- <view
22
- class="weda-tabs__nav-sticky"
23
- style="width: {{ 1 / tabs.length * 100 }}%; transform: translate3d({{currentIndex * 100}}%, 0, 0)"
24
- ></view>
5
+ <view class="weda-tabs__nav-sticky" style="width: {{ 1 / tabs.length * 100 }}%; transform: translate3d({{currentIndex * 100}}%, 0, 0)"></view>
25
6
  </scroll-view>
26
7
 
27
8
  <view class="weda-tabs__panel">
@@ -1,7 +1 @@
1
- <text
2
- class="weda-text weda-ui {{className}} {{levelName}}"
3
- id="{{id}}"
4
- user-select="{{userSelect}}"
5
- style="white-space: {{ space ? 'pre-warp' : 'pre-line'}}; {{style}}"
6
- >{{text}}</text
7
- >
1
+ <text class="weda-text weda-ui {{className}} {{levelName}}" id="{{id}}" user-select="{{userSelect}}" style="white-space: {{ space ? 'pre-warp' : 'pre-line'}}; {{style}}">{{text}}</text>
@@ -0,0 +1,86 @@
1
+ // component/videojs.js
2
+ Component({
3
+ /**
4
+ * 组件的属性列表
5
+ */
6
+ properties: {
7
+ className: {
8
+ type: String,
9
+ value: '',
10
+ },
11
+ style: {
12
+ type: String,
13
+ value: '',
14
+ },
15
+ videoDataSource: {
16
+ type: String,
17
+ value: '',
18
+ },
19
+ posterImage: {
20
+ type: String,
21
+ value: '',
22
+ },
23
+ autoPlay: {
24
+ type: Boolean,
25
+ value: false,
26
+ },
27
+ loopPlay: {
28
+ type: Boolean,
29
+ value: false,
30
+ },
31
+ mutePlay: {
32
+ type: Boolean,
33
+ value: false,
34
+ },
35
+ controlBarStatus: {
36
+ type: Boolean,
37
+ value: true,
38
+ },
39
+ startTime: {
40
+ type: Number,
41
+ value: 0,
42
+ },
43
+ endTime: {
44
+ type: Number,
45
+ value: 0,
46
+ },
47
+ },
48
+
49
+ /**
50
+ * 组件的初始数据
51
+ */
52
+ data: {
53
+ videoId: `${new Date().getTime()}-${Math.random()}`,
54
+ videoErrMsg: '',
55
+ videoErrStatus: false,
56
+ },
57
+
58
+ /**
59
+ * 组件的方法列表
60
+ */
61
+ methods: {
62
+ bindtimeupdate(event) {
63
+ const { currentTime } = event.detail;
64
+ const { endTime, loopPlay } = this.properties;
65
+ const videoContext = wx.createVideoContext(this.data.videoId, this);
66
+ if (currentTime >= endTime && endTime) {
67
+ videoContext.seek(0);
68
+ loopPlay ? videoContext.play() : videoContext.pause();
69
+ }
70
+ },
71
+ binderror(event) {
72
+ const { errMsg } = event.detail;
73
+ this.setData({
74
+ videoErrMsg: errMsg,
75
+ videoErrStatus: true,
76
+ });
77
+ console.error('binderror', event.detail);
78
+ },
79
+ bindplay() {
80
+ this.setData({
81
+ videoErrMsg: '',
82
+ videoErrStatus: false,
83
+ });
84
+ },
85
+ },
86
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "styleIsolation": "shared"
4
+ }
@@ -0,0 +1,4 @@
1
+ <view style="position: relative">
2
+ <video class="weda-ui_video-mp {{className}}" style="{{style}}" id="{{videoId}}" src="{{videoDataSource}}" poster="{{posterImage}}" autoplay="{{autoPlay}}" loop="{{loopPlay}}" muted="{{mutePlay}}" controls="{{controlBarStatus}}" initial-time="{{startTime}}" duration="{{endTime}}" show-mute-btn="{{true}}" bindtimeupdate="bindtimeupdate" binderror="binderror" bindplay="bindplay"></video>
3
+ <view class="weda-ui_video-mp_error" wx:if="{{videoErrStatus}}"> 频资源加载出错,错误信息:{{videoErrMsg}} </view>
4
+ </view>
@@ -0,0 +1,20 @@
1
+ /* component/videojs.wxss */
2
+
3
+ .weda-ui_video-mp {
4
+ width: 100%;
5
+ position: relative;
6
+ }
7
+
8
+ .weda-ui_video-mp_error {
9
+ width: 100%;
10
+ height: 100%;
11
+ position: absolute;
12
+ background-color: rgba(0, 0, 0);
13
+ top: 0;
14
+ left: 0;
15
+ color: #fff;
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ text-align: center;
20
+ }
@@ -1,5 +1,6 @@
1
1
  import classNames from '../../../utils/classnames';
2
2
  import destr from '../../../utils/destr';
3
+ import { callWedaApi } from '../../../utils/tcb';
3
4
 
4
5
  Component({
5
6
  options: {
@@ -63,15 +64,6 @@ Component({
63
64
  });
64
65
  return;
65
66
  }
66
- const { app } = getApp();
67
- const callWedaApi = app?.cloud?.callWedaApi;
68
- if (!callWedaApi) {
69
- console.warn(`当前环境缺少方法 app.cloud.callWedaApi`);
70
- this.triggerEvent('phonefail', {
71
- errMsg: '当前环境缺少方法 app.cloud.callWedaApi,获取手机号失败',
72
- });
73
- return;
74
- }
75
67
  const res = await callWedaApi({
76
68
  action: 'InvokeComponentWxModule',
77
69
  data: {
@@ -1,14 +1,4 @@
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"
11
- >
1
+ <button id="{{id}}" class="{{cls}}" style="{{style}}" size="{{size}}" loading="{{loading}}" disabled="{{disabled}}" form-type="{{formType}}" open-type="{{openType}}" bindgetphonenumber="getPhoneNumber">
12
2
  {{text ? text : ''}}
13
3
  <slot name="contentSlot" wx:if="{{!text}}" />
14
4
  </button>
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "component": true,
3
3
  "styleIsolation": "shared"
4
- }
4
+ }
@@ -1,14 +1,4 @@
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"
11
- >
1
+ <button id="{{id}}" class="{{cls}}" style="{{style}}" size="{{size}}" loading="{{loading}}" disabled="{{disabled}}" form-type="{{formType}}" open-type="{{openType}}" bindgetphonenumber="getPhoneCodeNumber">
12
2
  {{text ? text : ''}}
13
3
  <slot name="contentSlot" wx:if="{{!text}}" />
14
4
  </button>
@@ -1,14 +1,4 @@
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}}"
11
- >
1
+ <button id="{{id}}" class="{{cls}}" style="{{style}}" size="{{size}}" loading="{{loading}}" disabled="{{disabled}}" form-type="{{formType}}" open-type="{{openType}}" data-weda_share_info="{{shareInfo}}">
12
2
  {{text ? text : ''}}
13
3
  <slot name="contentSlot" wx:if="{{!text}}" />
14
4
  </button>
@@ -1,13 +1,4 @@
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"
10
- >
1
+ <button id="{{id}}" class="{{cls}}" style="{{style}}" size="{{size}}" loading="{{loading}}" disabled="{{disabled}}" form-type="{{formType}}" bindtap="getUserProfile">
11
2
  {{text ? text : ''}}
12
3
  <slot name="contentSlot" wx:if="{{!text}}" />
13
4
  </button>
package/src/mp/index.json CHANGED
@@ -24,6 +24,7 @@
24
24
  "path": "swiper"
25
25
  },
26
26
  "Carousel": "components/carousel/index",
27
+ "WedaVideo": "components/wedaVideo",
27
28
  "ScrollView": "components/scrollView/index",
28
29
  "Tips": "components/form/tips/index",
29
30
  "RichTextView": "components/richText/index",
@@ -33,10 +33,6 @@ page .weda-ui {
33
33
  display: none;
34
34
  }
35
35
 
36
- .weda-ui .weui-input.focus.not-placeholder-shown + .weui-btn_input-clear {
37
- display: inline;
38
- }
39
-
40
36
  .weda-ui.weda-picker .weui-btn_primary:not(.weui-btn_disabled):active {
41
37
  background-color: var(--weui-TAG-TEXT-BLUE);
42
38
  }
@@ -59,3 +55,15 @@ page .weda-ui {
59
55
  .weui-picker a:link:hover {
60
56
  text-decoration: none;
61
57
  }
58
+ .weda-ui .weui-input {
59
+ padding: 28rpx 0;
60
+ }
61
+
62
+ .weda-ui .weui-btn_input-clear {
63
+ visibility: hidden; /* visibilty 防止居中而且宽度auto时,出现输入时宽度抖动 */
64
+ display: inline;
65
+ }
66
+ .weda-ui .weui-input.focus.not-placeholder-shown + .weui-btn_input-clear {
67
+ visibility: visible;
68
+ display: inline;
69
+ }
@@ -2,8 +2,10 @@ import * as ReactDOM from 'react-dom';
2
2
  import * as React from 'react';
3
3
  import { forwardRef, useState, useEffect, useImperativeHandle } from 'react';
4
4
  import { Modal, Button, Text, ModalProps, ConfigProvider } from 'tea-component';
5
- import type { ModalShowHandle, ModalShowOptions } from 'tea-component/lib/modal/ModalShow';
6
-
5
+ import type {
6
+ ModalShowHandle,
7
+ ModalShowOptions,
8
+ } from 'tea-component/lib/modal/ModalShow';
7
9
 
8
10
  interface ModalShowInstance {
9
11
  setVisible: React.Dispatch<React.SetStateAction<boolean>>;
@@ -26,9 +28,8 @@ const ModalShow = forwardRef(function ModalShow(
26
28
  return <Modal {...props} visible={visible} />;
27
29
  });
28
30
 
29
-
30
31
  function show(options: ModalShowOptions): ModalShowHandle {
31
- const el = document.createElement("div");
32
+ const el = document.createElement('div');
32
33
 
33
34
  const instanceRef = React.createRef<ModalShowInstance>();
34
35