ztxkui 2.8.4 → 2.8.5
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/components/RangePicker/range-picker.js +19 -13
- package/dist/index.js +72 -98
- package/package.json +1 -1
|
@@ -64,26 +64,32 @@ function RangePicker(_a) {
|
|
|
64
64
|
* @description 监听值改变触发单独选择框的值改变
|
|
65
65
|
*/
|
|
66
66
|
useEffect(function () {
|
|
67
|
-
var _a, _b
|
|
67
|
+
var _a, _b;
|
|
68
68
|
if (Array.isArray(restProps.value)) {
|
|
69
69
|
setDatePickerValue(restProps.value[0]);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
['9999', '9999-12-31', '9999-12'].includes((
|
|
70
|
+
if (showFar &&
|
|
71
|
+
restProps.value[1] &&
|
|
72
|
+
['9999', '9999-12-31', '9999-12'].includes((_b = (_a = restProps.value[1]) === null || _a === void 0 ? void 0 : _a.format) === null || _b === void 0 ? void 0 : _b.call(_a, formatString))) {
|
|
73
73
|
setChecked(true);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
}, [restProps.value, formatString]);
|
|
76
|
+
}, [restProps.value, formatString, showFar]);
|
|
77
77
|
/**至今组件切换 */
|
|
78
78
|
var onFarChangeHandle = function (e) {
|
|
79
|
-
if (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
// if (
|
|
80
|
+
// e.target.checked &&
|
|
81
|
+
// Array.isArray(restProps.value) &&
|
|
82
|
+
// restProps.value[0]
|
|
83
|
+
// ) {
|
|
84
|
+
// const firstValue = restProps.value[0];
|
|
85
|
+
// restProps.onChange &&
|
|
86
|
+
// restProps.onChange(
|
|
87
|
+
// [firstValue, dayjs('9999-12-31')],
|
|
88
|
+
// [firstValue.format(formatString), '9999-12-31']
|
|
89
|
+
// );
|
|
90
|
+
// setDatePickerValue(firstValue);
|
|
91
|
+
// }
|
|
92
|
+
restProps.onChange && restProps.onChange([null, null], ['', '']);
|
|
87
93
|
setChecked(e.target.checked);
|
|
88
94
|
};
|
|
89
95
|
/**至今组件 */
|
package/dist/index.js
CHANGED
|
@@ -1,101 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
// </Route>
|
|
74
|
-
// <Route exact path="/test">
|
|
75
|
-
// <div>
|
|
76
|
-
// <h1>
|
|
77
|
-
// <Link to="/select">select</Link>
|
|
78
|
-
// </h1>
|
|
79
|
-
// <h1>
|
|
80
|
-
// <Link to="/tree-select">tree select</Link>
|
|
81
|
-
// </h1>
|
|
82
|
-
// <h1>
|
|
83
|
-
// <Link to="/tree">tree</Link>
|
|
84
|
-
// </h1>
|
|
85
|
-
// <h1>
|
|
86
|
-
// <Link to="/upload">upload</Link>
|
|
87
|
-
// </h1>
|
|
88
|
-
// <h1>
|
|
89
|
-
// <Link to="/drag-sort">drag-sort</Link>
|
|
90
|
-
// </h1>
|
|
91
|
-
// </div>
|
|
92
|
-
// </Route>
|
|
93
|
-
// </Switch>
|
|
94
|
-
// </BrowserRouter>
|
|
95
|
-
// </ConfigProvider>,
|
|
96
|
-
// // </React.StrictMode>,
|
|
97
|
-
// document.getElementById('root')
|
|
98
|
-
// );
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import App from './App';
|
|
4
|
+
import { ConfigProvider } from 'antd';
|
|
5
|
+
import zhCN from 'antd/lib/locale/zh_CN';
|
|
6
|
+
import * as dayjs from 'dayjs';
|
|
7
|
+
import zhCn from 'dayjs/locale/zh-cn';
|
|
8
|
+
import { BrowserRouter, Switch, Route, Link } from 'react-router-dom';
|
|
9
|
+
import Demo from './Demo';
|
|
10
|
+
import TreeSelectDemo from './TreeSelectDemo';
|
|
11
|
+
import TreeDemo from './TreeDemo';
|
|
12
|
+
import UploadDemo from './UploadDemo';
|
|
13
|
+
import CollapseDemo from './DemoCom/CollapseDemo';
|
|
14
|
+
import TimelineDemo from './DemoCom/TimelineDemo';
|
|
15
|
+
import WeChatDemo from './DemoCom/WechatDemo';
|
|
16
|
+
import TableDemo from './DemoCom/TableDemo';
|
|
17
|
+
import TableDemo1 from './DemoCom/TableDemo1';
|
|
18
|
+
import BasicDemo from './DemoCom/BasicDemo';
|
|
19
|
+
import FormDemo from './DemoCom/FormDemo';
|
|
20
|
+
import TableAnalyse from './DemoCom/TableAnalyse';
|
|
21
|
+
import DragSort from './DemoCom/DragSort';
|
|
22
|
+
import PrintDemo from './DemoCom/PrintDemo';
|
|
23
|
+
dayjs.locale(zhCn);
|
|
24
|
+
ReactDOM.render(
|
|
25
|
+
// <React.StrictMode>
|
|
26
|
+
React.createElement(ConfigProvider, { locale: zhCN },
|
|
27
|
+
React.createElement(BrowserRouter, null,
|
|
28
|
+
React.createElement(Switch, null,
|
|
29
|
+
React.createElement(Route, { exact: true, path: "/" },
|
|
30
|
+
React.createElement(App, null)),
|
|
31
|
+
React.createElement(Route, { exact: true, path: "/select" },
|
|
32
|
+
React.createElement(Demo, null)),
|
|
33
|
+
React.createElement(Route, { exact: true, path: "/tree-select" },
|
|
34
|
+
React.createElement(TreeSelectDemo, null)),
|
|
35
|
+
React.createElement(Route, { exact: true, path: "/tree" },
|
|
36
|
+
React.createElement(TreeDemo, null)),
|
|
37
|
+
React.createElement(Route, { exact: true, path: "/upload" },
|
|
38
|
+
React.createElement(UploadDemo, null)),
|
|
39
|
+
React.createElement(Route, { exact: true, path: "/collapse" },
|
|
40
|
+
React.createElement(CollapseDemo, null)),
|
|
41
|
+
React.createElement(Route, { exact: true, path: "/timeline" },
|
|
42
|
+
React.createElement(TimelineDemo, null)),
|
|
43
|
+
React.createElement(Route, { exact: true, path: "/wechat" },
|
|
44
|
+
React.createElement(WeChatDemo, null)),
|
|
45
|
+
React.createElement(Route, { exact: true, path: "/table" },
|
|
46
|
+
React.createElement(TableDemo, null)),
|
|
47
|
+
React.createElement(Route, { exact: true, path: "/table1" },
|
|
48
|
+
React.createElement(TableDemo1, null)),
|
|
49
|
+
React.createElement(Route, { exact: true, path: "/basic" },
|
|
50
|
+
React.createElement(BasicDemo, null)),
|
|
51
|
+
React.createElement(Route, { exact: true, path: "/form" },
|
|
52
|
+
React.createElement(FormDemo, null)),
|
|
53
|
+
React.createElement(Route, { exact: true, path: "/print" },
|
|
54
|
+
React.createElement(PrintDemo, null)),
|
|
55
|
+
React.createElement(Route, { exact: true, path: "/table-analyse" },
|
|
56
|
+
React.createElement(TableAnalyse, null)),
|
|
57
|
+
React.createElement(Route, { exact: true, path: "/drag-sort" },
|
|
58
|
+
React.createElement(DragSort, null)),
|
|
59
|
+
React.createElement(Route, { exact: true, path: "/test" },
|
|
60
|
+
React.createElement("div", null,
|
|
61
|
+
React.createElement("h1", null,
|
|
62
|
+
React.createElement(Link, { to: "/select" }, "select")),
|
|
63
|
+
React.createElement("h1", null,
|
|
64
|
+
React.createElement(Link, { to: "/tree-select" }, "tree select")),
|
|
65
|
+
React.createElement("h1", null,
|
|
66
|
+
React.createElement(Link, { to: "/tree" }, "tree")),
|
|
67
|
+
React.createElement("h1", null,
|
|
68
|
+
React.createElement(Link, { to: "/upload" }, "upload")),
|
|
69
|
+
React.createElement("h1", null,
|
|
70
|
+
React.createElement(Link, { to: "/drag-sort" }, "drag-sort"))))))),
|
|
71
|
+
// </React.StrictMode>,
|
|
72
|
+
document.getElementById('root'));
|
|
99
73
|
export { default as Button } from './components/Button';
|
|
100
74
|
export { default as Calendar } from './components/Calendar';
|
|
101
75
|
export { default as Checkbox } from './components/Checkbox';
|