@tarojs/components 3.4.5 → 3.5.0-alpha.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 (157) hide show
  1. package/dist/cjs/index-47a1959e.js +34 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/taro-button-core.cjs.entry.js +1 -1
  4. package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
  5. package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
  6. package/dist/cjs/taro-components.cjs.js +1 -1
  7. package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
  9. package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -2
  10. package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +79 -3
  11. package/dist/cjs/taro-picker-view-core.cjs.entry.js +71 -2
  12. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +1 -1
  13. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +5 -13
  14. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -13
  15. package/dist/cjs/taro-tabbar.cjs.entry.js +34 -35
  16. package/dist/cjs/taro-text-core.cjs.entry.js +1 -1
  17. package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -1
  18. package/dist/cjs/taro-video-control_3.cjs.entry.js +102 -115
  19. package/dist/cjs/taro-view-core.cjs.entry.js +1 -1
  20. package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
  21. package/dist/collection/components/button/style/index.css +49 -49
  22. package/dist/collection/components/canvas/canvas.js +1 -1
  23. package/dist/collection/components/canvas/style/index.css +6 -6
  24. package/dist/collection/components/checkbox/style/index.css +21 -22
  25. package/dist/collection/components/image/style/index.css +4 -4
  26. package/dist/collection/components/input/index.css +2 -2
  27. package/dist/collection/components/navigator/navigator.js +2 -2
  28. package/dist/collection/components/navigator/{navigator.css → style/index.css} +3 -3
  29. package/dist/collection/components/picker/style/index.css +2 -1
  30. package/dist/collection/components/picker-view/picker-view-column.js +218 -4
  31. package/dist/collection/components/picker-view/picker-view.js +217 -3
  32. package/dist/collection/components/picker-view/style/column.css +12 -0
  33. package/dist/collection/components/picker-view/style/index.css +28 -0
  34. package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +1 -1
  35. package/dist/collection/components/pull-to-refresh/style/index.css +53 -50
  36. package/dist/collection/components/scroll-view/scroll-view.js +3 -11
  37. package/dist/collection/components/swiper/swiper.js +2 -10
  38. package/dist/collection/components/tabbar/style/index.css +7 -6
  39. package/dist/collection/components/tabbar/tabbar.js +11 -12
  40. package/dist/collection/components/text/style/index.css +0 -6
  41. package/dist/collection/components/textarea/style/index.css +5 -5
  42. package/dist/collection/components/video/style/index.css +89 -109
  43. package/dist/collection/components/video/utils.js +95 -109
  44. package/dist/collection/components/video/video.js +2 -1
  45. package/dist/collection/components/view/style/index.css +3 -5
  46. package/dist/collection/components/web-view/style/index.css +1 -1
  47. package/dist/collection/utils/index.js +23 -83
  48. package/dist/collection/utils/style.js +10 -0
  49. package/dist/collection/utils/url.js +67 -0
  50. package/dist/esm/index-cad8203e.js +31 -0
  51. package/dist/esm/loader.js +1 -1
  52. package/dist/esm/taro-button-core.entry.js +1 -1
  53. package/dist/esm/taro-canvas-core.entry.js +1 -1
  54. package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
  55. package/dist/esm/taro-components.js +1 -1
  56. package/dist/esm/taro-image-core.entry.js +1 -1
  57. package/dist/esm/taro-input-core.entry.js +1 -1
  58. package/dist/esm/taro-navigator-core.entry.js +2 -2
  59. package/dist/esm/taro-picker-view-column-core.entry.js +80 -4
  60. package/dist/esm/taro-picker-view-core.entry.js +72 -3
  61. package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
  62. package/dist/esm/taro-scroll-view-core.entry.js +3 -11
  63. package/dist/esm/taro-swiper-core_2.entry.js +1 -9
  64. package/dist/esm/taro-tabbar.entry.js +34 -35
  65. package/dist/esm/taro-text-core.entry.js +1 -1
  66. package/dist/esm/taro-textarea-core.entry.js +1 -1
  67. package/dist/esm/taro-video-control_3.entry.js +96 -109
  68. package/dist/esm/taro-view-core.entry.js +1 -1
  69. package/dist/esm/taro-web-view-core.entry.js +1 -1
  70. package/dist/esm-es5/index-cad8203e.js +1 -0
  71. package/dist/esm-es5/loader.js +1 -1
  72. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  73. package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
  74. package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
  75. package/dist/esm-es5/taro-components.js +1 -1
  76. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  77. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  78. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  79. package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -1
  80. package/dist/esm-es5/taro-picker-view-core.entry.js +1 -1
  81. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  82. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  83. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  84. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  85. package/dist/esm-es5/taro-text-core.entry.js +1 -1
  86. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  87. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  88. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  89. package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
  90. package/dist/taro-components/{p-4dbed323.entry.js → p-07062966.entry.js} +1 -1
  91. package/dist/taro-components/p-078230a0.system.entry.js +1 -0
  92. package/dist/taro-components/p-08aba8db.system.entry.js +1 -0
  93. package/dist/taro-components/p-08ea5931.system.entry.js +1 -0
  94. package/dist/taro-components/{p-9fc88fc1.system.entry.js → p-0c18bd18.system.entry.js} +1 -1
  95. package/dist/taro-components/{p-17cf8b5b.entry.js → p-1b48afb1.entry.js} +1 -1
  96. package/dist/taro-components/p-1c625d7d.entry.js +1 -0
  97. package/dist/taro-components/p-33ee636a.system.js +1 -1
  98. package/dist/taro-components/p-34188530.system.entry.js +1 -0
  99. package/dist/taro-components/{p-71e14298.entry.js → p-4039bcb5.entry.js} +1 -1
  100. package/dist/taro-components/p-44b60b72.entry.js +1 -0
  101. package/dist/taro-components/p-4aa4de0f.system.entry.js +1 -0
  102. package/dist/taro-components/{p-50066d5e.system.entry.js → p-4cd044c4.system.entry.js} +1 -1
  103. package/dist/taro-components/p-5746d7ce.js +1 -0
  104. package/dist/taro-components/{p-2b0d5c90.system.entry.js → p-58623cdd.system.entry.js} +1 -1
  105. package/dist/taro-components/{p-d041b413.entry.js → p-5c6aeb55.entry.js} +1 -1
  106. package/dist/taro-components/{p-1c1336f5.entry.js → p-5d5baadf.entry.js} +1 -1
  107. package/dist/taro-components/p-663d1bb9.system.js +1 -0
  108. package/dist/taro-components/{p-d567b95e.entry.js → p-758fb1ba.entry.js} +1 -1
  109. package/dist/taro-components/p-786653af.system.entry.js +1 -0
  110. package/dist/taro-components/p-7fdd59f0.entry.js +1 -0
  111. package/dist/taro-components/{p-fd8312e5.system.entry.js → p-8e0150eb.system.entry.js} +1 -1
  112. package/dist/taro-components/p-92a31933.system.entry.js +1 -0
  113. package/dist/taro-components/p-a05d66d1.system.entry.js +1 -0
  114. package/dist/taro-components/p-a1863c96.entry.js +1 -0
  115. package/dist/taro-components/p-aae3e479.entry.js +1 -0
  116. package/dist/taro-components/p-c5a86c19.system.entry.js +1 -0
  117. package/dist/taro-components/p-cc36cee7.entry.js +1 -0
  118. package/dist/taro-components/{p-8bc82aaa.entry.js → p-d0c608a8.entry.js} +1 -1
  119. package/dist/taro-components/{p-293531af.system.entry.js → p-d91ab597.system.entry.js} +1 -1
  120. package/dist/taro-components/{p-fe156231.system.entry.js → p-da8edf69.system.entry.js} +1 -1
  121. package/dist/taro-components/p-e0ad978e.entry.js +1 -0
  122. package/dist/taro-components/p-e35230e0.entry.js +1 -0
  123. package/dist/taro-components/p-e61d2113.system.entry.js +1 -0
  124. package/dist/taro-components/{p-4e54216b.entry.js → p-f5fe8711.entry.js} +1 -1
  125. package/dist/taro-components/taro-components.esm.js +1 -1
  126. package/dist/types/components/picker-view/picker-view-column.d.ts +15 -1
  127. package/dist/types/components/picker-view/picker-view.d.ts +24 -0
  128. package/dist/types/components/scroll-view/scroll-view.d.ts +1 -1
  129. package/dist/types/components/swiper/swiper.d.ts +2 -2
  130. package/dist/types/components/tabbar/tabbar.d.ts +3 -2
  131. package/dist/types/components/video/utils.d.ts +7 -0
  132. package/dist/types/components.d.ts +22 -0
  133. package/dist/types/utils/index.d.ts +4 -8
  134. package/dist/types/utils/style.d.ts +1 -0
  135. package/dist/types/utils/url.d.ts +6 -0
  136. package/package.json +3 -3
  137. package/types/Input.d.ts +5 -4
  138. package/types/PickerViewColumn.d.ts +2 -2
  139. package/types/index.vue3.d.ts +159 -0
  140. package/dist/taro-components/p-32937866.entry.js +0 -1
  141. package/dist/taro-components/p-431197bc.entry.js +0 -1
  142. package/dist/taro-components/p-43de2f12.system.entry.js +0 -1
  143. package/dist/taro-components/p-5ae86835.system.entry.js +0 -1
  144. package/dist/taro-components/p-5c420456.entry.js +0 -1
  145. package/dist/taro-components/p-6de12779.entry.js +0 -1
  146. package/dist/taro-components/p-83dedaa2.entry.js +0 -1
  147. package/dist/taro-components/p-8486c251.system.entry.js +0 -1
  148. package/dist/taro-components/p-95529dc0.entry.js +0 -1
  149. package/dist/taro-components/p-b15d0302.system.entry.js +0 -1
  150. package/dist/taro-components/p-b32442fc.system.entry.js +0 -1
  151. package/dist/taro-components/p-cc818a13.entry.js +0 -1
  152. package/dist/taro-components/p-d394a61f.system.entry.js +0 -1
  153. package/dist/taro-components/p-d5971476.entry.js +0 -1
  154. package/dist/taro-components/p-e0af1d0d.system.entry.js +0 -1
  155. package/dist/taro-components/p-fb2252b7.system.entry.js +0 -1
  156. package/dist/taro-components/p-fd0d1168.system.entry.js +0 -1
  157. package/dist/taro-components/p-fde3a009.system.entry.js +0 -1
@@ -1,11 +1,225 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
- import { Component, h, Host } from '@stencil/core';
2
+ import { Component, h, Host, Element, Prop, Event, Listen } from '@stencil/core';
3
+ import classNames from 'classnames';
4
+ import { convertStyle } from '../../utils';
3
5
  export class PickerView {
6
+ onSelect(e) {
7
+ e.stopPropagation();
8
+ if (e.target.tagName !== 'TARO-PICKER-VIEW-COLUMN-CORE')
9
+ return;
10
+ let _curIndex = +e.detail.curIndex;
11
+ let _selectedIndex = +e.detail.selectedIndex;
12
+ this.value[_curIndex] = _selectedIndex;
13
+ this.onChange.emit({ value: this.value });
14
+ }
15
+ onSelectStart(e) {
16
+ e.stopPropagation();
17
+ if (e.target.tagName !== 'TARO-PICKER-VIEW-COLUMN-CORE')
18
+ return;
19
+ this.onPickStart.emit();
20
+ }
21
+ onPickerColEnd(e) {
22
+ e.stopPropagation();
23
+ if (e.target.tagName !== 'TARO-PICKER-VIEW-COLUMN-CORE')
24
+ return;
25
+ this.onPickEnd.emit();
26
+ }
4
27
  componentDidLoad() {
5
- console.error('H5 暂不支持 PickerView 组件!');
28
+ const childList = this.el.querySelectorAll('taro-picker-view-column-core');
29
+ childList.forEach((element, index) => {
30
+ var _a;
31
+ element.setAttribute('col', `${index}`);
32
+ let selectIndex = '0';
33
+ if (!!this.value && this.value.length > index) {
34
+ selectIndex = `${this.value[index]}`;
35
+ }
36
+ const pickerHeight = this.el.getBoundingClientRect().height;
37
+ const indicatorHeight = ((_a = this.indicator) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;
38
+ const paddingVertical = (pickerHeight - indicatorHeight) / 2.0;
39
+ element.setAttribute('initial-position', `${selectIndex}`);
40
+ element.setAttribute('padding-vertical', `${paddingVertical}`);
41
+ });
42
+ }
43
+ // 过滤非 PickerViewColumn 组件
44
+ componentDidRender() {
45
+ this.el.childNodes.forEach(item => {
46
+ const childEle = item;
47
+ if ('TARO-PICKER-VIEW-COLUMN-CORE' !== childEle.tagName &&
48
+ childEle.className !== 'taro-picker-view-mask-container') {
49
+ this.el.removeChild(item);
50
+ }
51
+ });
6
52
  }
7
53
  render() {
8
- return (h(Host, null));
54
+ const indicatorCls = classNames('taro-picker-view-mask-indicator', this.indicatorClass);
55
+ const maskTopCls = classNames('taro-picker-view-mask-top', this.maskClass);
56
+ const maskBtmCls = classNames('taro-picker-view-mask-bottom', this.maskClass);
57
+ const indicatorStyle = convertStyle(this.indicatorStyle);
58
+ const maskTopStyle = convertStyle(this.maskStyle);
59
+ const maskBottomStyle = convertStyle(this.maskStyle);
60
+ return (h(Host, { class: "taro-picker-view-container" },
61
+ h("slot", null),
62
+ h("div", { class: "taro-picker-view-mask-container" },
63
+ h("div", { class: maskTopCls, style: maskTopStyle }),
64
+ h("div", { class: indicatorCls, style: indicatorStyle, ref: indicator => (this.indicator = indicator) }),
65
+ h("div", { class: maskBtmCls, style: maskBottomStyle }))));
9
66
  }
10
67
  static get is() { return "taro-picker-view-core"; }
68
+ static get originalStyleUrls() { return {
69
+ "$": ["./style/index.scss"]
70
+ }; }
71
+ static get styleUrls() { return {
72
+ "$": ["./style/index.css"]
73
+ }; }
74
+ static get properties() { return {
75
+ "indicatorStyle": {
76
+ "type": "string",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "string",
80
+ "resolved": "string",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": false,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": ""
88
+ },
89
+ "attribute": "indicator-style",
90
+ "reflect": false
91
+ },
92
+ "indicatorClass": {
93
+ "type": "string",
94
+ "mutable": false,
95
+ "complexType": {
96
+ "original": "string",
97
+ "resolved": "string",
98
+ "references": {}
99
+ },
100
+ "required": false,
101
+ "optional": false,
102
+ "docs": {
103
+ "tags": [],
104
+ "text": ""
105
+ },
106
+ "attribute": "indicator-class",
107
+ "reflect": false
108
+ },
109
+ "value": {
110
+ "type": "unknown",
111
+ "mutable": false,
112
+ "complexType": {
113
+ "original": "number[]",
114
+ "resolved": "number[]",
115
+ "references": {}
116
+ },
117
+ "required": false,
118
+ "optional": false,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": ""
122
+ }
123
+ },
124
+ "maskStyle": {
125
+ "type": "string",
126
+ "mutable": false,
127
+ "complexType": {
128
+ "original": "string",
129
+ "resolved": "string",
130
+ "references": {}
131
+ },
132
+ "required": false,
133
+ "optional": false,
134
+ "docs": {
135
+ "tags": [],
136
+ "text": ""
137
+ },
138
+ "attribute": "mask-style",
139
+ "reflect": false
140
+ },
141
+ "maskClass": {
142
+ "type": "string",
143
+ "mutable": false,
144
+ "complexType": {
145
+ "original": "string",
146
+ "resolved": "string",
147
+ "references": {}
148
+ },
149
+ "required": false,
150
+ "optional": false,
151
+ "docs": {
152
+ "tags": [],
153
+ "text": ""
154
+ },
155
+ "attribute": "mask-class",
156
+ "reflect": false
157
+ }
158
+ }; }
159
+ static get events() { return [{
160
+ "method": "onChange",
161
+ "name": "change",
162
+ "bubbles": true,
163
+ "cancelable": true,
164
+ "composed": true,
165
+ "docs": {
166
+ "tags": [],
167
+ "text": ""
168
+ },
169
+ "complexType": {
170
+ "original": "any",
171
+ "resolved": "any",
172
+ "references": {}
173
+ }
174
+ }, {
175
+ "method": "onPickStart",
176
+ "name": "pickstart",
177
+ "bubbles": true,
178
+ "cancelable": true,
179
+ "composed": true,
180
+ "docs": {
181
+ "tags": [],
182
+ "text": ""
183
+ },
184
+ "complexType": {
185
+ "original": "any",
186
+ "resolved": "any",
187
+ "references": {}
188
+ }
189
+ }, {
190
+ "method": "onPickEnd",
191
+ "name": "pickend",
192
+ "bubbles": true,
193
+ "cancelable": true,
194
+ "composed": true,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": ""
198
+ },
199
+ "complexType": {
200
+ "original": "any",
201
+ "resolved": "any",
202
+ "references": {}
203
+ }
204
+ }]; }
205
+ static get elementRef() { return "el"; }
206
+ static get listeners() { return [{
207
+ "name": "onselect",
208
+ "method": "onSelect",
209
+ "target": undefined,
210
+ "capture": false,
211
+ "passive": false
212
+ }, {
213
+ "name": "onselectstart",
214
+ "method": "onSelectStart",
215
+ "target": undefined,
216
+ "capture": false,
217
+ "passive": false
218
+ }, {
219
+ "name": "onselectend",
220
+ "method": "onPickerColEnd",
221
+ "target": undefined,
222
+ "capture": false,
223
+ "passive": false
224
+ }]; }
11
225
  }
@@ -0,0 +1,12 @@
1
+ .taro-picker-view-column-container {
2
+ display: flex;
3
+ overflow: scroll;
4
+ overflow-x: hidden;
5
+ position: relative;
6
+ flex-direction: column;
7
+ flex: 1;
8
+ text-align: center;
9
+ }
10
+ .taro-picker-view-column-container::-webkit-scrollbar {
11
+ display: none;
12
+ }
@@ -0,0 +1,28 @@
1
+ .taro-picker-view-container {
2
+ display: flex;
3
+ position: relative;
4
+ }
5
+ .taro-picker-view-mask-container {
6
+ display: flex;
7
+ position: absolute;
8
+ left: 0;
9
+ right: 0;
10
+ top: 0;
11
+ bottom: 0;
12
+ flex-direction: column;
13
+ pointer-events: none;
14
+ }
15
+ .taro-picker-view-mask-indicator {
16
+ display: flex;
17
+ border-top: 1px solid #ddd;
18
+ border-bottom: 1px solid #ddd;
19
+ height: 50px;
20
+ }
21
+ .taro-picker-view-mask-top {
22
+ flex: 1;
23
+ background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
24
+ }
25
+ .taro-picker-view-mask-bottom {
26
+ flex: 1;
27
+ background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
28
+ }
@@ -246,7 +246,7 @@ export class PullToRefresh {
246
246
  }
247
247
  static get is() { return "taro-pull-to-refresh"; }
248
248
  static get originalStyleUrls() { return {
249
- "$": ["./style/index.css"]
249
+ "$": ["./style/index.scss"]
250
250
  }; }
251
251
  static get styleUrls() { return {
252
252
  "$": ["./style/index.css"]
@@ -1,50 +1,53 @@
1
- .rmc-pull-to-refresh-content {
2
- transform-origin: left top 0px;
3
- }
4
- .rmc-pull-to-refresh-content-wrapper {
5
- overflow: hidden;
6
- min-height: 100vh;
7
- }
8
-
9
- .rmc-pull-to-refresh-transition {
10
- transition: transform 0.3s;
11
- }
12
-
13
-
14
- @keyframes rmc-pull-to-refresh-indicator {
15
- 50% {
16
- opacity: 0.2;
17
- }
18
- 100% {
19
- opacity: 1;
20
- }
21
- }
22
-
23
- .rmc-pull-to-refresh-indicator {
24
- text-align: center;
25
- height: 30px;
26
- line-height: 10px;
27
- }
28
-
29
- .rmc-pull-to-refresh-indicator > div {
30
- background-color: grey;
31
- width: 6px;
32
- height: 6px;
33
- border-radius: 100%;
34
- margin: 3px;
35
- animation-fill-mode: both;
36
- display: inline-block;
37
- animation: rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;
38
- }
39
- .rmc-pull-to-refresh-indicator > div:nth-child(0) {
40
- animation-delay: -0.1s !important;
41
- }
42
- .rmc-pull-to-refresh-indicator > div:nth-child(1) {
43
- animation-delay: -0.2s !important;
44
- }
45
- .rmc-pull-to-refresh-indicator > div:nth-child(2) {
46
- animation-delay: -0.3s !important;
47
- }
48
- .rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator {
49
- margin-top: -25px;
50
- }
1
+ .rmc-pull-to-refresh-content {
2
+ transform-origin: left top 0;
3
+ }
4
+
5
+ .rmc-pull-to-refresh-content-wrapper {
6
+ overflow: hidden;
7
+ min-height: 100vh;
8
+ }
9
+
10
+ .rmc-pull-to-refresh-transition {
11
+ transition: transform 0.3s;
12
+ }
13
+
14
+ @keyframes rmc-pull-to-refresh-indicator {
15
+ 50% {
16
+ opacity: 0.2;
17
+ }
18
+ 100% {
19
+ opacity: 1;
20
+ }
21
+ }
22
+ .rmc-pull-to-refresh-indicator {
23
+ height: 30px;
24
+ line-height: 10px;
25
+ text-align: center;
26
+ }
27
+
28
+ .rmc-pull-to-refresh-indicator > div {
29
+ display: inline-block;
30
+ margin: 3px;
31
+ border-radius: 100%;
32
+ width: 6px;
33
+ height: 6px;
34
+ background-color: grey;
35
+ animation: rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;
36
+ animation-fill-mode: both;
37
+ }
38
+
39
+ .rmc-pull-to-refresh-indicator > div:nth-child(0) {
40
+ animation-delay: -0.1s !important;
41
+ }
42
+
43
+ .rmc-pull-to-refresh-indicator > div:nth-child(1) {
44
+ animation-delay: -0.2s !important;
45
+ }
46
+
47
+ .rmc-pull-to-refresh-indicator > div:nth-child(2) {
48
+ animation-delay: -0.3s !important;
49
+ }
50
+
51
+ .rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator {
52
+ margin-top: -25px;
53
+ }
@@ -1,6 +1,7 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
2
  import { Component, h, Prop, Event, Watch, Element, Host } from '@stencil/core';
3
3
  import classNames from 'classnames';
4
+ import { debounce } from '../../utils';
4
5
  function easeOutScroll(from, to, callback) {
5
6
  if (from === to || typeof from !== 'number') {
6
7
  return;
@@ -23,15 +24,6 @@ function easeOutScroll(from, to, callback) {
23
24
  }
24
25
  step();
25
26
  }
26
- function debounce(fn, delay) {
27
- let timer;
28
- return function (...arrs) {
29
- clearTimeout(timer);
30
- timer = setTimeout(function () {
31
- fn(...arrs);
32
- }, delay);
33
- };
34
- }
35
27
  export class ScrollView {
36
28
  constructor() {
37
29
  this.scrollX = false;
@@ -45,7 +37,7 @@ export class ScrollView {
45
37
  const { scrollLeft, scrollTop, scrollHeight, scrollWidth } = this.el;
46
38
  this._scrollLeft = scrollLeft;
47
39
  this._scrollTop = scrollTop;
48
- this.uperAndLower();
40
+ this.upperAndLower();
49
41
  this.onScroll.emit({
50
42
  scrollLeft,
51
43
  scrollTop,
@@ -53,7 +45,7 @@ export class ScrollView {
53
45
  scrollWidth
54
46
  });
55
47
  };
56
- this.uperAndLower = debounce(() => {
48
+ this.upperAndLower = debounce(() => {
57
49
  const { offsetWidth, offsetHeight, scrollLeft, scrollTop, scrollHeight, scrollWidth } = this.el;
58
50
  const lowerThreshold = Number(this.lowerThreshold);
59
51
  const upperThreshold = Number(this.upperThreshold);
@@ -1,7 +1,8 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
2
  import { Component, h, Prop, Event, Watch, Host, Element, State } from '@stencil/core';
3
- import SwiperJS from 'swiper/swiper-bundle.esm.js';
4
3
  import classNames from 'classnames';
4
+ import SwiperJS from 'swiper/swiper-bundle.esm.js';
5
+ import { debounce } from '../../utils';
5
6
  let INSTANCE_ID = 0;
6
7
  export class Swiper {
7
8
  constructor() {
@@ -588,12 +589,3 @@ export class Swiper {
588
589
  "methodName": "watchCircular"
589
590
  }]; }
590
591
  }
591
- function debounce(fn, delay) {
592
- let timer;
593
- return function (...arrs) {
594
- clearTimeout(timer);
595
- timer = setTimeout(function () {
596
- fn(...arrs);
597
- }, delay);
598
- };
599
- }
@@ -1,4 +1,5 @@
1
- html, body {
1
+ html,
2
+ body {
2
3
  height: 100%;
3
4
  }
4
5
 
@@ -11,20 +12,20 @@ html, body {
11
12
  }
12
13
  .taro-tabbar__container {
13
14
  display: flex;
14
- height: 100%;
15
- flex-direction: column;
16
15
  overflow: hidden;
16
+ flex-direction: column;
17
+ height: 100%;
17
18
  }
18
19
  .taro-tabbar__panel {
19
- flex: 1;
20
- position: relative;
21
20
  overflow: auto;
21
+ position: relative;
22
+ flex: 1;
22
23
  -webkit-overflow-scrolling: auto;
23
24
  }
24
25
  .taro-tabbar__tabbar {
25
26
  position: relative;
26
- height: 50px;
27
27
  width: 100%;
28
+ height: 50px;
28
29
  transition: bottom 0.2s, top 0.2s;
29
30
  }
30
31
  .taro-tabbar__tabbar-top {
@@ -6,9 +6,10 @@ import { splitUrl } from '../../utils';
6
6
  import { TabbarItem } from './tabbar-item';
7
7
  // const removeLeadingSlash = str => str.replace(/^\.?\//, '')
8
8
  // const removeTrailingSearch = str => str.replace(/\?[\s\S]*$/, '')
9
- const addLeadingSlash = str => str[0] === '/' ? str : `/${str}`;
10
- const hasBasename = (path, prefix) => new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
11
- const stripBasename = (path, prefix) => hasBasename(path, prefix) ? path.substr(prefix.length) : path;
9
+ const addLeadingSlash = (str = '') => str[0] === '/' ? str : `/${str}`;
10
+ const hasBasename = (path = '', prefix = '') => new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
11
+ const stripBasename = (path = '', prefix = '') => hasBasename(path, prefix) ? path.substr(prefix.length) : path;
12
+ const stripSuffix = (path = '', suffix = '') => path.includes(suffix) ? path.substring(0, path.length - suffix.length) : path;
12
13
  const STATUS_SHOW = 0;
13
14
  const STATUS_HIDE = 1;
14
15
  const STATUS_SLIDEOUT = 2;
@@ -28,7 +29,7 @@ export class Tabbar {
28
29
  const pathB = splitUrl(url).path;
29
30
  return pathA === pathB;
30
31
  });
31
- return customRoute.length ? customRoute[0][0] : url;
32
+ return stripSuffix(customRoute.length ? customRoute[0][0] : url, '.html');
32
33
  };
33
34
  this.getSelectedIndex = (url) => {
34
35
  let foundIndex = -1;
@@ -64,14 +65,12 @@ export class Tabbar {
64
65
  }
65
66
  };
66
67
  this.routerChangeHandler = (options) => {
67
- let toLocation;
68
+ var _a;
69
+ const to = (_a = options === null || options === void 0 ? void 0 : options.toLocation) === null || _a === void 0 ? void 0 : _a.path;
68
70
  let currentPage;
69
- if (options) {
70
- toLocation = options.toLocation;
71
- }
72
- if (toLocation && toLocation.path) {
73
- const tmpPath = addLeadingSlash(toLocation.path);
74
- currentPage = stripBasename(tmpPath === '/' ? this.homePage : tmpPath, this.conf.basename || '/');
71
+ if (typeof to === 'string') {
72
+ const routerBasename = this.conf.basename || '/';
73
+ currentPage = stripBasename(addLeadingSlash(to || this.homePage), routerBasename);
75
74
  }
76
75
  else {
77
76
  currentPage = this.getCurrentUrl();
@@ -230,7 +229,7 @@ export class Tabbar {
230
229
  url = location.pathname;
231
230
  }
232
231
  const processedUrl = addLeadingSlash(stripBasename(url, routerBasename));
233
- return processedUrl === '/' ? this.homePage : processedUrl;
232
+ return decodeURI(processedUrl === '/' ? this.homePage : processedUrl);
234
233
  }
235
234
  bindEvent() {
236
235
  Taro.eventCenter.on('__taroRouterChange', this.routerChangeHandler);
@@ -1,15 +1,9 @@
1
1
  taro-text-core {
2
2
  display: inline;
3
- -moz-user-select: none;
4
- -webkit-user-select: none;
5
- -ms-user-select: none;
6
3
  user-select: none;
7
4
  white-space: pre-wrap;
8
5
  }
9
6
 
10
7
  .taro-text__selectable {
11
- -moz-user-select: text;
12
- -webkit-user-select: text;
13
- -ms-user-select: text;
14
8
  user-select: text;
15
9
  }
@@ -8,13 +8,13 @@ taro-textarea-core .auto-height {
8
8
  }
9
9
 
10
10
  .taro-textarea {
11
- -webkit-appearance: none;
12
- cursor: auto;
13
- width: 100%;
14
- height: 150px;
15
- border: 0;
16
11
  display: block;
17
12
  position: relative;
13
+ border: 0;
14
+ width: 100%;
15
+ height: 150px;
16
+ appearance: none;
17
+ cursor: auto;
18
18
  line-height: 1.5;
19
19
  }
20
20
  .taro-textarea:focus {