@tarojs/components 3.6.0-canary.7 → 3.6.0-canary.9
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.
- package/dist/cjs/taro-tabbar.cjs.entry.js.map +1 -1
- package/dist/esm/taro-tabbar.entry.js.map +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js.map +1 -1
- package/dist/react/component-lib/index.js +20 -10
- package/dist/react/component-lib/input.js +2 -3
- package/dist/react/component-lib/reactify-wc.js +6 -43
- package/dist/react/components.js +0 -2
- package/dist/react/react-component-lib/createComponent.js +9 -29
- package/dist/react/react-component-lib/createOverlayComponent.js +2 -29
- package/dist/react/react-component-lib/utils/attachProps.js +9 -18
- package/dist/react/react-component-lib/utils/index.js +0 -2
- package/dist/taro-components/p-49a6cae4.system.entry.js.map +1 -1
- package/dist/taro-components/p-e0d6b00b.entry.js.map +1 -1
- package/dist/vue2/component-lib/components.js +22 -11
- package/dist/vue2/component-lib/createFormsComponent.js +0 -5
- package/dist/vue2/component-lib/index.js +6 -8
- package/dist/vue2/component-lib/mixins/refs.js +0 -5
- package/dist/vue2/components.js +0 -3
- package/dist/vue2/index.js +3 -7
- package/dist/vue2/vue-component-lib/utils.js +0 -1
- package/dist/vue3/component-lib/createComponent.js +1 -1
- package/dist/vue3/component-lib/createFormsComponent.js +3 -8
- package/dist/vue3/component-lib/forwardRef.js +0 -2
- package/dist/vue3/component-lib/icon.js +2 -2
- package/dist/vue3/component-lib/image.js +2 -2
- package/dist/vue3/component-lib/index.js +22 -11
- package/dist/vue3/component-lib/scroll-view.js +2 -2
- package/dist/vue3/component-lib/text.js +2 -2
- package/dist/vue3/components.js +0 -2
- package/dist/vue3/index.js +2 -4
- package/dist/vue3/vue-component-lib/utils.js +7 -29
- package/package.json +4 -4
- package/types/Button.d.ts +1 -1
- package/types/Camera.d.ts +1 -1
- package/types/Checkbox.d.ts +1 -1
- package/types/CheckboxGroup.d.ts +1 -1
- package/types/CoverImage.d.ts +1 -1
- package/types/CustomWrapper.d.ts +1 -0
- package/types/Form.d.ts +1 -1
- package/types/Icon.d.ts +1 -1
- package/types/Image.d.ts +1 -1
- package/types/Input.d.ts +15 -1
- package/types/Label.d.ts +1 -1
- package/types/NativeSlot.d.ts +1 -0
- package/types/NavigationBar.d.ts +2 -1
- package/types/Navigator.d.ts +1 -1
- package/types/Picker.d.ts +1 -1
- package/types/PickerView.d.ts +1 -1
- package/types/PickerViewColumn.d.ts +1 -1
- package/types/Progress.d.ts +1 -1
- package/types/Radio.d.ts +1 -1
- package/types/RadioGroup.d.ts +1 -1
- package/types/RichText.d.ts +1 -1
- package/types/ScrollView.d.ts +1 -1
- package/types/ShareElement.d.ts +3 -3
- package/types/Slider.d.ts +1 -1
- package/types/Slot.d.ts +2 -1
- package/types/Swiper.d.ts +1 -1
- package/types/SwiperItem.d.ts +1 -1
- package/types/Switch.d.ts +1 -1
- package/types/Textarea.d.ts +1 -1
- package/types/Video.d.ts +1 -1
- package/types/View.d.ts +1 -1
- package/types/WebView.d.ts +1 -1
- package/virtual-list/index.js +3 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import createComponent from './createComponent';
|
|
2
|
-
import createFormsComponent from './createFormsComponent';
|
|
2
|
+
import createFormsComponent from './createFormsComponent';
|
|
3
3
|
|
|
4
|
+
// 视图容器
|
|
4
5
|
export var CoverImage = createComponent('taro-cover-image');
|
|
5
6
|
export var CoverView = createComponent('taro-cover-view');
|
|
6
7
|
export var MatchMedia = createComponent('taro-match-media');
|
|
@@ -12,13 +13,15 @@ export { default as ScrollView } from './scroll-view';
|
|
|
12
13
|
export var ShareElement = createComponent('taro-share-element');
|
|
13
14
|
export var Swiper = createComponent('taro-swiper');
|
|
14
15
|
export var SwiperItem = createComponent('taro-swiper-item', ['swiper-slide']);
|
|
15
|
-
export var View = createComponent('taro-view');
|
|
16
|
+
export var View = createComponent('taro-view');
|
|
16
17
|
|
|
18
|
+
// 基础内容
|
|
17
19
|
export { default as Icon } from './icon';
|
|
18
20
|
export var Progress = createComponent('taro-progress', ['weui-progress']);
|
|
19
21
|
export var RichText = createComponent('taro-rich-text');
|
|
20
|
-
export { default as Text } from './text';
|
|
22
|
+
export { default as Text } from './text';
|
|
21
23
|
|
|
24
|
+
// 表单组件
|
|
22
25
|
export var Button = createComponent('taro-button');
|
|
23
26
|
export var Checkbox = createComponent('taro-checkbox', ['weui-cells_checkbox']);
|
|
24
27
|
export var CheckboxGroup = createComponent('taro-checkbox-group');
|
|
@@ -34,32 +37,40 @@ export var Radio = createComponent('taro-radio', ['weui-cells_checkbox']);
|
|
|
34
37
|
export var RadioGroup = createComponent('taro-radio-group', ['weui-cells_radiogroup']);
|
|
35
38
|
export var Slider = createFormsComponent('taro-slider', 'change', 'value', ['weui-slider-box']);
|
|
36
39
|
export var Switch = createFormsComponent('taro-switch', 'change', 'checked');
|
|
37
|
-
export var Textarea = createFormsComponent('taro-textarea', 'input');
|
|
40
|
+
export var Textarea = createFormsComponent('taro-textarea', 'input');
|
|
38
41
|
|
|
42
|
+
// 导航
|
|
39
43
|
export var FunctionalPageNavigator = createComponent('taro-functional-page-navigator');
|
|
40
|
-
export var Navigator = createComponent('taro-navigator');
|
|
44
|
+
export var Navigator = createComponent('taro-navigator');
|
|
41
45
|
|
|
46
|
+
// 媒体组件
|
|
42
47
|
export var Audio = createComponent('taro-audio');
|
|
43
48
|
export var Camera = createComponent('taro-camera');
|
|
44
49
|
export { default as Image } from './image';
|
|
45
50
|
export var LivePlayer = createComponent('taro-live-player');
|
|
46
51
|
export var Video = createComponent('taro-video', ['taro-video-container']);
|
|
47
|
-
export var VoipRoom = createComponent('taro-voip-room');
|
|
52
|
+
export var VoipRoom = createComponent('taro-voip-room');
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
// 地图
|
|
55
|
+
export var Map = createComponent('taro-map');
|
|
50
56
|
|
|
51
|
-
|
|
57
|
+
// 画布
|
|
58
|
+
export var Canvas = createComponent('taro-canvas');
|
|
52
59
|
|
|
60
|
+
// 开放能力
|
|
53
61
|
export var WebView = createComponent('taro-web-view');
|
|
54
62
|
export var Ad = createComponent('taro-ad');
|
|
55
63
|
export var AdCustom = createComponent('taro-ad-custom');
|
|
56
64
|
export var OfficialAccount = createComponent('taro-official-account');
|
|
57
|
-
export var OpenData = createComponent('taro-open-data');
|
|
65
|
+
export var OpenData = createComponent('taro-open-data');
|
|
58
66
|
|
|
59
|
-
|
|
67
|
+
// 导航栏
|
|
68
|
+
export var NavigationBar = createComponent('taro-navigation-bar');
|
|
60
69
|
|
|
61
|
-
|
|
70
|
+
// 页面属性配置节点
|
|
71
|
+
export var PageMeta = createComponent('taro-page-meta');
|
|
62
72
|
|
|
73
|
+
// 其他
|
|
63
74
|
export var Block = createComponent('taro-block');
|
|
64
75
|
export var CustomWrapper = createComponent('taro-custom-wrapper');
|
|
65
76
|
export var Slot = createComponent('taro-slot');
|
|
@@ -4,8 +4,8 @@ export default {
|
|
|
4
4
|
emits: ['tap', 'scroll'],
|
|
5
5
|
setup: function setup(__props, _ref) {
|
|
6
6
|
var slots = _ref.slots,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
emit = _ref.emit,
|
|
8
|
+
attrs = _ref.attrs;
|
|
9
9
|
var forwardRef = useForwardRef();
|
|
10
10
|
return function () {
|
|
11
11
|
return h('taro-scroll-view-core', {
|
|
@@ -4,8 +4,8 @@ export default {
|
|
|
4
4
|
emits: ['tap'],
|
|
5
5
|
setup: function setup(__props, _ref) {
|
|
6
6
|
var slots = _ref.slots,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
emit = _ref.emit,
|
|
8
|
+
attrs = _ref.attrs;
|
|
9
9
|
var forwardRef = useForwardRef();
|
|
10
10
|
return function () {
|
|
11
11
|
return h('taro-text-core', {
|
package/dist/vue3/components.js
CHANGED
package/dist/vue3/index.js
CHANGED
|
@@ -4,12 +4,10 @@ export function initVue3Components(app) {
|
|
|
4
4
|
app.config.isCustomElement = function (tag) {
|
|
5
5
|
return /^taro-/.test(tag) || tag === 'root' || tag === 'block';
|
|
6
6
|
};
|
|
7
|
-
|
|
8
7
|
Object.entries(components).forEach(function (_ref) {
|
|
9
8
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
name = _ref2[0],
|
|
10
|
+
component = _ref2[1];
|
|
13
11
|
if (component) {
|
|
14
12
|
var tagName = 'taro' + name.replace(new RegExp('([A-Z])', 'g'), '-$1').toLowerCase();
|
|
15
13
|
app.component(tagName, component);
|
|
@@ -7,6 +7,7 @@ var MODEL_VALUE = 'modelValue';
|
|
|
7
7
|
var ROUTER_LINK_VALUE = 'routerLink';
|
|
8
8
|
var NAV_MANAGER = 'navManager';
|
|
9
9
|
var ROUTER_PROP_PREFIX = 'router';
|
|
10
|
+
|
|
10
11
|
/**
|
|
11
12
|
* Starting in Vue 3.1.0, all properties are
|
|
12
13
|
* added as keys to the props object, even if
|
|
@@ -16,24 +17,21 @@ var ROUTER_PROP_PREFIX = 'router';
|
|
|
16
17
|
* and then check if it is not undefined for Vue >= 3.1.0.
|
|
17
18
|
* See https://github.com/vuejs/vue-next/issues/3889
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
20
|
var EMPTY_PROP = Symbol();
|
|
21
21
|
var DEFAULT_EMPTY_PROP = {
|
|
22
22
|
default: EMPTY_PROP
|
|
23
23
|
};
|
|
24
|
-
|
|
25
24
|
var getComponentClasses = function getComponentClasses(classes) {
|
|
26
25
|
return (classes === null || classes === void 0 ? void 0 : classes.split(' ')) || [];
|
|
27
26
|
};
|
|
28
|
-
|
|
29
27
|
var getElementClasses = function getElementClasses(ref, componentClasses) {
|
|
30
28
|
var _ref$value;
|
|
31
|
-
|
|
32
29
|
var defaultClasses = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
33
30
|
return [].concat(_toConsumableArray(Array.from(((_ref$value = ref.value) === null || _ref$value === void 0 ? void 0 : _ref$value.classList) || [])), _toConsumableArray(defaultClasses)).filter(function (c, i, self) {
|
|
34
31
|
return !componentClasses.has(c) && self.indexOf(c) === i;
|
|
35
32
|
});
|
|
36
33
|
};
|
|
34
|
+
|
|
37
35
|
/**
|
|
38
36
|
* Create a callback to define a Vue component wrapper around a Web Component.
|
|
39
37
|
*
|
|
@@ -48,33 +46,28 @@ var getElementClasses = function getElementClasses(ref, componentClasses) {
|
|
|
48
46
|
* @prop externalModelUpdateEvent - The external event to fire from your Vue component when modelUpdateEvent fires. This is used for ensuring that v-model references have been
|
|
49
47
|
* correctly updated when a user's event callback fires.
|
|
50
48
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
49
|
export var defineContainer = function defineContainer(name, defineCustomElement) {
|
|
54
50
|
var componentProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
55
51
|
var modelProp = arguments.length > 3 ? arguments[3] : undefined;
|
|
56
52
|
var modelUpdateEvent = arguments.length > 4 ? arguments[4] : undefined;
|
|
57
53
|
var externalModelUpdateEvent = arguments.length > 5 ? arguments[5] : undefined;
|
|
58
|
-
|
|
59
54
|
/**
|
|
60
55
|
* Create a Vue component wrapper around a Web Component.
|
|
61
56
|
* Note: The `props` here are not all properties on a component.
|
|
62
57
|
* They refer to whatever properties are set on an instance of a component.
|
|
63
58
|
*/
|
|
59
|
+
|
|
64
60
|
if (defineCustomElement !== undefined) {
|
|
65
61
|
defineCustomElement();
|
|
66
62
|
}
|
|
67
|
-
|
|
68
63
|
var Container = defineComponent(function (props, _ref) {
|
|
69
64
|
var _currentInstance$appC;
|
|
70
|
-
|
|
71
65
|
var attrs = _ref.attrs,
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
slots = _ref.slots,
|
|
67
|
+
emit = _ref.emit;
|
|
74
68
|
var modelPropValue = props[modelProp];
|
|
75
69
|
var containerRef = ref();
|
|
76
70
|
var classes = new Set(getComponentClasses(attrs.class));
|
|
77
|
-
|
|
78
71
|
var onVnodeBeforeMount = function onVnodeBeforeMount(vnode) {
|
|
79
72
|
// Add a listener to tell Vue to update the v-model
|
|
80
73
|
if (vnode.el) {
|
|
@@ -83,6 +76,7 @@ export var defineContainer = function defineContainer(name, defineCustomElement)
|
|
|
83
76
|
vnode.el.addEventListener(eventName.toLowerCase(), function (e) {
|
|
84
77
|
modelPropValue = (e === null || e === void 0 ? void 0 : e.target)[modelProp];
|
|
85
78
|
emit(UPDATE_VALUE_EVENT, modelPropValue);
|
|
79
|
+
|
|
86
80
|
/**
|
|
87
81
|
* We need to emit the change event here
|
|
88
82
|
* rather than on the web component to ensure
|
|
@@ -91,7 +85,6 @@ export var defineContainer = function defineContainer(name, defineCustomElement)
|
|
|
91
85
|
* native web component, but the v-model will
|
|
92
86
|
* not have been updated yet.
|
|
93
87
|
*/
|
|
94
|
-
|
|
95
88
|
if (externalModelUpdateEvent) {
|
|
96
89
|
emit(externalModelUpdateEvent, e);
|
|
97
90
|
}
|
|
@@ -99,72 +92,60 @@ export var defineContainer = function defineContainer(name, defineCustomElement)
|
|
|
99
92
|
});
|
|
100
93
|
}
|
|
101
94
|
};
|
|
102
|
-
|
|
103
95
|
var currentInstance = getCurrentInstance();
|
|
104
96
|
var hasRouter = currentInstance === null || currentInstance === void 0 ? void 0 : (_currentInstance$appC = currentInstance.appContext) === null || _currentInstance$appC === void 0 ? void 0 : _currentInstance$appC.provides[NAV_MANAGER];
|
|
105
97
|
var navManager = hasRouter ? inject(NAV_MANAGER) : undefined;
|
|
106
|
-
|
|
107
98
|
var handleRouterLink = function handleRouterLink(ev) {
|
|
108
99
|
var routerLink = props.routerLink;
|
|
109
100
|
if (routerLink === EMPTY_PROP) return;
|
|
110
|
-
|
|
111
101
|
if (navManager !== undefined) {
|
|
112
102
|
var navigationPayload = {
|
|
113
103
|
event: ev
|
|
114
104
|
};
|
|
115
|
-
|
|
116
105
|
for (var key in props) {
|
|
117
106
|
var value = props[key];
|
|
118
|
-
|
|
119
107
|
if (props.hasOwnProperty(key) && key.startsWith(ROUTER_PROP_PREFIX) && value !== EMPTY_PROP) {
|
|
120
108
|
navigationPayload[key] = value;
|
|
121
109
|
}
|
|
122
110
|
}
|
|
123
|
-
|
|
124
111
|
navManager.navigate(navigationPayload);
|
|
125
112
|
} else {
|
|
126
113
|
console.warn('Tried to navigate, but no router was found. Make sure you have mounted Vue Router.');
|
|
127
114
|
}
|
|
128
115
|
};
|
|
129
|
-
|
|
130
116
|
return function () {
|
|
131
117
|
modelPropValue = props[modelProp];
|
|
132
118
|
getComponentClasses(attrs.class).forEach(function (value) {
|
|
133
119
|
classes.add(value);
|
|
134
120
|
});
|
|
135
121
|
var oldClick = props.onClick;
|
|
136
|
-
|
|
137
122
|
var handleClick = function handleClick(ev) {
|
|
138
123
|
if (oldClick !== undefined) {
|
|
139
124
|
oldClick(ev);
|
|
140
125
|
}
|
|
141
|
-
|
|
142
126
|
if (!ev.defaultPrevented) {
|
|
143
127
|
handleRouterLink(ev);
|
|
144
128
|
}
|
|
145
129
|
};
|
|
146
|
-
|
|
147
130
|
var propsToAdd = {
|
|
148
131
|
ref: containerRef,
|
|
149
132
|
class: getElementClasses(containerRef, classes),
|
|
150
133
|
onClick: handleClick,
|
|
151
134
|
onVnodeBeforeMount: modelUpdateEvent ? onVnodeBeforeMount : undefined
|
|
152
135
|
};
|
|
136
|
+
|
|
153
137
|
/**
|
|
154
138
|
* We can use Object.entries here
|
|
155
139
|
* to avoid the hasOwnProperty check,
|
|
156
140
|
* but that would require 2 iterations
|
|
157
141
|
* where as this only requires 1.
|
|
158
142
|
*/
|
|
159
|
-
|
|
160
143
|
for (var key in props) {
|
|
161
144
|
var value = props[key];
|
|
162
|
-
|
|
163
145
|
if (props.hasOwnProperty(key) && value !== EMPTY_PROP) {
|
|
164
146
|
propsToAdd[key] = value;
|
|
165
147
|
}
|
|
166
148
|
}
|
|
167
|
-
|
|
168
149
|
if (modelProp) {
|
|
169
150
|
/**
|
|
170
151
|
* If form value property was set using v-model
|
|
@@ -178,7 +159,6 @@ export var defineContainer = function defineContainer(name, defineCustomElement)
|
|
|
178
159
|
propsToAdd = _objectSpread(_objectSpread({}, propsToAdd), {}, _defineProperty({}, modelProp, modelPropValue));
|
|
179
160
|
}
|
|
180
161
|
}
|
|
181
|
-
|
|
182
162
|
return h(name, propsToAdd, slots.default && slots.default());
|
|
183
163
|
};
|
|
184
164
|
});
|
|
@@ -187,11 +167,9 @@ export var defineContainer = function defineContainer(name, defineCustomElement)
|
|
|
187
167
|
componentProps.forEach(function (componentProp) {
|
|
188
168
|
Container.props[componentProp] = DEFAULT_EMPTY_PROP;
|
|
189
169
|
});
|
|
190
|
-
|
|
191
170
|
if (modelProp) {
|
|
192
171
|
Container.props[MODEL_VALUE] = DEFAULT_EMPTY_PROP;
|
|
193
172
|
Container.emits = [UPDATE_VALUE_EVENT, externalModelUpdateEvent];
|
|
194
173
|
}
|
|
195
|
-
|
|
196
174
|
return Container;
|
|
197
175
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components",
|
|
3
|
-
"version": "3.6.0-canary.
|
|
3
|
+
"version": "3.6.0-canary.9",
|
|
4
4
|
"description": "Taro 组件库",
|
|
5
5
|
"browser": "dist/index.js",
|
|
6
6
|
"main:h5": "dist/index.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"resolve-pathname": "^3.0.0",
|
|
36
36
|
"swiper": "6.8.0",
|
|
37
37
|
"weui": "^1.1.2",
|
|
38
|
-
"@tarojs/components-advanced": "3.6.0-canary.
|
|
39
|
-
"@tarojs/router": "3.6.0-canary.
|
|
40
|
-
"@tarojs/taro": "3.6.0-canary.
|
|
38
|
+
"@tarojs/components-advanced": "3.6.0-canary.9",
|
|
39
|
+
"@tarojs/router": "3.6.0-canary.9",
|
|
40
|
+
"@tarojs/taro": "3.6.0-canary.9"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/generator": "^7.14.5",
|
package/types/Button.d.ts
CHANGED
|
@@ -526,7 +526,7 @@ declare namespace ButtonProps {
|
|
|
526
526
|
|
|
527
527
|
/** 按钮
|
|
528
528
|
* @classification forms
|
|
529
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
529
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
530
530
|
* @example_react
|
|
531
531
|
* ```tsx
|
|
532
532
|
* export default class PageButton extends Component {
|
package/types/Camera.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ declare namespace CameraProps {
|
|
|
149
149
|
|
|
150
150
|
/** 系统相机
|
|
151
151
|
* @classification media
|
|
152
|
-
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
152
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn, harmony
|
|
153
153
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/camera.html
|
|
154
154
|
*/
|
|
155
155
|
declare const Camera: ComponentType<CameraProps>
|
package/types/Checkbox.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ interface CheckboxProps extends StandardProps {
|
|
|
43
43
|
|
|
44
44
|
/** 多选项目
|
|
45
45
|
* @classification forms
|
|
46
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
46
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
47
47
|
* @example_react
|
|
48
48
|
* ```tsx
|
|
49
49
|
* export default class PageCheckbox extends Component {
|
package/types/CheckboxGroup.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ interface CheckboxGroupProps extends StandardProps, FormItemProps {
|
|
|
16
16
|
|
|
17
17
|
/** 多项选择器,内部由多个checkbox组成
|
|
18
18
|
* @classification forms
|
|
19
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
19
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
20
20
|
* @example
|
|
21
21
|
* ```tsx
|
|
22
22
|
* export default class PageCheckbox extends Component {
|
package/types/CoverImage.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ interface CoverImageProps extends StandardProps {
|
|
|
59
59
|
|
|
60
60
|
/** 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。
|
|
61
61
|
* @classification viewContainer
|
|
62
|
-
* @supported weapp, alipay, swan, qq, h5
|
|
62
|
+
* @supported weapp, alipay, swan, qq, h5, harmony
|
|
63
63
|
* @example_react
|
|
64
64
|
* ```tsx
|
|
65
65
|
* // js
|
package/types/CustomWrapper.d.ts
CHANGED
package/types/Form.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare namespace FormProps {
|
|
|
66
66
|
*
|
|
67
67
|
* 当点击 form 表单中 form-type 为 submit 的 button 组件时,会将表单组件中的 value 值进行提交,需要在表单组件中加上 name 来作为 key。
|
|
68
68
|
* @classification forms
|
|
69
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
69
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
70
70
|
* @example_react
|
|
71
71
|
* ```tsx
|
|
72
72
|
* class App extends Component {
|
package/types/Icon.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ declare namespace IconProps {
|
|
|
62
62
|
|
|
63
63
|
/** 图标。组件属性的长度单位默认为 px
|
|
64
64
|
* @classification base
|
|
65
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
65
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
66
66
|
* @example_react
|
|
67
67
|
* ```tsx
|
|
68
68
|
* export default class PageView extends Component {
|
package/types/Image.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ declare namespace ImageProps {
|
|
|
155
155
|
*
|
|
156
156
|
* **Note:** 为实现小程序的 `mode` 特性,在 H5 组件中使用一个 `div` 容器来对内部的 `img` 进行展示区域的裁剪,因此请勿使用元素选择器来重置 `img` 的样式!
|
|
157
157
|
* @classification media
|
|
158
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
158
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
159
159
|
* @example_react
|
|
160
160
|
* ```tsx
|
|
161
161
|
* export default class PageView extends Component {
|
package/types/Input.d.ts
CHANGED
|
@@ -231,52 +231,66 @@ declare namespace InputProps {
|
|
|
231
231
|
* @supported weapp, alipay, h5, rn
|
|
232
232
|
*/
|
|
233
233
|
text
|
|
234
|
+
|
|
234
235
|
/** 数字输入键盘
|
|
235
236
|
* @supported weapp, alipay, h5, rn
|
|
236
237
|
*/
|
|
237
238
|
number
|
|
239
|
+
|
|
238
240
|
/** 身份证输入键盘
|
|
239
241
|
*@supported weapp, alipay, rn
|
|
240
242
|
*/
|
|
241
243
|
idcard
|
|
244
|
+
|
|
242
245
|
/** 带小数点的数字键盘
|
|
243
246
|
* @supported weapp, alipay, h5, rn
|
|
244
247
|
*/
|
|
245
248
|
digit
|
|
249
|
+
|
|
246
250
|
/** 密码安全输入键盘[指引](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/safe-password.html)
|
|
247
251
|
* @supported weapp, alipay
|
|
248
252
|
*/
|
|
249
253
|
'safe-password'
|
|
254
|
+
|
|
250
255
|
/** 昵称输入键盘
|
|
251
256
|
* @supported weapp, alipay
|
|
252
257
|
*/
|
|
253
258
|
nickname
|
|
259
|
+
|
|
254
260
|
/** 数字输入键盘
|
|
255
261
|
* @supported alipay
|
|
256
262
|
*/
|
|
257
263
|
numberpad
|
|
264
|
+
|
|
258
265
|
/** 带小数点的数字键盘
|
|
259
266
|
* @supported alipay
|
|
260
267
|
*/
|
|
261
268
|
digitpad
|
|
269
|
+
|
|
262
270
|
/** 身份证输入键盘
|
|
263
271
|
* @supported alipay
|
|
264
272
|
*/
|
|
265
273
|
idcardpad
|
|
266
274
|
}
|
|
275
|
+
|
|
267
276
|
/** Confirm 类型 */
|
|
268
277
|
interface ConfirmType {
|
|
269
278
|
/** 右下角按钮为“发送” */
|
|
270
279
|
send
|
|
280
|
+
|
|
271
281
|
/** 右下角按钮为“搜索” */
|
|
272
282
|
search
|
|
283
|
+
|
|
273
284
|
/** 右下角按钮为“下一个” */
|
|
274
285
|
next
|
|
286
|
+
|
|
275
287
|
/** 右下角按钮为“前往” */
|
|
276
288
|
go
|
|
289
|
+
|
|
277
290
|
/** 右下角按钮为“完成” */
|
|
278
291
|
done
|
|
279
292
|
}
|
|
293
|
+
|
|
280
294
|
/** > 注意:React-Native 端 `inputEventDetail` 仅实现参数 `value`,若需实时获取光标位置则可通过 [`onSelectionChange`](https://reactnative.dev/docs/textinput#onselectionchange) 实现。 */
|
|
281
295
|
interface inputEventDetail {
|
|
282
296
|
/** 输入值 */
|
|
@@ -310,7 +324,7 @@ declare namespace InputProps {
|
|
|
310
324
|
|
|
311
325
|
/** 输入框。该组件是原生组件,使用时请注意相关限制
|
|
312
326
|
* @classification forms
|
|
313
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
327
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
314
328
|
* @example_react
|
|
315
329
|
* ```tsx
|
|
316
330
|
* class App extends Component {
|
package/types/Label.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface LabelProps extends StandardProps {
|
|
|
9
9
|
*
|
|
10
10
|
* 使用for属性找到对应的id,或者将控件放在该标签下,当点击时,就会触发对应的控件。 for优先级高于内部控件,内部有多个控件的时候默认触发第一个控件。 目前可以绑定的控件有:button, checkbox, radio, switch。
|
|
11
11
|
* @classification forms
|
|
12
|
-
* @supported weapp, swan, alipay, tt, h5, rn
|
|
12
|
+
* @supported weapp, swan, alipay, tt, h5, rn, harmony
|
|
13
13
|
* @example_react
|
|
14
14
|
* ```tsx
|
|
15
15
|
* class App extends Components {
|
package/types/NativeSlot.d.ts
CHANGED
package/types/NavigationBar.d.ts
CHANGED
|
@@ -36,7 +36,8 @@ interface NavigationBarProps extends StandardProps {
|
|
|
36
36
|
|
|
37
37
|
/** 页面导航条配置节点,用于指定导航栏的一些属性。只能是 PageMeta 组件内的第一个节点,需要配合它一同使用。
|
|
38
38
|
* 通过这个节点可以获得类似于调用 Taro.setNavigationBarTitle Taro.setNavigationBarColor 等接口调用的效果。
|
|
39
|
-
* @
|
|
39
|
+
* @classification navig
|
|
40
|
+
* @supported weapp, harmony
|
|
40
41
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/navigation-bar.html
|
|
41
42
|
*/
|
|
42
43
|
declare const NavigationBar: ComponentType<NavigationBarProps>
|
package/types/Navigator.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ declare namespace NavigatorProps {
|
|
|
138
138
|
|
|
139
139
|
/** 页面链接
|
|
140
140
|
* @classification navig
|
|
141
|
-
* @supported weapp, alipay, swan, tt, qq, jd
|
|
141
|
+
* @supported weapp, alipay, swan, tt, qq, jd, harmony
|
|
142
142
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
|
|
143
143
|
*/
|
|
144
144
|
declare const Navigator: ComponentType<NavigatorProps>
|
package/types/Picker.d.ts
CHANGED
|
@@ -302,7 +302,7 @@ declare namespace PickerRegionProps {
|
|
|
302
302
|
/**
|
|
303
303
|
* 从底部弹起的滚动选择器
|
|
304
304
|
* @classification forms
|
|
305
|
-
* @supported weapp, swan, alipay, tt, h5, rn
|
|
305
|
+
* @supported weapp, swan, alipay, tt, h5, rn, harmony
|
|
306
306
|
* @example_react
|
|
307
307
|
* ```tsx
|
|
308
308
|
* export default class PagePicker extends Component {
|
package/types/PickerView.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare namespace PickerViewProps {
|
|
|
66
66
|
/** 嵌入页面的滚动选择器
|
|
67
67
|
* 其中只可放置 picker-view-column 组件,其它节点不会显示
|
|
68
68
|
* @classification forms
|
|
69
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
69
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
70
70
|
* @example_react
|
|
71
71
|
* ```tsx
|
|
72
72
|
* export default class Picks extends Component {
|
|
@@ -5,7 +5,7 @@ type PickerViewColumnProps = StandardProps
|
|
|
5
5
|
/** 滚动选择器子项
|
|
6
6
|
* 仅可放置于 `<PickerView />` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致
|
|
7
7
|
* @classification forms
|
|
8
|
-
* @supported weapp, swan, alipay, tt, h5, rn
|
|
8
|
+
* @supported weapp, swan, alipay, tt, h5, rn, harmony
|
|
9
9
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html
|
|
10
10
|
*/
|
|
11
11
|
declare const PickerViewColumn: ComponentType<StandardProps>
|
package/types/Progress.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ interface ProgressProps extends StandardProps {
|
|
|
81
81
|
|
|
82
82
|
/** 进度条。组件属性的长度单位默认为 px
|
|
83
83
|
* @classification base
|
|
84
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
84
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
85
85
|
* @example_react
|
|
86
86
|
* ```tsx
|
|
87
87
|
* export default class PageView extends Component {
|
package/types/Radio.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ interface RadioProps extends StandardProps {
|
|
|
44
44
|
|
|
45
45
|
/** 单选项目
|
|
46
46
|
* @classification forms
|
|
47
|
-
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
47
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn, harmony
|
|
48
48
|
* @example_react
|
|
49
49
|
* ```tsx
|
|
50
50
|
* export default class PageRadio extends Component {
|
package/types/RadioGroup.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare namespace RadioGroupProps {
|
|
|
19
19
|
|
|
20
20
|
/** 单项选择器,内部由多个 Radio 组成。
|
|
21
21
|
* @classification forms
|
|
22
|
-
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
22
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn, harmony
|
|
23
23
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/radio-group.html
|
|
24
24
|
*/
|
|
25
25
|
declare const RadioGroup: ComponentType<RadioGroupProps>
|
package/types/RichText.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ declare namespace RichTextProps {
|
|
|
118
118
|
|
|
119
119
|
/** 富文本
|
|
120
120
|
* @classification base
|
|
121
|
-
* @supported weapp, swan, alipay, tt, h5, rn
|
|
121
|
+
* @supported weapp, swan, alipay, tt, h5, rn, harmony
|
|
122
122
|
* @example_react
|
|
123
123
|
* ```tsx
|
|
124
124
|
* class App extends Components {
|
package/types/ScrollView.d.ts
CHANGED
|
@@ -262,7 +262,7 @@ declare namespace ScrollViewProps {
|
|
|
262
262
|
* H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。
|
|
263
263
|
* 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。
|
|
264
264
|
* @classification viewContainer
|
|
265
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
265
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
266
266
|
* @example_react
|
|
267
267
|
* ```tsx
|
|
268
268
|
* export default class PageView extends Component {
|
package/types/ShareElement.d.ts
CHANGED
|
@@ -2,17 +2,17 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
3
|
interface ShareElementProps extends StandardProps {
|
|
4
4
|
/** 映射标记
|
|
5
|
-
* @supported weapp
|
|
5
|
+
* @supported weapp
|
|
6
6
|
*/
|
|
7
7
|
key?: string
|
|
8
8
|
|
|
9
9
|
/** 映射标记
|
|
10
|
-
* @supported weapp
|
|
10
|
+
* @supported weapp
|
|
11
11
|
*/
|
|
12
12
|
mapkey?: string
|
|
13
13
|
|
|
14
14
|
/** 映射标记
|
|
15
|
-
* @supported alipay
|
|
15
|
+
* @supported alipay
|
|
16
16
|
*/
|
|
17
17
|
name?: string
|
|
18
18
|
|
package/types/Slider.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ declare namespace SliderProps {
|
|
|
118
118
|
|
|
119
119
|
/** 滑动选择器
|
|
120
120
|
* @classification forms
|
|
121
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
121
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
122
122
|
* @example_react
|
|
123
123
|
* ```tsx
|
|
124
124
|
* export default class PageView extends Component {
|
package/types/Slot.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ interface SlotProps {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/** slot 插槽
|
|
17
|
-
* @
|
|
17
|
+
* @classification viewContainer
|
|
18
|
+
* @supported weapp, swan, alipay, tt, jd, qq, harmony
|
|
18
19
|
* @example
|
|
19
20
|
* ```tsx
|
|
20
21
|
* import { Slot, View, Text } from '@tarojs/components'
|