@nutui/nutui-react-taro 1.3.8 → 1.3.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/esm/BackTop.js +3 -2
- package/dist/esm/Card/style/index.js +2 -2
- package/dist/esm/CellGroup.js +2 -2
- package/dist/esm/DatePicker.js +2 -2
- package/dist/esm/Elevator.js +3 -2
- package/dist/esm/GridItem.js +2 -2
- package/dist/esm/Input.js +2 -2
- package/dist/esm/backtop.taro-99107c30.js +71 -0
- package/dist/esm/calendaritem.taro-fe5dd4bd.js +18 -9
- package/dist/esm/{cellgroup.taro-8c87bf08.js → cellgroup.taro-e094471c.js} +5 -5
- package/dist/esm/{datepicker.taro-49a4cf0c.js → datepicker.taro-9f8afe51.js} +3 -2
- package/dist/esm/{elevator.taro-443253ec.js → elevator.taro-ead49158.js} +14 -12
- package/dist/esm/{griditem.taro-866cd288.js → griditem.taro-ca62dbb5.js} +9 -3
- package/dist/esm/{input.taro-40d7e7dd.js → input.taro-39b99dbc.js} +4 -4
- package/dist/esm/nutui-react.es.js +7 -7
- package/dist/esm/types/src/packages/cellgroup/cellgroup.d.ts +1 -1
- package/dist/esm/types/src/packages/cellgroup/cellgroup.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/datepicker/datepicker.d.ts +2 -2
- package/dist/esm/types/src/packages/datepicker/datepicker.taro.d.ts +2 -2
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +46 -96
- package/dist/nutui.react.umd.js +45 -95
- package/dist/packages/actionsheet/actionsheet.scss +17 -0
- package/dist/packages/address/address.scss +42 -0
- package/dist/packages/badge/badge.scss +8 -0
- package/dist/packages/calendar/calendar.scss +27 -0
- package/dist/packages/card/card.scss +8 -0
- package/dist/packages/cascader/cascader.scss +16 -0
- package/dist/packages/cell/cell.scss +7 -0
- package/dist/packages/checkbox/checkbox.scss +11 -0
- package/dist/packages/circleprogress/circleprogress.scss +6 -0
- package/dist/packages/collapseitem/collapseitem.scss +21 -0
- package/dist/packages/elevator/elevator.scss +17 -1
- package/dist/packages/empty/empty.scss +6 -0
- package/dist/packages/infiniteloading/infiniteloading.scss +18 -0
- package/dist/packages/inputnumber/inputnumber.scss +22 -0
- package/dist/packages/navbar/navbar.scss +9 -0
- package/dist/packages/numberkeyboard/numberkeyboard.scss +10 -0
- package/dist/packages/pagination/pagination.scss +21 -1
- package/dist/packages/picker/picker.scss +39 -0
- package/dist/packages/popup/popup.scss +11 -0
- package/dist/packages/radio/radio.scss +18 -0
- package/dist/packages/shortpassword/shortpassword.scss +62 -0
- package/dist/packages/sidenavbaritem/sidenavbaritem.scss +9 -0
- package/dist/packages/subsidenavbar/subsidenavbar.scss +12 -0
- package/dist/packages/tabbar/tabbar.scss +5 -0
- package/dist/packages/tabbaritem/tabbaritem.scss +7 -0
- package/dist/packages/table/table.scss +38 -0
- package/dist/packages/tabpane/tabpane.scss +5 -0
- package/dist/packages/tabs/tabs.scss +28 -1
- package/dist/packages/timedetail/timedetail.scss +16 -0
- package/dist/packages/timepannel/timepannel.scss +10 -0
- package/dist/packages/timeselect/timeselect.scss +18 -0
- package/dist/packages/uploader/uploader.scss +9 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/variables.scss +110 -101
- package/dist/types/index.d.ts +3 -3
- package/package.json +8 -1
- package/dist/esm/backtop.taro-aa8b2bc5.js +0 -136
package/dist/esm/BackTop.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { B as BackTop } from './backtop.taro-
|
|
2
|
-
export { B as default } from './backtop.taro-
|
|
1
|
+
import { B as BackTop } from './backtop.taro-99107c30.js';
|
|
2
|
+
export { B as default } from './backtop.taro-99107c30.js';
|
|
3
3
|
import 'react';
|
|
4
|
+
import '@tarojs/taro';
|
|
4
5
|
import './icon.taro-1d0d4fb7.js';
|
|
5
6
|
import './bem-893ad28d.js';
|
|
6
7
|
import '@bem-react/classname';
|
package/dist/esm/CellGroup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CellGroup } from './cellgroup.taro-
|
|
2
|
-
export { C as default } from './cellgroup.taro-
|
|
1
|
+
import { C as CellGroup } from './cellgroup.taro-e094471c.js';
|
|
2
|
+
export { C as default } from './cellgroup.taro-e094471c.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './bem-893ad28d.js';
|
|
5
5
|
import '@bem-react/classname';
|
package/dist/esm/DatePicker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DatePicker } from './datepicker.taro-
|
|
2
|
-
export { D as default } from './datepicker.taro-
|
|
1
|
+
import { D as DatePicker } from './datepicker.taro-9f8afe51.js';
|
|
2
|
+
export { D as default } from './datepicker.taro-9f8afe51.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './picker.taro-f003b725.js';
|
|
5
5
|
import './popup.taro-33d0bbc8.js';
|
package/dist/esm/Elevator.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { E as Elevator } from './elevator.taro-
|
|
2
|
-
export { E as default } from './elevator.taro-
|
|
1
|
+
import { E as Elevator } from './elevator.taro-ead49158.js';
|
|
2
|
+
export { E as default } from './elevator.taro-ead49158.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@tarojs/taro';
|
|
5
|
+
import '@tarojs/components';
|
|
5
6
|
import './bem-893ad28d.js';
|
|
6
7
|
import '@bem-react/classname';
|
package/dist/esm/GridItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GridItem } from './griditem.taro-
|
|
2
|
-
export { G as default } from './griditem.taro-
|
|
1
|
+
import { G as GridItem } from './griditem.taro-ca62dbb5.js';
|
|
2
|
+
export { G as default } from './griditem.taro-ca62dbb5.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './configprovider.taro-6c7b3056.js';
|
|
5
5
|
import './zh-CN-14165629.js';
|
package/dist/esm/Input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as Input } from './input.taro-
|
|
2
|
-
export { I as default } from './input.taro-
|
|
1
|
+
import { I as Input } from './input.taro-39b99dbc.js';
|
|
2
|
+
export { I as default } from './input.taro-39b99dbc.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './icon.taro-1d0d4fb7.js';
|
|
5
5
|
import './bem-893ad28d.js';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
import React__default, { useState } from 'react';
|
|
6
|
+
import Taro, { usePageScroll } from '@tarojs/taro';
|
|
7
|
+
import { I as Icon } from './icon.taro-1d0d4fb7.js';
|
|
8
|
+
import { C as ComponentDefaults } from './typings-1c5f2628.js';
|
|
9
|
+
var defaultProps = _objectSpread(_objectSpread({}, ComponentDefaults), {}, {
|
|
10
|
+
bottom: 20,
|
|
11
|
+
right: 10,
|
|
12
|
+
elId: 'body',
|
|
13
|
+
distance: 200,
|
|
14
|
+
zIndex: 10,
|
|
15
|
+
isAnimation: true,
|
|
16
|
+
duration: 1000
|
|
17
|
+
});
|
|
18
|
+
var BackTop = function BackTop(props) {
|
|
19
|
+
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
20
|
+
children = _defaultProps$props.children,
|
|
21
|
+
bottom = _defaultProps$props.bottom,
|
|
22
|
+
right = _defaultProps$props.right,
|
|
23
|
+
elId = _defaultProps$props.elId,
|
|
24
|
+
distance = _defaultProps$props.distance,
|
|
25
|
+
zIndex = _defaultProps$props.zIndex,
|
|
26
|
+
isAnimation = _defaultProps$props.isAnimation,
|
|
27
|
+
className = _defaultProps$props.className,
|
|
28
|
+
duration = _defaultProps$props.duration,
|
|
29
|
+
style = _defaultProps$props.style,
|
|
30
|
+
onClick = _defaultProps$props.onClick,
|
|
31
|
+
iconClassPrefix = _defaultProps$props.iconClassPrefix,
|
|
32
|
+
iconFontClassName = _defaultProps$props.iconFontClassName;
|
|
33
|
+
var _useState = useState(false),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
backTop = _useState2[0],
|
|
36
|
+
SetBackTop = _useState2[1];
|
|
37
|
+
// 监听用户滑动页面事件
|
|
38
|
+
usePageScroll(function (res) {
|
|
39
|
+
var scrollTop = res.scrollTop;
|
|
40
|
+
scrollTop >= distance ? SetBackTop(true) : SetBackTop(false);
|
|
41
|
+
});
|
|
42
|
+
// 返回顶部点击事件
|
|
43
|
+
var goTop = function goTop(e) {
|
|
44
|
+
onClick && onClick(e);
|
|
45
|
+
Taro.pageScrollTo({
|
|
46
|
+
scrollTop: 0,
|
|
47
|
+
duration: isAnimation && duration > 0 ? duration : 0
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var backTopClass = {
|
|
51
|
+
right: "".concat(right, "px"),
|
|
52
|
+
bottom: "".concat(bottom, "px"),
|
|
53
|
+
zIndex: zIndex
|
|
54
|
+
};
|
|
55
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
56
|
+
className: "nut-backtop ".concat(backTop ? 'show' : '', " ").concat(className || ''),
|
|
57
|
+
style: _objectSpread(_objectSpread({}, backTopClass), style),
|
|
58
|
+
onClick: function onClick(e) {
|
|
59
|
+
goTop(e);
|
|
60
|
+
}
|
|
61
|
+
}, children || React__default.createElement(Icon, {
|
|
62
|
+
classPrefix: iconClassPrefix,
|
|
63
|
+
fontClassName: iconFontClassName,
|
|
64
|
+
size: "19px",
|
|
65
|
+
className: "nut-backtop-main",
|
|
66
|
+
name: "top"
|
|
67
|
+
})));
|
|
68
|
+
};
|
|
69
|
+
BackTop.defaultProps = defaultProps;
|
|
70
|
+
BackTop.displayName = 'NutBackTop';
|
|
71
|
+
export { BackTop as B };
|
|
@@ -14,13 +14,15 @@ var Utils = {
|
|
|
14
14
|
/**
|
|
15
15
|
* 是否为闫年
|
|
16
16
|
* @return {Boolse} true|false
|
|
17
|
-
*/
|
|
17
|
+
*/
|
|
18
|
+
isLeapYear: function isLeapYear(y) {
|
|
18
19
|
return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
|
|
19
20
|
},
|
|
20
21
|
/**
|
|
21
22
|
* 返回星期数
|
|
22
23
|
* @return {String}
|
|
23
|
-
*/
|
|
24
|
+
*/
|
|
25
|
+
getWhatDay: function getWhatDay(year, month, day) {
|
|
24
26
|
var date = new Date("".concat(year, "/").concat(month, "/").concat(day));
|
|
25
27
|
var index = date.getDay();
|
|
26
28
|
var dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
|
|
@@ -29,7 +31,8 @@ var Utils = {
|
|
|
29
31
|
/**
|
|
30
32
|
* 返回星期数
|
|
31
33
|
* @return {Number}
|
|
32
|
-
*/
|
|
34
|
+
*/
|
|
35
|
+
getMonthPreDay: function getMonthPreDay(year, month) {
|
|
33
36
|
var date = new Date("".concat(year, "/").concat(month, "/01"));
|
|
34
37
|
var day = date.getDay();
|
|
35
38
|
if (day == 0) {
|
|
@@ -40,7 +43,8 @@ var Utils = {
|
|
|
40
43
|
/**
|
|
41
44
|
* 返回月份天数
|
|
42
45
|
* @return {Number}
|
|
43
|
-
*/
|
|
46
|
+
*/
|
|
47
|
+
getMonthDays: function getMonthDays(year, month) {
|
|
44
48
|
if (/^0/.test(month)) {
|
|
45
49
|
month = month.split('')[1];
|
|
46
50
|
}
|
|
@@ -49,14 +53,16 @@ var Utils = {
|
|
|
49
53
|
/**
|
|
50
54
|
* 补齐数字位数
|
|
51
55
|
* @return {string}
|
|
52
|
-
*/
|
|
56
|
+
*/
|
|
57
|
+
getNumTwoBit: function getNumTwoBit(n) {
|
|
53
58
|
n = Number(n);
|
|
54
59
|
return (n > 9 ? '' : '0') + n;
|
|
55
60
|
},
|
|
56
61
|
/**
|
|
57
62
|
* 日期对象转成字符串
|
|
58
63
|
* @return {string}
|
|
59
|
-
*/
|
|
64
|
+
*/
|
|
65
|
+
date2Str: function date2Str(date, split) {
|
|
60
66
|
split = split || '-';
|
|
61
67
|
var y = date.getFullYear();
|
|
62
68
|
var m = this.getNumTwoBit(date.getMonth() + 1);
|
|
@@ -67,7 +73,8 @@ var Utils = {
|
|
|
67
73
|
* 返回日期格式字符串
|
|
68
74
|
* @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
|
|
69
75
|
* @return {string} '2014-12-31'
|
|
70
|
-
*/
|
|
76
|
+
*/
|
|
77
|
+
getDay: function getDay(i) {
|
|
71
78
|
i = i || 0;
|
|
72
79
|
var date = new Date();
|
|
73
80
|
var diff = i * (1000 * 60 * 60 * 24);
|
|
@@ -77,7 +84,8 @@ var Utils = {
|
|
|
77
84
|
/**
|
|
78
85
|
* 时间比较
|
|
79
86
|
* @return {Boolean}
|
|
80
|
-
*/
|
|
87
|
+
*/
|
|
88
|
+
compareDate: function compareDate(date1, date2) {
|
|
81
89
|
var startTime = new Date(date1.replace('-', '/').replace('-', '/'));
|
|
82
90
|
var endTime = new Date(date2.replace('-', '/').replace('-', '/'));
|
|
83
91
|
if (startTime >= endTime) {
|
|
@@ -88,7 +96,8 @@ var Utils = {
|
|
|
88
96
|
/**
|
|
89
97
|
* 时间是否相等
|
|
90
98
|
* @return {Boolean}
|
|
91
|
-
*/
|
|
99
|
+
*/
|
|
100
|
+
isEqual: function isEqual(date1, date2) {
|
|
92
101
|
var startTime = new Date(date1).getTime();
|
|
93
102
|
var endTime = new Date(date2).getTime();
|
|
94
103
|
if (startTime == endTime) {
|
|
@@ -6,24 +6,24 @@ import { c as cn } from './bem-893ad28d.js';
|
|
|
6
6
|
var defaultProps = {
|
|
7
7
|
title: '',
|
|
8
8
|
desc: '',
|
|
9
|
+
className: '',
|
|
9
10
|
titleSlot: null,
|
|
10
|
-
descSlot: null
|
|
11
|
-
classPrefix: 'nutui-cell-group'
|
|
11
|
+
descSlot: null
|
|
12
12
|
};
|
|
13
13
|
var CellGroup = function CellGroup(props) {
|
|
14
14
|
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
15
15
|
children = _defaultProps$props.children,
|
|
16
|
-
|
|
16
|
+
className = _defaultProps$props.className,
|
|
17
17
|
title = _defaultProps$props.title,
|
|
18
18
|
desc = _defaultProps$props.desc,
|
|
19
19
|
titleSlot = _defaultProps$props.titleSlot,
|
|
20
20
|
descSlot = _defaultProps$props.descSlot;
|
|
21
21
|
var b = cn('cell-group');
|
|
22
22
|
return React__default.createElement("div", {
|
|
23
|
-
className: b(null, [
|
|
23
|
+
className: b(null, [className])
|
|
24
24
|
}, titleSlot || React__default.createElement(React__default.Fragment, null, title ? React__default.createElement("div", {
|
|
25
25
|
className: b('title')
|
|
26
|
-
}, title) : null), descSlot || React__default.createElement(React__default.Fragment, null,
|
|
26
|
+
}, title) : null), descSlot || React__default.createElement(React__default.Fragment, null, desc ? React__default.createElement("div", {
|
|
27
27
|
className: b('desc')
|
|
28
28
|
}, desc) : null), React__default.createElement("div", {
|
|
29
29
|
className: b('wrap')
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["minDate", "maxDate", "type", "isShowChinese", "minuteStep", "modelValue", "visible", "title", "formatter", "onCloseDatePicker", "onConfirmDatePicker", "filter", "threeDimensional", "className", "style"];
|
|
5
|
+
var _excluded = ["minDate", "maxDate", "type", "isShowChinese", "minuteStep", "modelValue", "visible", "title", "formatter", "onCloseDatePicker", "onConfirmDatePicker", "filter", "onChange", "threeDimensional", "className", "style"];
|
|
6
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
@@ -33,6 +33,7 @@ var DatePicker = function DatePicker(props) {
|
|
|
33
33
|
onCloseDatePicker = _defaultProps$props.onCloseDatePicker,
|
|
34
34
|
onConfirmDatePicker = _defaultProps$props.onConfirmDatePicker,
|
|
35
35
|
filter = _defaultProps$props.filter,
|
|
36
|
+
onChange = _defaultProps$props.onChange,
|
|
36
37
|
threeDimensional = _defaultProps$props.threeDimensional,
|
|
37
38
|
className = _defaultProps$props.className,
|
|
38
39
|
style = _defaultProps$props.style,
|
|
@@ -192,7 +193,7 @@ var DatePicker = function DatePicker(props) {
|
|
|
192
193
|
var isEqual = (currentDate === null || currentDate === void 0 ? void 0 : currentDate.getTime()) === ((_date = date) === null || _date === void 0 ? void 0 : _date.getTime());
|
|
193
194
|
date && isDate(date) && !isEqual && setCurrentDate(formatValue(date));
|
|
194
195
|
}
|
|
195
|
-
props.
|
|
196
|
+
props.onChange && props.onChange(index, selectedValue, cacheValueData);
|
|
196
197
|
};
|
|
197
198
|
var padZero = function padZero(num) {
|
|
198
199
|
var targetLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
@@ -7,6 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
7
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
import React__default, { createContext, useRef, useState, useEffect } from 'react';
|
|
9
9
|
import Taro from '@tarojs/taro';
|
|
10
|
+
import { ScrollView } from '@tarojs/components';
|
|
10
11
|
import { c as cn } from './bem-893ad28d.js';
|
|
11
12
|
var elevatorContext = createContext({});
|
|
12
13
|
var defaultProps = {
|
|
@@ -95,7 +96,8 @@ var Elevator = function Elevator(props) {
|
|
|
95
96
|
query.selectAll(".".concat(className, " .elevator__item__").concat(i)).boundingClientRect();
|
|
96
97
|
// eslint-disable-next-line no-loop-func
|
|
97
98
|
query.exec(function (res) {
|
|
98
|
-
height += res[0].height;
|
|
99
|
+
height += res[0][0].height;
|
|
100
|
+
// console.log(res, res[0][0].height, height, 'res')
|
|
99
101
|
state.current.listHeight.push(height);
|
|
100
102
|
});
|
|
101
103
|
}
|
|
@@ -135,7 +137,6 @@ var Elevator = function Elevator(props) {
|
|
|
135
137
|
touchState.current.y1 = firstTouch.pageY;
|
|
136
138
|
state.current.anchorIndex = +index;
|
|
137
139
|
setCodeIndex(function (codeIndex) {
|
|
138
|
-
// console.log(codeIndex + index, 'touchStart')
|
|
139
140
|
return codeIndex + index;
|
|
140
141
|
});
|
|
141
142
|
scrollTo(index);
|
|
@@ -149,10 +150,8 @@ var Elevator = function Elevator(props) {
|
|
|
149
150
|
onClickIndex && onClickIndex(key);
|
|
150
151
|
};
|
|
151
152
|
var setListGroup = function setListGroup() {
|
|
152
|
-
console.log(Taro.createSelectorQuery().selectAll(".".concat(className)));
|
|
153
153
|
if (listview.current) {
|
|
154
154
|
Taro.createSelectorQuery().selectAll(".".concat(className, " .nut-elevator__list__item")).node(function (el) {
|
|
155
|
-
console.log(el, 'el');
|
|
156
155
|
state.current.listGroup = _toConsumableArray(Object.keys(el));
|
|
157
156
|
calculateHeight();
|
|
158
157
|
}).exec();
|
|
@@ -180,7 +179,9 @@ var Elevator = function Elevator(props) {
|
|
|
180
179
|
};
|
|
181
180
|
useEffect(function () {
|
|
182
181
|
if (listview.current) {
|
|
183
|
-
|
|
182
|
+
Taro.nextTick(function () {
|
|
183
|
+
setListGroup();
|
|
184
|
+
});
|
|
184
185
|
}
|
|
185
186
|
}, [listview]);
|
|
186
187
|
useEffect(function () {
|
|
@@ -197,7 +198,6 @@ var Elevator = function Elevator(props) {
|
|
|
197
198
|
if (state.current.fixedTop === fixedTop) return;
|
|
198
199
|
state.current.fixedTop = fixedTop;
|
|
199
200
|
}, [state.current.diff, titleHeight]);
|
|
200
|
-
console.log(currentIndex, 'currentIndex');
|
|
201
201
|
return React__default.createElement("div", _objectSpread({
|
|
202
202
|
className: "".concat(b(), " ").concat(className, " ")
|
|
203
203
|
}, rest), isSticky && scrollY > 0 ? React__default.createElement("div", {
|
|
@@ -209,12 +209,15 @@ var Elevator = function Elevator(props) {
|
|
|
209
209
|
style: {
|
|
210
210
|
height: Number.isNaN(+height) ? height : "".concat(height, "px")
|
|
211
211
|
}
|
|
212
|
-
}, React__default.createElement(
|
|
212
|
+
}, React__default.createElement(ScrollView, {
|
|
213
|
+
scrollTop: scrollTop,
|
|
214
|
+
scrollY: true,
|
|
213
215
|
className: b('list__inner'),
|
|
214
|
-
ref: listview
|
|
216
|
+
ref: listview,
|
|
217
|
+
onScroll: listViewScroll
|
|
215
218
|
}, indexList.map(function (item, idx) {
|
|
216
219
|
return React__default.createElement("div", {
|
|
217
|
-
className: b('list__item'),
|
|
220
|
+
className: "".concat(b('list__item'), " elevator__item__").concat(idx),
|
|
218
221
|
key: idx
|
|
219
222
|
}, React__default.createElement("div", {
|
|
220
223
|
className: b('list__item__code')
|
|
@@ -248,13 +251,12 @@ var Elevator = function Elevator(props) {
|
|
|
248
251
|
onTouchEnd: touchEnd,
|
|
249
252
|
style: {
|
|
250
253
|
touchAction: 'pan-y'
|
|
251
|
-
}
|
|
252
|
-
onScroll: listViewScroll
|
|
254
|
+
}
|
|
253
255
|
}, indexList.map(function (item, index) {
|
|
254
256
|
return React__default.createElement("div", {
|
|
255
257
|
className: "".concat(b('bars__inner__item', {
|
|
256
258
|
active: item[acceptKey] === indexList[currentIndex][acceptKey]
|
|
257
|
-
}), "
|
|
259
|
+
}), " "),
|
|
258
260
|
"data-index": index,
|
|
259
261
|
key: index,
|
|
260
262
|
onClick: function onClick() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
var _excluded = ["children", "columnNum", "index", "gutter", "square", "text", "icon", "iconColor", "iconSize", "parentIconSize", "parentIconColor", "border", "center", "reverse", "direction", "iconClassPrefix", "iconFontClassName"];
|
|
3
|
+
var _excluded = ["children", "columnNum", "index", "gutter", "square", "text", "icon", "iconColor", "iconSize", "parentIconSize", "parentIconColor", "border", "center", "reverse", "direction", "iconClassPrefix", "iconFontClassName", "onClick"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import React__default from 'react';
|
|
@@ -43,6 +43,7 @@ var GridItem = function GridItem(props) {
|
|
|
43
43
|
direction = _defaultProps$props.direction,
|
|
44
44
|
iconClassPrefix = _defaultProps$props.iconClassPrefix,
|
|
45
45
|
iconFontClassName = _defaultProps$props.iconFontClassName,
|
|
46
|
+
onClick = _defaultProps$props.onClick,
|
|
46
47
|
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
47
48
|
var b = cn('grid-item');
|
|
48
49
|
var pxCheck = function pxCheck(value) {
|
|
@@ -68,10 +69,15 @@ var GridItem = function GridItem(props) {
|
|
|
68
69
|
var isIconName = function isIconName() {
|
|
69
70
|
return typeof icon === 'string';
|
|
70
71
|
};
|
|
71
|
-
|
|
72
|
+
var handleClick = function handleClick(e) {
|
|
73
|
+
onClick && onClick(e);
|
|
74
|
+
};
|
|
75
|
+
return React__default.createElement("div", _objectSpread(_objectSpread({
|
|
72
76
|
className: b(),
|
|
73
77
|
style: rootStyle()
|
|
74
|
-
}, rest),
|
|
78
|
+
}, rest), {}, {
|
|
79
|
+
onClick: handleClick
|
|
80
|
+
}), React__default.createElement("div", {
|
|
75
81
|
className: contentClass()
|
|
76
82
|
}, icon && isIconName() ? React__default.createElement(Icon, {
|
|
77
83
|
classPrefix: iconClassPrefix,
|
|
@@ -252,7 +252,7 @@ var Input = function Input(props) {
|
|
|
252
252
|
_onClick && _onClick(e);
|
|
253
253
|
click && click(e);
|
|
254
254
|
}
|
|
255
|
-
}), slotInput ? React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
255
|
+
}), slotInput ? React__default.createElement(React__default.Fragment, null, label ? React__default.createElement("div", {
|
|
256
256
|
className: "nut-input-label ".concat(labelClass),
|
|
257
257
|
style: {
|
|
258
258
|
width: "".concat(labelWidth, "px"),
|
|
@@ -260,7 +260,7 @@ var Input = function Input(props) {
|
|
|
260
260
|
}
|
|
261
261
|
}, React__default.createElement("div", {
|
|
262
262
|
className: "label-string"
|
|
263
|
-
}, label, colon ? ':' : '')), React__default.createElement("div", {
|
|
263
|
+
}, label, colon ? ':' : '')) : null, React__default.createElement("div", {
|
|
264
264
|
className: "nut-input-value"
|
|
265
265
|
}, React__default.createElement("div", {
|
|
266
266
|
className: "nut-input-inner",
|
|
@@ -277,7 +277,7 @@ var Input = function Input(props) {
|
|
|
277
277
|
fontClassName: iconFontClassName,
|
|
278
278
|
name: leftIcon,
|
|
279
279
|
size: leftIconSize
|
|
280
|
-
})) : null, React__default.createElement("div", {
|
|
280
|
+
})) : null, label ? React__default.createElement("div", {
|
|
281
281
|
className: "nut-input-label ".concat(labelClass),
|
|
282
282
|
style: {
|
|
283
283
|
width: "".concat(labelWidth, "px"),
|
|
@@ -285,7 +285,7 @@ var Input = function Input(props) {
|
|
|
285
285
|
}
|
|
286
286
|
}, React__default.createElement("div", {
|
|
287
287
|
className: "label-string"
|
|
288
|
-
}, label, colon ? ':' : '')), React__default.createElement("div", {
|
|
288
|
+
}, label, colon ? ':' : '')) : null, React__default.createElement("div", {
|
|
289
289
|
className: "nut-input-value"
|
|
290
290
|
}, React__default.createElement("div", {
|
|
291
291
|
className: "nut-input-inner",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { B as Button } from './button.taro-a9ebb937.js';
|
|
2
2
|
export { C as Cell } from './cell.taro-6daf51a0.js';
|
|
3
|
-
export { C as CellGroup } from './cellgroup.taro-
|
|
3
|
+
export { C as CellGroup } from './cellgroup.taro-e094471c.js';
|
|
4
4
|
export { I as Icon } from './icon.taro-1d0d4fb7.js';
|
|
5
5
|
export { O as Overlay } from './overlay.taro-be45fed5.js';
|
|
6
6
|
export { P as Popup } from './popup.taro-33d0bbc8.js';
|
|
@@ -10,13 +10,13 @@ export { C as Col } from './col.taro-2a437387.js';
|
|
|
10
10
|
export { R as Row } from './row.taro-cec13a7e.js';
|
|
11
11
|
export { D as Divider } from './divider.taro-5236fe6a.js';
|
|
12
12
|
export { G as Grid } from './grid.taro-5d75c0ad.js';
|
|
13
|
-
export { G as GridItem } from './griditem.taro-
|
|
13
|
+
export { G as GridItem } from './griditem.taro-ca62dbb5.js';
|
|
14
14
|
export { S as Sticky } from './sticky.taro-30d4e453.js';
|
|
15
15
|
export { N as NavBar } from './navbar.taro-c931c078.js';
|
|
16
16
|
export { F as FixedNav } from './fixednav.taro-582322a1.js';
|
|
17
17
|
export { T as Tabbar } from './tabbar.taro-86cece39.js';
|
|
18
18
|
export { T as TabbarItem } from './tabbaritem.taro-94cd62c2.js';
|
|
19
|
-
export { E as Elevator } from './elevator.taro-
|
|
19
|
+
export { E as Elevator } from './elevator.taro-ead49158.js';
|
|
20
20
|
export { P as Pagination } from './pagination.taro-62bbd23f.js';
|
|
21
21
|
export { T as Tabs } from './tabs.taro-e71875fa.js';
|
|
22
22
|
export { T as TabPane } from './tabpane.taro-91cd6cf4.js';
|
|
@@ -30,9 +30,9 @@ export { R as Range } from './range.taro-4232e6a7.js';
|
|
|
30
30
|
export { C as Calendar } from './calendar.taro-533b3219.js';
|
|
31
31
|
export { C as Checkbox } from './checkbox.taro-104557c1.js';
|
|
32
32
|
export { C as CheckboxGroup } from './checkboxgroup.taro-3d380042.js';
|
|
33
|
-
export { D as DatePicker } from './datepicker.taro-
|
|
33
|
+
export { D as DatePicker } from './datepicker.taro-9f8afe51.js';
|
|
34
34
|
export { I as InputNumber } from './inputnumber.taro-0a01f6e1.js';
|
|
35
|
-
export { I as Input } from './input.taro-
|
|
35
|
+
export { I as Input } from './input.taro-39b99dbc.js';
|
|
36
36
|
export { R as Radio } from './radio.taro-95d43860.js';
|
|
37
37
|
export { R as RadioGroup } from './radiogroup.taro-b5dad516.js';
|
|
38
38
|
export { R as Rate } from './rate.taro-69c85081.js';
|
|
@@ -45,7 +45,7 @@ export { C as Cascader } from './cascader.taro-8c9891b4.js';
|
|
|
45
45
|
export { S as SearchBar } from './searchbar.taro-0d3c0081.js';
|
|
46
46
|
export { N as NumberKeyboard } from './numberkeyboard.taro-53c350b8.js';
|
|
47
47
|
export { A as ActionSheet } from './actionsheet.taro-360d8d34.js';
|
|
48
|
-
export { B as BackTop } from './backtop.taro-
|
|
48
|
+
export { B as BackTop } from './backtop.taro-99107c30.js';
|
|
49
49
|
export { D as Drag } from './drag.taro-0717c783.js';
|
|
50
50
|
export { D as Dialog } from './dialog.taro-492e2b9a.js';
|
|
51
51
|
export { I as Infiniteloading } from './infiniteloading.taro-b95e62bf.js';
|
|
@@ -97,11 +97,11 @@ import 'react-transition-group';
|
|
|
97
97
|
import './zh-CN-14165629.js';
|
|
98
98
|
import './UserContext-be8097d2.js';
|
|
99
99
|
import './configprovider-3e87d67a.js';
|
|
100
|
+
import '@tarojs/components';
|
|
100
101
|
import './offsetContext-0e3d04b3.js';
|
|
101
102
|
import './useTouch-a2ea68c6.js';
|
|
102
103
|
import './useClientRect-bf69d7b3.js';
|
|
103
104
|
import './icon-8dc4de10.js';
|
|
104
|
-
import '@tarojs/components';
|
|
105
105
|
import '@use-gesture/react';
|
|
106
106
|
import '@react-spring/web';
|
|
107
107
|
import './UserContext-68f62e66.js';
|
|
@@ -22,6 +22,6 @@ export interface DatePickerProps {
|
|
|
22
22
|
filter: (type: string, option: PickerOption[]) => PickerOption[];
|
|
23
23
|
onCloseDatePicker: () => void;
|
|
24
24
|
onConfirmDatePicker: (values: (string | number)[], options: PickerOption[]) => void;
|
|
25
|
-
|
|
25
|
+
onChange?: (columnIndex: string | number, values: (string | number)[], options: PickerOption[]) => void;
|
|
26
26
|
}
|
|
27
|
-
export declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
27
|
+
export declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
@@ -22,6 +22,6 @@ export interface DatePickerProps {
|
|
|
22
22
|
filter: (type: string, option: PickerOption[]) => PickerOption[];
|
|
23
23
|
onCloseDatePicker: () => void;
|
|
24
24
|
onConfirmDatePicker: (values: (string | number)[], options: PickerOption[]) => void;
|
|
25
|
-
|
|
25
|
+
onChange: (columnIndex: string | number, values: (string | number)[], options: PickerOption[]) => void;
|
|
26
26
|
}
|
|
27
|
-
export declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
27
|
+
export declare const DatePicker: FunctionComponent<Partial<DatePickerProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED