@nutui/nutui-react-taro 1.4.7 → 1.4.8
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/CHANGELOG.md +44 -0
- package/dist/esm/Badge.js +2 -2
- package/dist/esm/Barrage.js +2 -2
- package/dist/esm/Calendar.js +3 -4
- package/dist/esm/CalendarItem.js +2 -3
- package/dist/esm/Cascader.js +4 -4
- package/dist/esm/Checkbox.js +2 -2
- package/dist/esm/CheckboxGroup.js +2 -2
- package/dist/esm/Col.js +3 -2
- package/dist/esm/Dialog.js +3 -2
- package/dist/esm/Ellipsis.js +2 -2
- package/dist/esm/InputNumber.js +2 -2
- package/dist/esm/Popover.js +2 -2
- package/dist/esm/Row.js +3 -2
- package/dist/esm/ShortPassword.js +2 -2
- package/dist/esm/Swipe.js +3 -2
- package/dist/esm/TabPane.js +2 -2
- package/dist/esm/Tabbar.js +2 -2
- package/dist/esm/Tabs.js +2 -2
- package/dist/esm/TextArea.js +2 -2
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/{badge.taro-11e2ec95.js → badge.taro-116b2521.js} +1 -0
- package/dist/esm/barrage.taro-5dbab093.js +94 -0
- package/dist/esm/calendar.taro-c95e6998.js +61 -0
- package/dist/esm/calendaritem.taro-86412398.js +761 -0
- package/dist/esm/{cascader.taro-e6610dd1.js → cascader.taro-e0fb7e63.js} +16 -22
- package/dist/esm/{checkbox.taro-04da7151.js → checkbox.taro-b76b1c82.js} +9 -6
- package/dist/esm/{col.taro-b61c7cba.js → col.taro-9e4c5cc0.js} +2 -1
- package/dist/esm/{dialog.taro-54df2e3f.js → dialog.taro-7608bd26.js} +7 -12
- package/dist/esm/{ellipsis.taro-aa39faf7.js → ellipsis.taro-5aa23940.js} +4 -3
- package/dist/esm/{inputnumber.taro-e909d932.js → inputnumber.taro-94c75663.js} +11 -21
- package/dist/esm/nutui-react.es.js +19 -19
- package/dist/esm/{popover.taro-fc7b9a73.js → popover.taro-f144cd02.js} +9 -7
- package/dist/esm/{row.taro-37a895de.js → row.taro-4e697aa2.js} +2 -1
- package/dist/esm/{shortpassword.taro-02ea4499.js → shortpassword.taro-53b7ee7b.js} +3 -2
- package/dist/esm/{swipe.taro-1eb95b21.js → swipe.taro-6532405d.js} +16 -24
- package/dist/esm/{tabbar.taro-08e48c43.js → tabbar.taro-17d898d9.js} +12 -7
- package/dist/esm/{tabpane.taro-91cd6cf4.js → tabpane.taro-9512e308.js} +3 -3
- package/dist/esm/{tabs.taro-5030ce68.js → tabs.taro-4629d66c.js} +5 -2
- package/dist/esm/{textarea.taro-42600f8c.js → textarea.taro-47addd05.js} +5 -1
- package/dist/esm/types/src/packages/calendar/calendar.taro.d.ts +22 -2
- package/dist/esm/types/src/packages/calendaritem/calendaritem.taro.d.ts +21 -3
- package/dist/esm/types/src/packages/cascader/cascader.d.ts +1 -0
- package/dist/esm/types/src/packages/cascader/cascader.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/cascader/cascaderItem.d.ts +1 -0
- package/dist/esm/types/src/packages/cascader/cascaderItem.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/checkbox/demo.d.ts +0 -1
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +5 -0
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +5 -0
- package/dist/esm/types/src/packages/dialog/DialogWrap.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/DialogWrapper.taro.d.ts +11 -0
- package/dist/esm/types/src/packages/dialog/dialog.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/dialog/index.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/form/form.d.ts +3 -0
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +2 -1
- package/dist/esm/types/src/packages/formitem/types.d.ts +1 -1
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/switch/switch.d.ts +2 -1
- package/dist/esm/types/src/packages/tabbar/tabbar.d.ts +1 -1
- package/dist/esm/types/src/packages/tabbar/tabbar.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/tabbar/use-props-value.d.ts +7 -0
- package/dist/esm/types/src/packages/tabpane/tabpane.taro.d.ts +0 -1
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -0
- package/dist/esm/types/src/packages/tabs/tabs.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +1 -0
- package/dist/esm/{uploader.taro-b7b770e6.js → uploader.taro-c830b573.js} +3 -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/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +690 -412
- package/dist/nutui.react.umd.js +689 -411
- package/dist/packages/badge/badge.scss +11 -5
- package/dist/packages/barrage/barrage.scss +3 -3
- package/dist/packages/button/button.scss +1 -0
- package/dist/packages/cascader/cascader.scss +19 -5
- package/dist/packages/checkboxgroup/checkboxgroup.scss +33 -0
- package/dist/packages/collapseitem/collapseitem.scss +41 -17
- package/dist/packages/form/form.scss +3 -0
- package/dist/packages/inputnumber/inputnumber.scss +18 -1
- package/dist/packages/popover/popover.scss +71 -46
- package/dist/packages/radiogroup/radiogroup.scss +9 -8
- package/dist/packages/step/step.scss +135 -98
- package/dist/packages/switch/switch.scss +1 -1
- package/dist/packages/tabs/tabs.scss +24 -2
- package/dist/packages/textarea/textarea.scss +7 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/variables.scss +155 -33
- package/dist/types/index.d.ts +57 -33
- package/package.json +1 -1
- package/dist/esm/barrage.taro-e4fe81ae.js +0 -73
- package/dist/esm/calendar.taro-02479e8b.js +0 -38
- package/dist/esm/calendaritem.taro-3cfd4186.js +0 -571
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React__default, {
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { P as Popup } from './popup.taro-4c18f46c.js';
|
|
4
|
-
import { T as Tabs } from './tabs.taro-
|
|
5
|
-
import { T as TabPane } from './tabpane.taro-
|
|
4
|
+
import { T as Tabs } from './tabs.taro-4629d66c.js';
|
|
5
|
+
import { T as TabPane } from './tabpane.taro-9512e308.js';
|
|
6
6
|
import { I as Icon } from './icon.taro-c9254a81.js';
|
|
7
7
|
import { c as cn } from './bem-893ad28d.js';
|
|
8
8
|
|
|
@@ -17,10 +17,11 @@ const defaultProps$1 = {
|
|
|
17
17
|
},
|
|
18
18
|
activeColor: '#fa2c19',
|
|
19
19
|
checked: false,
|
|
20
|
+
checkedIcon: 'checklist',
|
|
20
21
|
chooseItem: () => { },
|
|
21
22
|
};
|
|
22
|
-
const InternalCascaderItem = (props) => {
|
|
23
|
-
const { data, checked, chooseItem, activeColor } = {
|
|
23
|
+
const InternalCascaderItem = (props, ref) => {
|
|
24
|
+
const { data, checked, checkedIcon, chooseItem, activeColor } = {
|
|
24
25
|
...defaultProps$1,
|
|
25
26
|
...props,
|
|
26
27
|
};
|
|
@@ -32,17 +33,11 @@ const InternalCascaderItem = (props) => {
|
|
|
32
33
|
const classesTitle = classNames({
|
|
33
34
|
[`${b('')}__title`]: true,
|
|
34
35
|
});
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
initData();
|
|
37
|
-
}, [data]);
|
|
38
|
-
const initData = () => {
|
|
39
|
-
// console.log('------data', data)
|
|
40
|
-
};
|
|
41
36
|
return (React__default.createElement("div", { style: { color: checked ? activeColor : '' }, className: classes, onClick: () => {
|
|
42
37
|
chooseItem(data);
|
|
43
38
|
} },
|
|
44
39
|
React__default.createElement("div", { className: classesTitle }, data.text),
|
|
45
|
-
data.loading ? (React__default.createElement(Icon, { color: "#969799", className: "nut-cascader-item__icon-loading", name: "loading" })) : (React__default.createElement(Icon, { className: `${checked ? b('icon-check') : ''}`, name:
|
|
40
|
+
data.loading ? (React__default.createElement(Icon, { color: "#969799", className: "nut-cascader-item__icon-loading", name: "loading" })) : (React__default.createElement(Icon, { className: `${checked ? b('icon-check') : ''}`, name: checked ? checkedIcon : '' }))));
|
|
46
41
|
};
|
|
47
42
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
48
43
|
CascaderItem.defaultProps = defaultProps$1;
|
|
@@ -180,6 +175,7 @@ const defaultProps = {
|
|
|
180
175
|
className: '',
|
|
181
176
|
style: {},
|
|
182
177
|
activeColor: '#fa2c19',
|
|
178
|
+
checkedIcon: 'checklist',
|
|
183
179
|
tabsColor: '',
|
|
184
180
|
poppable: true,
|
|
185
181
|
visible: false,
|
|
@@ -200,10 +196,10 @@ const defaultProps = {
|
|
|
200
196
|
onPathChange: () => { },
|
|
201
197
|
...Popup.defaultProps,
|
|
202
198
|
};
|
|
203
|
-
const InternalCascader = (props) => {
|
|
199
|
+
const InternalCascader = (props, ref) => {
|
|
204
200
|
const { className, style, tabsColor, poppable, visible, options, value, title, textKey, valueKey, childrenKey, convertConfig, closeable, closeIconPosition, closeIcon, lazy, lazyLoad, onClose, onChange, onPathChange, } = { ...defaultProps, ...props };
|
|
205
201
|
const [tabvalue, setTabvalue] = useState('c1');
|
|
206
|
-
const [
|
|
202
|
+
const [optionsData, setOptionsData] = useState([]);
|
|
207
203
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
208
204
|
const [state] = useState({
|
|
209
205
|
optionsData: [],
|
|
@@ -275,7 +271,7 @@ const InternalCascader = (props) => {
|
|
|
275
271
|
},
|
|
276
272
|
];
|
|
277
273
|
syncValue();
|
|
278
|
-
|
|
274
|
+
setOptionsData(state.panes);
|
|
279
275
|
};
|
|
280
276
|
// 处理有默认值时的数据
|
|
281
277
|
const syncValue = async () => {
|
|
@@ -285,7 +281,6 @@ const InternalCascader = (props) => {
|
|
|
285
281
|
}
|
|
286
282
|
if (currentValue.length === 0) {
|
|
287
283
|
state.tabsCursor = 0;
|
|
288
|
-
// state.panes = [{ nodes: state.tree.nodes, selectedNode: null }];
|
|
289
284
|
return;
|
|
290
285
|
}
|
|
291
286
|
let needToSync = currentValue;
|
|
@@ -376,12 +371,11 @@ const InternalCascader = (props) => {
|
|
|
376
371
|
onChange(optionParams, pathNodes);
|
|
377
372
|
onPathChange(optionParams, pathNodes);
|
|
378
373
|
}
|
|
379
|
-
|
|
374
|
+
setOptionsData(state.panes);
|
|
380
375
|
close();
|
|
381
376
|
return;
|
|
382
377
|
}
|
|
383
378
|
// 如果有子节点,滑到下一个
|
|
384
|
-
// if (node.children && node.children.length > 0) {
|
|
385
379
|
if (state.tree.hasChildren(node, isLazy())) {
|
|
386
380
|
const level = node.level + 1;
|
|
387
381
|
state.panes[state.tabsCursor].selectedNode = node;
|
|
@@ -393,7 +387,7 @@ const InternalCascader = (props) => {
|
|
|
393
387
|
paneKey: `c${state.tabsCursor + 1}`,
|
|
394
388
|
});
|
|
395
389
|
setTabvalue(`c${state.tabsCursor + 1}`);
|
|
396
|
-
|
|
390
|
+
setOptionsData(state.panes);
|
|
397
391
|
if (!type) {
|
|
398
392
|
const pathNodes = state.panes.map((item) => item.selectedNode);
|
|
399
393
|
const optionParams = pathNodes.map((item) => item?.value);
|
|
@@ -410,13 +404,13 @@ const InternalCascader = (props) => {
|
|
|
410
404
|
state.panes[state.tabsCursor].selectedNode = node;
|
|
411
405
|
chooseItem(node, type);
|
|
412
406
|
}
|
|
413
|
-
|
|
407
|
+
setOptionsData(state.panes);
|
|
414
408
|
};
|
|
415
409
|
const renderItem = () => {
|
|
416
410
|
return (React__default.createElement("div", { className: `${classes} ${className}`, style: style },
|
|
417
411
|
poppable && React__default.createElement("div", { className: b('title') }, title),
|
|
418
412
|
React__default.createElement(Tabs, { value: tabvalue, titleNode: () => {
|
|
419
|
-
return
|
|
413
|
+
return optionsData.map((pane, index) => (React__default.createElement("div", { onClick: () => {
|
|
420
414
|
setTabvalue(pane.paneKey);
|
|
421
415
|
state.tabsCursor = index;
|
|
422
416
|
}, className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? 'active' : ''}`, key: pane.paneKey },
|
|
@@ -430,7 +424,7 @@ const InternalCascader = (props) => {
|
|
|
430
424
|
'请选择',
|
|
431
425
|
!(!state.initLoading && state.panes.length) && 'Loading...'),
|
|
432
426
|
React__default.createElement("span", { className: "nut-tabs__titles-item__line", style: { background: tabsColor } }))));
|
|
433
|
-
} }, !state.initLoading && state.panes.length ? (
|
|
427
|
+
} }, !state.initLoading && state.panes.length ? (optionsData.map((pane) => (React__default.createElement(TabPane, { key: pane.paneKey, paneKey: pane.paneKey },
|
|
434
428
|
React__default.createElement("div", { className: classesPane }, pane.nodes &&
|
|
435
429
|
pane.nodes.map((node, index) => (React__default.createElement(CascaderItem, { key: index, ...props, data: node, checked: pane.selectedNode?.value === node.value, chooseItem: (node) => chooseItem(node, false) })))))))) : (React__default.createElement(TabPane, null,
|
|
436
430
|
React__default.createElement("div", { className: classesPane }))))));
|
|
@@ -7,13 +7,15 @@ const defaultProps$1 = {
|
|
|
7
7
|
disabled: false,
|
|
8
8
|
checkedValue: [],
|
|
9
9
|
max: undefined,
|
|
10
|
+
textPosition: 'right',
|
|
11
|
+
direction: 'vertical',
|
|
10
12
|
onChange: (value) => { },
|
|
11
13
|
options: [],
|
|
12
14
|
};
|
|
13
15
|
const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
14
16
|
const { children } = { ...defaultProps$1, ...props };
|
|
15
17
|
const b = cn('checkboxgroup');
|
|
16
|
-
const { className, disabled, onChange, checkedValue, max, options, ...rest } = props;
|
|
18
|
+
const { className, disabled, onChange, checkedValue, max, textPosition, direction, options, ...rest } = props;
|
|
17
19
|
const [innerDisabled, setInnerDisabled] = useState(disabled);
|
|
18
20
|
const [innerValue, setInnerValue] = useState(checkedValue);
|
|
19
21
|
useImperativeHandle(ref, () => ({
|
|
@@ -66,9 +68,9 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
66
68
|
return innerValue?.indexOf(child.props.label || child.children) > -1;
|
|
67
69
|
}
|
|
68
70
|
function validateChecked(value) {
|
|
69
|
-
if (innerValue
|
|
71
|
+
if (!innerValue)
|
|
70
72
|
return false;
|
|
71
|
-
return innerValue
|
|
73
|
+
return innerValue?.indexOf(value) > -1;
|
|
72
74
|
}
|
|
73
75
|
function getParentVals() {
|
|
74
76
|
return innerValue;
|
|
@@ -85,16 +87,17 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
85
87
|
onChange: handleChildChange,
|
|
86
88
|
getParentVals,
|
|
87
89
|
max,
|
|
90
|
+
textPosition,
|
|
88
91
|
});
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
const renderOptionsChildren = useCallback(() => {
|
|
92
95
|
return options?.map(({ label, value, disabled, onChange, ...rest }) => {
|
|
93
96
|
const childChecked = validateChecked(value);
|
|
94
|
-
return (React__default.createElement(Checkbox, { key: value?.toString(), children: label, label: value, disabled: innerDisabled ? true : disabled, onChange: handleChildChange, ...rest, max: max, getParentVals: getParentVals, checked: childChecked }));
|
|
97
|
+
return (React__default.createElement(Checkbox, { key: value?.toString(), children: label, label: value, disabled: innerDisabled ? true : disabled, onChange: handleChildChange, ...rest, max: max, textPosition: textPosition, getParentVals: getParentVals, checked: childChecked }));
|
|
95
98
|
});
|
|
96
|
-
}, [innerValue, options]);
|
|
97
|
-
return (React__default.createElement("div", { className: `${b()} ${className || ''}`, ...rest }, options?.length ? renderOptionsChildren() : cloneChildren()));
|
|
99
|
+
}, [innerValue, options, innerDisabled, max]);
|
|
100
|
+
return (React__default.createElement("div", { className: `${b()} nut-checkboxgroup--${props.direction} ${className || ''}`, ...rest }, options?.length ? renderOptionsChildren() : cloneChildren()));
|
|
98
101
|
});
|
|
99
102
|
CheckboxGroup.defaultProps = defaultProps$1;
|
|
100
103
|
CheckboxGroup.displayName = 'NutCheckboxGroup';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React__default, { useState, useContext, useEffect } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
2
3
|
import { D as DataContext } from './UserContext-be8097d2.js';
|
|
3
4
|
|
|
4
5
|
const defaultProps = {
|
|
@@ -30,7 +31,7 @@ const Col = (props) => {
|
|
|
30
31
|
setColName(classs);
|
|
31
32
|
setColStyle(getStyle);
|
|
32
33
|
}, [span, offset, gutter]);
|
|
33
|
-
return (React__default.createElement("div", { className:
|
|
34
|
+
return (React__default.createElement("div", { className: classNames(colName, className), style: { ...style, ...colStyle }, onClick: (e) => {
|
|
34
35
|
onClick && onClick(e, 'col');
|
|
35
36
|
} }, children));
|
|
36
37
|
};
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import React__default, { forwardRef } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { B as Button } from './button.taro-dc4795a3.js';
|
|
5
|
+
import { View } from '@tarojs/components';
|
|
5
6
|
import { CSSTransition } from 'react-transition-group';
|
|
6
7
|
import { u as useConfig } from './configprovider.taro-26882dd2.js';
|
|
7
8
|
|
|
@@ -59,12 +60,7 @@ DialogWrap.displayName = 'NutDialogWrap';
|
|
|
59
60
|
|
|
60
61
|
const DialogWrapper = (props) => {
|
|
61
62
|
const { visible, lockScroll } = props;
|
|
62
|
-
|
|
63
|
-
!visible &&
|
|
64
|
-
document.body.classList.value.includes('nut-overflow-hidden')) {
|
|
65
|
-
document.body.classList.remove('nut-overflow-hidden');
|
|
66
|
-
}
|
|
67
|
-
return (React__default.createElement("div", { style: { display: visible ? 'block' : 'none' } },
|
|
63
|
+
return (React__default.createElement(View, { style: { display: visible ? 'block' : 'none' }, catchMove: lockScroll },
|
|
68
64
|
React__default.createElement(DialogWrap, { ...props })));
|
|
69
65
|
};
|
|
70
66
|
DialogWrapper.displayName = 'NutDialogWrapper';
|
|
@@ -83,7 +79,7 @@ const defaultProps = {
|
|
|
83
79
|
footerDirection: 'horizontal',
|
|
84
80
|
lockScroll: false,
|
|
85
81
|
};
|
|
86
|
-
const BaseDialog = (props, ref) => {
|
|
82
|
+
const BaseDialog = forwardRef((props, ref) => {
|
|
87
83
|
const { locale } = useConfig();
|
|
88
84
|
const { visible, footer, noOkBtn, noCancelBtn, lockScroll, okBtnDisabled, cancelAutoClose, okText, cancelText, onClosed, onCancel, onOk, ...restProps } = props;
|
|
89
85
|
const renderFooter = function () {
|
|
@@ -115,9 +111,8 @@ const BaseDialog = (props, ref) => {
|
|
|
115
111
|
return footerContent;
|
|
116
112
|
};
|
|
117
113
|
return (React__default.createElement(DialogWrapper, { ...restProps, visible: visible, lockScroll: lockScroll, footer: renderFooter(), onClosed: onClosed, onCancel: onCancel }));
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
Dialog.displayName = 'NutDialog';
|
|
114
|
+
});
|
|
115
|
+
BaseDialog.defaultProps = defaultProps;
|
|
116
|
+
BaseDialog.displayName = 'NutDialog';
|
|
122
117
|
|
|
123
|
-
export {
|
|
118
|
+
export { BaseDialog as B };
|
|
@@ -193,7 +193,6 @@ const Ellipsis = (props) => {
|
|
|
193
193
|
if (type === 1) {
|
|
194
194
|
setExpanded(true);
|
|
195
195
|
onChange && onChange('expand');
|
|
196
|
-
// emit('change', 'expand')
|
|
197
196
|
}
|
|
198
197
|
else {
|
|
199
198
|
setExpanded(false);
|
|
@@ -212,14 +211,16 @@ const Ellipsis = (props) => {
|
|
|
212
211
|
React__default.createElement("div", { className: "nut-ellipsis-wordbreak" },
|
|
213
212
|
ellipsis.current?.leading,
|
|
214
213
|
ellipsis.current?.leading && symbol,
|
|
215
|
-
expandText ? (React__default.createElement("span", { className: "nut-ellipsis-text", onClick: () => {
|
|
214
|
+
expandText ? (React__default.createElement("span", { className: "nut-ellipsis-text", onClick: (e) => {
|
|
215
|
+
e.stopPropagation();
|
|
216
216
|
clickHandle(1);
|
|
217
217
|
} }, expandText)) : null,
|
|
218
218
|
ellipsis.current?.tailing && symbol,
|
|
219
219
|
ellipsis.current?.tailing))) : null,
|
|
220
220
|
exceeded && expanded ? (React__default.createElement(React__default.Fragment, null,
|
|
221
221
|
content,
|
|
222
|
-
expandText ? (React__default.createElement("span", { className: "nut-ellipsis-text", onClick: () => {
|
|
222
|
+
expandText ? (React__default.createElement("span", { className: "nut-ellipsis-text", onClick: (e) => {
|
|
223
|
+
e.stopPropagation();
|
|
223
224
|
clickHandle(2);
|
|
224
225
|
} }, collapseText)) : null)) : null)),
|
|
225
226
|
React__default.createElement("div", { className: "nut-ellipsis-copy", ref: rootContain, id: `rootContain${refRandomId}`, style: { width: `${widthRef}` } },
|
|
@@ -57,15 +57,7 @@ const InputNumber = (props) => {
|
|
|
57
57
|
onChangeFuc && onChangeFuc(outputValue, e);
|
|
58
58
|
change && change(outputValue, e);
|
|
59
59
|
if (!isAsync) {
|
|
60
|
-
|
|
61
|
-
setInputValue(Number(min));
|
|
62
|
-
}
|
|
63
|
-
else if (Number(outputValue) > Number(max)) {
|
|
64
|
-
setInputValue(Number(max));
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
setInputValue(outputValue);
|
|
68
|
-
}
|
|
60
|
+
setInputValue(outputValue);
|
|
69
61
|
}
|
|
70
62
|
};
|
|
71
63
|
const reduceNumber = (e) => {
|
|
@@ -93,16 +85,11 @@ const InputNumber = (props) => {
|
|
|
93
85
|
}
|
|
94
86
|
};
|
|
95
87
|
const changeValue = (e) => {
|
|
96
|
-
const
|
|
97
|
-
change && change(value, e);
|
|
98
|
-
onChangeFuc && onChangeFuc(value, e);
|
|
88
|
+
const input = e.target;
|
|
89
|
+
change && change(input.value, e);
|
|
90
|
+
onChangeFuc && onChangeFuc(input.value, e);
|
|
99
91
|
if (!isAsync) {
|
|
100
|
-
|
|
101
|
-
setInputValue(inputValue);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
setInputValue(value);
|
|
105
|
-
}
|
|
92
|
+
setInputValue(input.value);
|
|
106
93
|
}
|
|
107
94
|
};
|
|
108
95
|
const focusValue = (e) => {
|
|
@@ -118,7 +105,8 @@ const InputNumber = (props) => {
|
|
|
118
105
|
return;
|
|
119
106
|
if (readonly)
|
|
120
107
|
return;
|
|
121
|
-
|
|
108
|
+
const input = e.target;
|
|
109
|
+
let value = +input.value;
|
|
122
110
|
if (value < Number(min)) {
|
|
123
111
|
value = Number(min);
|
|
124
112
|
}
|
|
@@ -130,9 +118,11 @@ const InputNumber = (props) => {
|
|
|
130
118
|
blur && blur(e);
|
|
131
119
|
};
|
|
132
120
|
return (React__default.createElement("div", { className: classes, style: styles, ...restProps },
|
|
133
|
-
React__default.createElement(
|
|
121
|
+
React__default.createElement("div", { className: "nut-input-minus" },
|
|
122
|
+
React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: iconMinusClasses, size: buttonSize, name: "minus", onClick: reduceNumber })),
|
|
134
123
|
React__default.createElement("input", { className: "nut-number-input", type: "number", min: min, max: max, style: { width: pxCheck(inputWidth) }, disabled: disabled, readOnly: readonly, value: inputValue, onInput: changeValue, onBlur: burValue, onFocus: focusValue }),
|
|
135
|
-
React__default.createElement(
|
|
124
|
+
React__default.createElement("div", { className: "nut-input-add" },
|
|
125
|
+
React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: iconAddClasses, size: buttonSize, name: "plus", onClick: addNumber }))));
|
|
136
126
|
};
|
|
137
127
|
InputNumber.defaultProps = defaultProps;
|
|
138
128
|
InputNumber.displayName = 'NutInputNumber';
|
|
@@ -6,12 +6,12 @@ export { I as Icon } from './icon.taro-c9254a81.js';
|
|
|
6
6
|
export { I as Image } from './image.taro-1d867416.js';
|
|
7
7
|
export { O as Overlay } from './overlay.taro-1e74a71d.js';
|
|
8
8
|
export { P as Popup } from './popup.taro-4c18f46c.js';
|
|
9
|
-
export { C as Col } from './col.taro-
|
|
9
|
+
export { C as Col } from './col.taro-9e4c5cc0.js';
|
|
10
10
|
export { D as Divider } from './divider.taro-5236fe6a.js';
|
|
11
11
|
export { G as Grid } from './grid.taro-e6decfce.js';
|
|
12
12
|
export { G as GridItem } from './griditem.taro-5406bd2c.js';
|
|
13
13
|
export { L as Layout } from './layout.taro-358f014f.js';
|
|
14
|
-
export { R as Row } from './row.taro-
|
|
14
|
+
export { R as Row } from './row.taro-4e697aa2.js';
|
|
15
15
|
export { S as Sticky } from './sticky.taro-2d9b2804.js';
|
|
16
16
|
export { E as Elevator } from './elevator.taro-1d749ab0.js';
|
|
17
17
|
export { F as FixedNav } from './fixednav.taro-84930e08.js';
|
|
@@ -23,36 +23,36 @@ export { P as Pagination } from './pagination.taro-bb490de9.js';
|
|
|
23
23
|
export { S as SideNavBar } from './sidenavbar.taro-51a133e6.js';
|
|
24
24
|
export { S as SideNavBarItem } from './sidenavbaritem.taro-fee11d26.js';
|
|
25
25
|
export { S as SubSideNavBar } from './subsidenavbar.taro-f46b4c73.js';
|
|
26
|
-
export { T as Tabbar } from './tabbar.taro-
|
|
26
|
+
export { T as Tabbar } from './tabbar.taro-17d898d9.js';
|
|
27
27
|
export { T as TabbarItem } from './tabbaritem.taro-3643f585.js';
|
|
28
|
-
export { T as TabPane } from './tabpane.taro-
|
|
29
|
-
export { T as Tabs } from './tabs.taro-
|
|
30
|
-
export { C as Calendar } from './calendar.taro-
|
|
31
|
-
export { C as CalendarItem } from './calendaritem.taro-
|
|
32
|
-
export { C as Cascader } from './cascader.taro-
|
|
33
|
-
export { C as Checkbox, a as CheckboxGroup } from './checkbox.taro-
|
|
28
|
+
export { T as TabPane } from './tabpane.taro-9512e308.js';
|
|
29
|
+
export { T as Tabs } from './tabs.taro-4629d66c.js';
|
|
30
|
+
export { C as Calendar } from './calendar.taro-c95e6998.js';
|
|
31
|
+
export { C as CalendarItem } from './calendaritem.taro-86412398.js';
|
|
32
|
+
export { C as Cascader } from './cascader.taro-e0fb7e63.js';
|
|
33
|
+
export { C as Checkbox, a as CheckboxGroup } from './checkbox.taro-b76b1c82.js';
|
|
34
34
|
export { D as DatePicker } from './datepicker.taro-c61c6586.js';
|
|
35
35
|
export { F as Form } from './form.taro-ce791a58.js';
|
|
36
36
|
export { F as FormItem } from './formitem.taro-f2ed02d4.js';
|
|
37
37
|
export { I as Input } from './input.taro-991945d1.js';
|
|
38
|
-
export { I as InputNumber } from './inputnumber.taro-
|
|
38
|
+
export { I as InputNumber } from './inputnumber.taro-94c75663.js';
|
|
39
39
|
export { N as NumberKeyboard } from './numberkeyboard.taro-c6b5b0e1.js';
|
|
40
40
|
export { P as Picker } from './picker.taro-fa937ea1.js';
|
|
41
41
|
export { R as Radio, a as RadioGroup } from './index.taro-84346556.js';
|
|
42
42
|
export { R as Range } from './range.taro-b628f1ed.js';
|
|
43
43
|
export { R as Rate } from './rate.taro-17b84a51.js';
|
|
44
44
|
export { S as SearchBar } from './searchbar.taro-6864f7bc.js';
|
|
45
|
-
export { S as ShortPassword } from './shortpassword.taro-
|
|
46
|
-
export { T as TextArea } from './textarea.taro-
|
|
47
|
-
export { U as Uploader } from './uploader.taro-
|
|
45
|
+
export { S as ShortPassword } from './shortpassword.taro-53b7ee7b.js';
|
|
46
|
+
export { T as TextArea } from './textarea.taro-47addd05.js';
|
|
47
|
+
export { U as Uploader } from './uploader.taro-c830b573.js';
|
|
48
48
|
export { A as ActionSheet } from './actionsheet.taro-166ce936.js';
|
|
49
49
|
export { B as BackTop } from './backtop.taro-e53236c7.js';
|
|
50
|
-
export {
|
|
50
|
+
export { B as Dialog } from './dialog.taro-7608bd26.js';
|
|
51
51
|
export { D as Drag } from './drag.taro-703560c4.js';
|
|
52
52
|
export { I as Infiniteloading } from './infiniteloading.taro-8ead43b0.js';
|
|
53
53
|
export { N as Notify } from './notify.taro-c9ea8d68.js';
|
|
54
54
|
export { P as PullToRefresh } from './pulltorefresh.taro-2b50fdf3.js';
|
|
55
|
-
export { S as Swipe } from './swipe.taro-
|
|
55
|
+
export { S as Swipe } from './swipe.taro-6532405d.js';
|
|
56
56
|
export { S as Switch } from './switch.taro-bae2dca0.js';
|
|
57
57
|
export { T as Toast } from './toast.taro-0f972a92.js';
|
|
58
58
|
export { A as Animate } from './animate.taro-b0e83dd5.js';
|
|
@@ -60,16 +60,16 @@ export { A as AnimatingNumbers } from './animatingnumbers.taro-6307a3a5.js';
|
|
|
60
60
|
export { A as Audio } from './audio.taro-c2cdbe18.js';
|
|
61
61
|
export { A as Avatar } from './avatar.taro-c17c3d15.js';
|
|
62
62
|
export { A as AvatarGroup } from './avatargroup-1d900174.js';
|
|
63
|
-
export { B as Badge } from './badge.taro-
|
|
63
|
+
export { B as Badge } from './badge.taro-116b2521.js';
|
|
64
64
|
export { C as CircleProgress } from './circleprogress.taro-47db537c.js';
|
|
65
65
|
export { C as Collapse } from './collapse.taro-af58206c.js';
|
|
66
66
|
export { C as CollapseItem } from './collapseitem-2e864527.js';
|
|
67
67
|
export { C as CountDown } from './countdown.taro-9e40de9c.js';
|
|
68
|
-
export { E as Ellipsis } from './ellipsis.taro-
|
|
68
|
+
export { E as Ellipsis } from './ellipsis.taro-5aa23940.js';
|
|
69
69
|
export { E as Empty } from './empty.taro-7bd813f9.js';
|
|
70
70
|
export { I as ImagePreview } from './imagepreview.taro-2d23d0ae.js';
|
|
71
71
|
export { N as NoticeBar } from './noticebar.taro-22486646.js';
|
|
72
|
-
export { P as Popover } from './popover.taro-
|
|
72
|
+
export { P as Popover } from './popover.taro-f144cd02.js';
|
|
73
73
|
export { P as Price } from './price.taro-8801462e.js';
|
|
74
74
|
export { P as Progress } from './progress.taro-773482ed.js';
|
|
75
75
|
export { S as Skeleton } from './skeleton.taro-38e2fca2.js';
|
|
@@ -84,7 +84,7 @@ export { V as Video } from './video-8a3518c5.js';
|
|
|
84
84
|
export { V as VirtualList } from './virtuallist.taro-1688484f.js';
|
|
85
85
|
export { W as WaterMark } from './watermark.taro-a948c735.js';
|
|
86
86
|
export { A as Address } from './address.taro-55f308f1.js';
|
|
87
|
-
export { B as Barrage } from './barrage.taro-
|
|
87
|
+
export { B as Barrage } from './barrage.taro-5dbab093.js';
|
|
88
88
|
export { C as Card } from './card.taro-a03f0dfc.js';
|
|
89
89
|
export { S as Signature } from './signature.taro-45d1dde3.js';
|
|
90
90
|
export { T as TimeDetail } from './timedetail.taro-c5f564fd.js';
|
|
@@ -139,13 +139,15 @@ const Popover = (props) => {
|
|
|
139
139
|
visible ? (React__default.createElement("div", { className: `${popoverContent}`, style: getStyle() },
|
|
140
140
|
React__default.createElement("div", { className: `${popoverArrow}` }),
|
|
141
141
|
Array.isArray(children) ? children[1] : '',
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
React__default.createElement("div", null,
|
|
143
|
+
' ',
|
|
144
|
+
list.map((item, i) => {
|
|
145
|
+
return (React__default.createElement("div", { key: item.name, className: `popover-menu-item ${item.disabled ? 'disabled' : ''}`, onClick: () => {
|
|
146
|
+
handleChoose(item, i);
|
|
147
|
+
} },
|
|
148
|
+
item.icon ? (React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: "popover-menu-item-img", name: item.icon })) : (''),
|
|
149
|
+
React__default.createElement("div", { className: "popover-menu-item-name" }, item.name)));
|
|
150
|
+
})))) : null))),
|
|
149
151
|
visible ? (React__default.createElement(Overlay, { visible: visible, onClick: (e) => handleClick(e), style: { background: 'transparent' } })) : ('')));
|
|
150
152
|
};
|
|
151
153
|
Popover.defaultProps = defaultProps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
2
3
|
import { D as DataContext } from './UserContext-be8097d2.js';
|
|
3
4
|
|
|
4
5
|
const defaultProps = {
|
|
@@ -32,7 +33,7 @@ const Row = (props) => {
|
|
|
32
33
|
gutter,
|
|
33
34
|
};
|
|
34
35
|
return (React__default.createElement(DataContext.Provider, { value: parentRow }, React__default.createElement('div', {
|
|
35
|
-
className:
|
|
36
|
+
className: classNames(getClasses(), className),
|
|
36
37
|
style,
|
|
37
38
|
onClick: (e) => {
|
|
38
39
|
onClick && onClick(e, 'row');
|
|
@@ -17,6 +17,7 @@ const defaultProps = {
|
|
|
17
17
|
closeOnClickOverlay: true,
|
|
18
18
|
length: 6,
|
|
19
19
|
className: '',
|
|
20
|
+
autoFocus: false,
|
|
20
21
|
onChange: (value) => { },
|
|
21
22
|
onOk: (value) => { },
|
|
22
23
|
onCancel: () => { },
|
|
@@ -26,7 +27,7 @@ const defaultProps = {
|
|
|
26
27
|
};
|
|
27
28
|
const ShortPassword = (props) => {
|
|
28
29
|
const { locale } = useConfig();
|
|
29
|
-
const { title, desc, tips, visible, modelValue, errorMsg, noButton, closeOnClickOverlay, length, style, className, onChange, onOk, onTips, onCancel, onClose, onComplete, iconClassPrefix, iconFontClassName, ...reset } = props;
|
|
30
|
+
const { title, desc, tips, visible, modelValue, errorMsg, noButton, closeOnClickOverlay, length, style, className, onChange, onOk, onTips, onCancel, onClose, onComplete, iconClassPrefix, iconFontClassName, autoFocus, ...reset } = props;
|
|
30
31
|
const b = cn('shortpassword');
|
|
31
32
|
const textInput = useRef(null);
|
|
32
33
|
const range = (val) => {
|
|
@@ -91,7 +92,7 @@ const ShortPassword = (props) => {
|
|
|
91
92
|
React__default.createElement("div", { className: b('title') }, title || locale.shortpassword.title),
|
|
92
93
|
React__default.createElement("div", { className: b('subtitle') }, desc || locale.shortpassword.desc),
|
|
93
94
|
React__default.createElement("div", { className: b('input') },
|
|
94
|
-
React__default.createElement("input", { ref: textInput, className: b('input-real'), type: "number", style: systemStyle(), maxLength: 6, value: inputValue, onChange: (e) => changeValue(e) }),
|
|
95
|
+
React__default.createElement("input", { ref: textInput, className: b('input-real'), type: "number", style: systemStyle(), maxLength: 6, value: inputValue, autoFocus: autoFocus, onChange: (e) => changeValue(e) }),
|
|
95
96
|
React__default.createElement("div", { className: b('input-site') }),
|
|
96
97
|
React__default.createElement("div", { className: b('input-fake'), onClick: () => focus() }, [...new Array(comLen).keys()].map((item, index) => {
|
|
97
98
|
return (React__default.createElement("div", { className: b('input-fake__li'), key: index }, String(inputValue).length > index ? (React__default.createElement("div", { className: b('input-fake__li__icon') })) : null));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React__default, { forwardRef, useRef, useState, useMemo, useImperativeHandle, useEffect } from 'react';
|
|
2
|
+
import { useReady, nextTick } from '@tarojs/taro';
|
|
2
3
|
import { c as cn } from './bem-893ad28d.js';
|
|
3
4
|
import { u as useTouch } from './useTouch-a2ea68c6.js';
|
|
4
5
|
import { g as getRectByTaro } from './useClientRect-4506e52f.js';
|
|
@@ -19,6 +20,20 @@ const defaultProps = {
|
|
|
19
20
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
20
21
|
const swipeBem = cn('swipe');
|
|
21
22
|
const touch = useTouch();
|
|
23
|
+
// 获取元素的时候要在页面 onReady 后,需要参考小程序的事件周期
|
|
24
|
+
useReady(() => {
|
|
25
|
+
const getWidth = async () => {
|
|
26
|
+
if (leftWrapper.current) {
|
|
27
|
+
const leftRect = await getRectByTaro(leftWrapper.current);
|
|
28
|
+
setActionWidth((v) => ({ ...v, left: leftRect.width }));
|
|
29
|
+
}
|
|
30
|
+
if (rightWrapper.current) {
|
|
31
|
+
const rightRect = await getRectByTaro(rightWrapper.current);
|
|
32
|
+
setActionWidth((v) => ({ ...v, right: rightRect.width }));
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
nextTick(() => getWidth());
|
|
36
|
+
});
|
|
22
37
|
const { children, className, style } = { ...defaultProps, ...props };
|
|
23
38
|
const root = useRef();
|
|
24
39
|
const opened = useRef(false);
|
|
@@ -112,34 +127,11 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
112
127
|
const rangeCalculation = (num, min, max) => {
|
|
113
128
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
114
129
|
};
|
|
115
|
-
// const getNodeWidth = (node: Element) => {
|
|
116
|
-
// if (node) {
|
|
117
|
-
// const ele: any = getRectByTaro(node)
|
|
118
|
-
// return ele.width
|
|
119
|
-
// }
|
|
120
|
-
// return 0
|
|
121
|
-
// }
|
|
122
|
-
// const leftRef = useCallback(
|
|
123
|
-
// (node: Element | null) => {
|
|
124
|
-
// if (node !== null) {
|
|
125
|
-
// setActionWidth((v) => ({ ...v, left: getNodeWidth(node) }))
|
|
126
|
-
// }
|
|
127
|
-
// },
|
|
128
|
-
// [props.leftAction]
|
|
129
|
-
// )
|
|
130
|
-
// const rightRef = useCallback(
|
|
131
|
-
// (node: Element | null) => {
|
|
132
|
-
// if (node !== null) {
|
|
133
|
-
// setActionWidth((v) => ({ ...v, right: getNodeWidth(node) }))
|
|
134
|
-
// }
|
|
135
|
-
// },
|
|
136
|
-
// [props.rightAction]
|
|
137
|
-
// )
|
|
138
130
|
const leftWrapper = useRef(null);
|
|
139
131
|
const rightWrapper = useRef(null);
|
|
140
132
|
const renderActionContent = (side) => {
|
|
141
133
|
if (props[`${side}Action`]) {
|
|
142
|
-
return (React__default.createElement("div", { ref: side === 'left' ? leftWrapper : rightWrapper, className: `${swipeBem(side)}`, onClick: (e) => handleOperate(e, side) }, props[`${side}Action`]));
|
|
134
|
+
return (React__default.createElement("div", { id: "left", ref: side === 'left' ? leftWrapper : rightWrapper, className: `${swipeBem(side)}`, onClick: (e) => handleOperate(e, side) }, props[`${side}Action`]));
|
|
143
135
|
}
|
|
144
136
|
return null;
|
|
145
137
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { useState } from 'react';
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
2
|
import { c as cn } from './bem-893ad28d.js';
|
|
3
3
|
|
|
4
4
|
const defaultProps = {
|
|
@@ -10,19 +10,25 @@ const defaultProps = {
|
|
|
10
10
|
safeAreaInsetBottom: false,
|
|
11
11
|
className: '',
|
|
12
12
|
style: {},
|
|
13
|
-
|
|
14
|
-
onSwitch: () => { },
|
|
13
|
+
onSwitch: (child, activeVisible) => { },
|
|
15
14
|
};
|
|
16
15
|
const Tabbar = (props) => {
|
|
17
|
-
const { children, visible, bottom, size, activeColor, unactiveColor, safeAreaInsetBottom, className, style,
|
|
16
|
+
const { children, visible, activeVisible, bottom, size, activeColor, unactiveColor, safeAreaInsetBottom, className, style, onSwitch, } = {
|
|
18
17
|
...defaultProps,
|
|
19
18
|
...props,
|
|
20
19
|
};
|
|
21
20
|
const b = cn('tabbar');
|
|
22
|
-
const [selectIndex, setSelectIndex] = useState(visible);
|
|
21
|
+
const [selectIndex, setSelectIndex] = useState(activeVisible || visible);
|
|
23
22
|
const handleClick = (idx) => {
|
|
24
|
-
|
|
23
|
+
if (!('activeVisible' in props)) {
|
|
24
|
+
setSelectIndex(idx);
|
|
25
|
+
}
|
|
25
26
|
};
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (activeVisible !== undefined) {
|
|
29
|
+
setSelectIndex(activeVisible);
|
|
30
|
+
}
|
|
31
|
+
}, [activeVisible]);
|
|
26
32
|
return (React__default.createElement("div", { className: [
|
|
27
33
|
`${b()}`,
|
|
28
34
|
bottom ? `${b('bottom')}` : '',
|
|
@@ -41,7 +47,6 @@ const Tabbar = (props) => {
|
|
|
41
47
|
size,
|
|
42
48
|
handleClick: () => {
|
|
43
49
|
handleClick(idx);
|
|
44
|
-
tabSwitch(child, idx);
|
|
45
50
|
onSwitch(child, idx);
|
|
46
51
|
},
|
|
47
52
|
};
|
|
@@ -9,15 +9,15 @@ const defaultProps = {
|
|
|
9
9
|
disabled: false,
|
|
10
10
|
};
|
|
11
11
|
const TabPane = (props) => {
|
|
12
|
-
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
12
|
+
const { children, paneKey, activeKey, autoHeightClassName, className, disabled, } = {
|
|
13
13
|
...defaultProps,
|
|
14
14
|
...props,
|
|
15
15
|
};
|
|
16
16
|
const b = cn('tabpane');
|
|
17
17
|
const classes = classNames({
|
|
18
|
-
active: paneKey === activeKey,
|
|
18
|
+
active: !disabled && paneKey === activeKey,
|
|
19
19
|
}, b(''), autoHeightClassName, className);
|
|
20
|
-
return React__default.createElement("div", { className: classes }, children);
|
|
20
|
+
return React__default.createElement("div", { className: classes }, !disabled && children);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export { TabPane as T };
|