@tarojs/components 3.6.0-canary.5 → 3.6.0-canary.6
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/react/component-lib/input.js +2 -2
- package/dist/react/component-lib/reactify-wc.js +13 -13
- package/dist/react/helper.js +1 -1
- package/dist/react/react-component-lib/createComponent.js +10 -10
- package/dist/react/react-component-lib/createOverlayComponent.js +18 -16
- package/dist/react/react-component-lib/utils/attachProps.js +1 -1
- package/dist/react/react-component-lib/utils/index.js +7 -6
- package/dist/vue2/component-lib/createComponent.js +1 -1
- package/dist/vue2/component-lib/createFormsComponent.js +2 -2
- package/dist/vue2/component-lib/index.js +1 -1
- package/dist/vue2/component-lib/mixins/listeners.js +1 -1
- package/dist/vue2/component-lib/mixins/refs.js +1 -1
- package/dist/vue2/component-lib/picker.js +1 -1
- package/dist/vue2/component-lib/scroll-view.js +1 -1
- package/dist/vue2/components.js +1 -1
- package/dist/vue2/index.js +2 -2
- package/dist/vue2/vue-component-lib/utils.js +2 -2
- package/dist/vue3/component-lib/createComponent.js +1 -1
- package/dist/vue3/component-lib/createFormsComponent.js +3 -3
- package/dist/vue3/index.js +1 -1
- package/dist/vue3/vue-component-lib/utils.js +3 -3
- package/package.json +4 -4
- package/types/Ad.d.ts +1 -1
- package/types/Audio.d.ts +1 -1
- package/types/Button.d.ts +1 -1
- package/types/Camera.d.ts +1 -1
- package/types/Canvas.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/CoverView.d.ts +102 -4
- package/types/CustomWrapper.d.ts +1 -1
- 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 +71 -8
- package/types/LivePlayer.d.ts +1 -1
- package/types/LivePusher.d.ts +1 -1
- package/types/Map.d.ts +1 -1
- package/types/MatchMedia.d.ts +1 -1
- package/types/MovableArea.d.ts +2 -2
- package/types/MovableView.d.ts +17 -17
- package/types/Navigator.d.ts +1 -1
- package/types/OpenData.d.ts +1 -1
- package/types/PageContainer.d.ts +28 -18
- package/types/PageMeta.d.ts +1 -1
- package/types/Picker.d.ts +1 -1
- package/types/PickerView.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/RootPortal.d.ts +11 -2
- package/types/ScrollView.d.ts +1 -1
- package/types/ShareElement.d.ts +20 -10
- package/types/Slider.d.ts +1 -1
- package/types/Swiper.d.ts +1 -1
- package/types/SwiperItem.d.ts +3 -2
- package/types/Switch.d.ts +1 -1
- package/types/Text.d.ts +1 -1
- package/types/Textarea.d.ts +7 -1
- package/types/Video.d.ts +7 -1
- package/types/View.d.ts +1 -1
- package/types/WebView.d.ts +1 -1
- package/types/index.vue3.d.ts +2 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import reactifyWc from './reactify-wc';
|
|
4
4
|
var Input = reactifyWc('taro-input-core');
|
|
5
5
|
var h = React.createElement; // eslint-disable-next-line react/display-name
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default React.forwardRef(function (props, ref) {
|
|
8
8
|
var args = _objectSpread({}, props);
|
|
9
9
|
|
|
10
10
|
if (args.hasOwnProperty('focus')) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
2
|
-
import _slicedToArray from "
|
|
3
|
-
import _typeof from "
|
|
4
|
-
import _classCallCheck from "
|
|
5
|
-
import _createClass from "
|
|
6
|
-
import _assertThisInitialized from "
|
|
7
|
-
import _inherits from "
|
|
8
|
-
import _createSuper from "
|
|
9
|
-
import _defineProperty from "
|
|
10
|
-
import _toConsumableArray from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* https://github.com/BBKolton/reactify-wc/
|
|
@@ -154,7 +154,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
154
154
|
_defineProperty(_assertThisInitialized(_this), "ref", void 0);
|
|
155
155
|
|
|
156
156
|
_this.eventHandlers = [];
|
|
157
|
-
_this.ref =
|
|
157
|
+
_this.ref = createRef();
|
|
158
158
|
return _this;
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -225,7 +225,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
225
225
|
ref: this.ref
|
|
226
226
|
};
|
|
227
227
|
if (dangerouslySetInnerHTML) props.dangerouslySetInnerHTML = dangerouslySetInnerHTML;
|
|
228
|
-
return
|
|
228
|
+
return createElement(WC, props, children);
|
|
229
229
|
}
|
|
230
230
|
}]);
|
|
231
231
|
|
|
@@ -233,7 +233,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
233
233
|
}(React.Component); // eslint-disable-next-line react/display-name
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
return
|
|
236
|
+
return React.forwardRef(function (props, ref) {
|
|
237
237
|
return h(Index, _objectSpread(_objectSpread({}, props), {}, {
|
|
238
238
|
forwardRef: ref
|
|
239
239
|
}));
|
package/dist/react/helper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
export var manipulatePropsFunction = function manipulatePropsFunction(originalProps) {
|
|
3
3
|
var propsToPass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4
4
|
var dangerouslySetInnerHTML = originalProps.dangerouslySetInnerHTML;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
2
|
-
import _typeof from "
|
|
3
|
-
import _objectWithoutProperties from "
|
|
4
|
-
import _classCallCheck from "
|
|
5
|
-
import _createClass from "
|
|
6
|
-
import _assertThisInitialized from "
|
|
7
|
-
import _inherits from "
|
|
8
|
-
import _createSuper from "
|
|
9
|
-
import _defineProperty from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
10
|
var _excluded = ["children", "forwardedRef", "style", "className", "ref"];
|
|
11
11
|
import React, { createElement } from 'react';
|
|
12
12
|
import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
|
|
@@ -98,7 +98,7 @@ export var createReactComponent = function createReactComponent(tagName, ReactCo
|
|
|
98
98
|
*/
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
return
|
|
101
|
+
return createElement(tagName, newProps, children);
|
|
102
102
|
}
|
|
103
103
|
}], [{
|
|
104
104
|
key: "displayName",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
5
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
7
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
8
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
9
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
10
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
11
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
11
12
|
var _excluded = ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"];
|
|
12
13
|
import React from 'react';
|
|
13
14
|
import ReactDOM from 'react-dom';
|
|
14
15
|
import { attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
export var createOverlayComponent = function createOverlayComponent(tagName, controller, customElement) {
|
|
17
17
|
defineCustomElement(tagName, customElement);
|
|
18
18
|
var displayName = dashToPascalCase(tagName);
|
|
@@ -185,7 +185,7 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
185
185
|
* overlay is dismissing otherwise component
|
|
186
186
|
* will be hidden before animation is done.
|
|
187
187
|
*/
|
|
188
|
-
return
|
|
188
|
+
return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
|
|
189
189
|
}
|
|
190
190
|
}], [{
|
|
191
191
|
key: "displayName",
|
|
@@ -197,9 +197,11 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
197
197
|
return Overlay;
|
|
198
198
|
}(React.Component);
|
|
199
199
|
|
|
200
|
-
return
|
|
201
|
-
return
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
return React.forwardRef(function (props, ref) {
|
|
201
|
+
return h(Overlay, _mergeJSXProps([{}, props, {
|
|
202
|
+
"attrs": {
|
|
203
|
+
"forwardedRef": ref
|
|
204
|
+
}
|
|
205
|
+
}]));
|
|
204
206
|
});
|
|
205
207
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _typeof from "
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
2
|
import { camelToDashCase } from './case';
|
|
3
3
|
export var attachProps = function attachProps(node, newProps) {
|
|
4
4
|
var oldProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
export var setRef = function setRef(ref, value) {
|
|
5
4
|
if (typeof ref === 'function') {
|
|
6
5
|
ref(value);
|
|
@@ -22,13 +21,15 @@ export var mergeRefs = function mergeRefs() {
|
|
|
22
21
|
};
|
|
23
22
|
export var createForwardRef = function createForwardRef(ReactComponent, displayName) {
|
|
24
23
|
var forwardRef = function forwardRef(props, ref) {
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
return h(ReactComponent, _mergeJSXProps([{}, props, {
|
|
25
|
+
"attrs": {
|
|
26
|
+
"forwardedRef": ref
|
|
27
|
+
}
|
|
28
|
+
}]));
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
forwardRef.displayName = displayName;
|
|
31
|
-
return
|
|
32
|
+
return React.forwardRef(forwardRef);
|
|
32
33
|
};
|
|
33
34
|
export var defineCustomElement = function defineCustomElement(tagName, customElement) {
|
|
34
35
|
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _toConsumableArray from "
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import { listeners } from './mixins/listeners';
|
|
3
3
|
import { refs } from './mixins/refs';
|
|
4
4
|
export default function createComponent(name) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _toConsumableArray from "
|
|
2
|
-
import _objectSpread from "
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import { listeners } from './mixins/listeners';
|
|
4
4
|
import { refs } from './mixins/refs';
|
|
5
5
|
export default function createFormsComponent(name, event) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _slicedToArray from "
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import Vue from 'vue';
|
|
3
3
|
import components from './components';
|
|
4
4
|
import createComponent from './createComponent';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
export var listeners = {
|
|
3
3
|
computed: {
|
|
4
4
|
listeners: function listeners() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _typeof from "
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
2
|
export var refs = {
|
|
3
3
|
mounted: function mounted() {
|
|
4
4
|
if (this.$parent && _typeof(this.$parent.$refs) === 'object' && Object.keys(this.$parent.$refs).length) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { listeners } from './mixins/listeners';
|
|
3
3
|
import { refs } from './mixins/refs';
|
|
4
4
|
export default {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread from "
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { listeners } from './mixins/listeners';
|
|
3
3
|
import { refs } from './mixins/refs';
|
|
4
4
|
export default {
|
package/dist/vue2/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _toConsumableArray from "
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
package/dist/vue2/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _slicedToArray from "
|
|
2
|
-
import _toConsumableArray from "
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import Vue from 'vue';
|
|
4
4
|
import * as components from './components';
|
|
5
5
|
export function initVue2Components() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _defineProperty from "
|
|
2
|
-
import _objectSpread from "
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
export var createCommonRender = function createCommonRender(tagName) {
|
|
4
4
|
var eventNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
5
5
|
return function (createElement) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _toConsumableArray from "
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import { h } from 'vue';
|
|
3
3
|
import { useForwardRef } from './forwardRef';
|
|
4
4
|
export default function createComponent(name) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _toConsumableArray from "
|
|
2
|
-
import _objectSpread from "
|
|
3
|
-
import _defineProperty from "
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import { computed, h, toRefs } from 'vue';
|
|
5
5
|
import { useForwardRef } from './forwardRef';
|
|
6
6
|
export default function createFormsComponent(name, eventName) {
|
package/dist/vue3/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _slicedToArray from "
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import * as components from './components';
|
|
3
3
|
export function initVue3Components(app) {
|
|
4
4
|
app.config.isCustomElement = function (tag) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _defineProperty from "
|
|
2
|
-
import _objectSpread from "
|
|
3
|
-
import _toConsumableArray from "
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
4
|
import { defineComponent, getCurrentInstance, h, inject, ref } from 'vue';
|
|
5
5
|
var UPDATE_VALUE_EVENT = 'update:modelValue';
|
|
6
6
|
var MODEL_VALUE = 'modelValue';
|
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.6",
|
|
4
4
|
"description": "Taro 组件库",
|
|
5
5
|
"browser": "dist/index.js",
|
|
6
6
|
"main:h5": "dist/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"resolve-pathname": "^3.0.0",
|
|
36
36
|
"swiper": "6.8.0",
|
|
37
37
|
"weui": "^1.1.2",
|
|
38
|
-
"@tarojs/router": "3.6.0-canary.
|
|
39
|
-
"@tarojs/taro": "3.6.0-canary.
|
|
38
|
+
"@tarojs/router": "3.6.0-canary.6",
|
|
39
|
+
"@tarojs/taro": "3.6.0-canary.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@babel/generator": "^7.14.5",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"csstype": "^3.1.1",
|
|
54
54
|
"jquery": "^3.4.1",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
56
|
-
"miniapp-types": "1.1.
|
|
56
|
+
"miniapp-types": "1.1.21",
|
|
57
57
|
"puppeteer": "^19.2.0",
|
|
58
58
|
"stencil-vue2-output-target": "0.0.4",
|
|
59
59
|
"ts-node": "^10.9.1",
|
package/types/Ad.d.ts
CHANGED
package/types/Audio.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ declare namespace AudioProps {
|
|
|
107
107
|
/** 音频。1.6.0版本开始,该组件不再维护。建议使用能力更强的 Taro.createInnerAudioContext 接口
|
|
108
108
|
* @classification media
|
|
109
109
|
* @deprecated
|
|
110
|
-
* @supported weapp,
|
|
110
|
+
* @supported weapp, swan, qq, h5
|
|
111
111
|
* @example_react
|
|
112
112
|
* ```tsx
|
|
113
113
|
* export default class PageView extends Component {
|
package/types/Button.d.ts
CHANGED
|
@@ -526,7 +526,7 @@ declare namespace ButtonProps {
|
|
|
526
526
|
|
|
527
527
|
/** 按钮
|
|
528
528
|
* @classification forms
|
|
529
|
-
* @supported weapp,
|
|
529
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
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,
|
|
152
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
153
153
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/camera.html
|
|
154
154
|
*/
|
|
155
155
|
declare const Camera: ComponentType<CameraProps>
|
package/types/Canvas.d.ts
CHANGED
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, h5, rn
|
|
46
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
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,
|
|
19
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
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, swan,
|
|
62
|
+
* @supported weapp, alipay, swan, qq, h5
|
|
63
63
|
* @example_react
|
|
64
64
|
* ```tsx
|
|
65
65
|
* // js
|
package/types/CoverView.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { CommonEventFunction } from './common'
|
|
|
3
3
|
import { ViewProps } from './View'
|
|
4
4
|
interface CoverViewProps extends ViewProps {
|
|
5
5
|
/** 设置顶部滚动偏移量,仅在设置了 overflow-y: scroll 成为滚动元素后生效
|
|
6
|
-
* @supported weapp, swan, qq
|
|
6
|
+
* @supported weapp, alipay, swan, qq
|
|
7
7
|
*/
|
|
8
8
|
scrollTop?: number
|
|
9
9
|
|
|
@@ -37,15 +37,113 @@ interface CoverViewProps extends ViewProps {
|
|
|
37
37
|
*/
|
|
38
38
|
ariaLabel?: string
|
|
39
39
|
|
|
40
|
-
/**
|
|
40
|
+
/** 允许横向滚动。
|
|
41
41
|
* @supported alipay
|
|
42
|
+
* @default false
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
scrollX?: boolean
|
|
45
|
+
|
|
46
|
+
/** 允许纵向滚动。
|
|
47
|
+
* @supported alipay
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
scrollY?: boolean
|
|
51
|
+
|
|
52
|
+
/** 距顶部/左边多远时(单位px),触发 scrolltoupper 事件。
|
|
53
|
+
* @supported alipay
|
|
54
|
+
* @default 50
|
|
55
|
+
*/
|
|
56
|
+
upperThreshold?: number
|
|
57
|
+
|
|
58
|
+
/** 距底部/右边多远时(单位px),触发 scrolltolower 事件。
|
|
59
|
+
* @supported alipay
|
|
60
|
+
* @default 50
|
|
61
|
+
*/
|
|
62
|
+
lowerThreshold?: number
|
|
63
|
+
|
|
64
|
+
/** 设置横向滚动条位置。
|
|
65
|
+
* @supported alipay
|
|
66
|
+
*/
|
|
67
|
+
scrollLeft?: number
|
|
68
|
+
|
|
69
|
+
/** 滚动到子元素,值应为某子元素的 id。当滚动到该元素时,元素顶部对齐滚动区域顶部。
|
|
70
|
+
* 说明:scroll-into-view 的优先级高于 scroll-top。
|
|
71
|
+
* @supported alipay
|
|
72
|
+
*/
|
|
73
|
+
scrollIntoView?: string
|
|
74
|
+
|
|
75
|
+
/** 在设置滚动条位置时使用动画过渡。
|
|
76
|
+
* @supported alipay
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
scrollWithAnimation?: boolean
|
|
80
|
+
|
|
81
|
+
/** 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
|
|
82
|
+
* @supported alipay
|
|
83
|
+
*/
|
|
84
|
+
scrollAnimationDuration?: number
|
|
85
|
+
|
|
86
|
+
/** 当点击 iOS 顶部状态栏或者双击 Android 标题栏时,滚动条返回顶部,只支持竖向。
|
|
87
|
+
* @supported alipay
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
enableBackToTop?: boolean
|
|
91
|
+
|
|
92
|
+
/** 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
|
|
93
|
+
* @supported alipay
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
trapScroll?: boolean
|
|
97
|
+
|
|
98
|
+
/** 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。
|
|
99
|
+
* @supported alipay
|
|
100
|
+
*/
|
|
101
|
+
disableLowerScroll?: string
|
|
102
|
+
|
|
103
|
+
/** 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。
|
|
104
|
+
* @supported alipay
|
|
105
|
+
*/
|
|
106
|
+
disableUpperScroll?: string
|
|
107
|
+
|
|
108
|
+
/** 滚动到顶部/左边,会触发 scrolltoupper 事件。
|
|
109
|
+
* @supported alipay
|
|
110
|
+
*/
|
|
111
|
+
onScrollToUpper?: CommonEventFunction
|
|
112
|
+
|
|
113
|
+
/** 滚动到底部/右边,会触发 scrolltolower事件。
|
|
114
|
+
* @supported alipay
|
|
115
|
+
*/
|
|
116
|
+
onScrollToLower?: CommonEventFunction
|
|
117
|
+
|
|
118
|
+
/** 滚动时触发,event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth}。
|
|
119
|
+
* @supported alipay
|
|
120
|
+
*/
|
|
121
|
+
onScroll?: CommonEventFunction
|
|
122
|
+
|
|
123
|
+
/** 触摸动作开始。
|
|
124
|
+
* @supported alipay
|
|
125
|
+
*/
|
|
126
|
+
onTouchStart?: CommonEventFunction
|
|
127
|
+
|
|
128
|
+
/** 触摸后移动。
|
|
129
|
+
* @supported alipay
|
|
130
|
+
*/
|
|
131
|
+
onTouchMove?: CommonEventFunction
|
|
132
|
+
|
|
133
|
+
/** 触摸动作结束。
|
|
134
|
+
* @supported alipay
|
|
135
|
+
*/
|
|
136
|
+
onTouchEnd?: CommonEventFunction
|
|
137
|
+
|
|
138
|
+
/** 触摸动作被打断,如来电提醒、弹窗。
|
|
139
|
+
* @supported alipay
|
|
140
|
+
*/
|
|
141
|
+
onTouchCancel?: CommonEventFunction
|
|
44
142
|
}
|
|
45
143
|
|
|
46
144
|
/** 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。
|
|
47
145
|
* @classification viewContainer
|
|
48
|
-
* @supported weapp, swan,
|
|
146
|
+
* @supported weapp, alipay, swan, qq, h5
|
|
49
147
|
* @example_react
|
|
50
148
|
* ```tsx
|
|
51
149
|
* // js
|
package/types/CustomWrapper.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface CustomWrapperProps extends StandardProps {
|
|
|
6
6
|
|
|
7
7
|
/** custom-wrapper 自定义组件包裹器
|
|
8
8
|
* 当数据更新层级较深时,可用此组件将需要更新的区域包裹起来,这样更新层级将大大减少
|
|
9
|
-
* @supported weapp, swan, alipay, tt, jd, qq
|
|
9
|
+
* @supported weapp, swan, alipay, tt, jd, qq, h5
|
|
10
10
|
* @example
|
|
11
11
|
* ```tsx
|
|
12
12
|
* import { Component } from 'react'
|
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, h5, rn
|
|
69
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
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,
|
|
65
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
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,
|
|
158
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
159
159
|
* @example_react
|
|
160
160
|
* ```tsx
|
|
161
161
|
* export default class PageView extends Component {
|