ztxkui 2.4.3 → 2.4.4
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.
|
@@ -174,13 +174,7 @@ var list1 = [
|
|
|
174
174
|
connector: ' ', // 连接符
|
|
175
175
|
},
|
|
176
176
|
// 材质
|
|
177
|
-
texture:
|
|
178
|
-
isRequired: 1,
|
|
179
|
-
addonBefore: null,
|
|
180
|
-
addonAfter: null,
|
|
181
|
-
unit: null,
|
|
182
|
-
connector: ' ', // 连接符
|
|
183
|
-
},
|
|
177
|
+
texture: null,
|
|
184
178
|
// 规格,一个产品层次可能对应多个规格
|
|
185
179
|
specifications: [
|
|
186
180
|
{
|
|
@@ -315,6 +309,18 @@ var TableDemo = function () {
|
|
|
315
309
|
width: 100,
|
|
316
310
|
dataIndex: 'key2',
|
|
317
311
|
key: 'key2',
|
|
312
|
+
shouldCellUpdate: function (record, preRecord) {
|
|
313
|
+
console.log('key2render');
|
|
314
|
+
if (lengthChange) {
|
|
315
|
+
setLengthChange(false);
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
if (moveChange) {
|
|
319
|
+
setMoveChange(false);
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
return record.key2 !== preRecord.key2;
|
|
323
|
+
},
|
|
318
324
|
render: function (text, record, index) {
|
|
319
325
|
return (React.createElement(EnhanceSelect, { value: text, list: list1, dataKey: "id", titleKey: "name", onChange: function (value, option, fullData) {
|
|
320
326
|
var newRecord = {
|
|
@@ -350,7 +356,7 @@ var TableDemo = function () {
|
|
|
350
356
|
catch (err) {
|
|
351
357
|
console.log(err);
|
|
352
358
|
}
|
|
353
|
-
return React.createElement(TestCom, { aboutField: aboutField, controleType: "
|
|
359
|
+
return React.createElement(TestCom, { aboutField: aboutField, controleType: "hide" });
|
|
354
360
|
},
|
|
355
361
|
},
|
|
356
362
|
{
|
|
@@ -20,15 +20,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import React from 'react';
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
24
24
|
import { Spin } from 'antd';
|
|
25
25
|
import classNames from 'classnames';
|
|
26
|
-
var Container = function (_a) {
|
|
26
|
+
var Container = forwardRef(function (_a, ref) {
|
|
27
27
|
var loading = _a.loading, children = _a.children, className = _a.className, restProps = __rest(_a, ["loading", "children", "className"]);
|
|
28
28
|
var classes = classNames('zt-container', className);
|
|
29
|
-
return (React.createElement("div", __assign({ className: classes }, restProps),
|
|
29
|
+
return (React.createElement("div", __assign({ className: classes }, restProps, { ref: ref }),
|
|
30
30
|
loading && (React.createElement("div", { className: "zt-container__loading" },
|
|
31
31
|
React.createElement(Spin, { size: "large", spinning: loading }))),
|
|
32
32
|
children));
|
|
33
|
-
};
|
|
33
|
+
});
|
|
34
34
|
export default Container;
|
package/dist/index.js
CHANGED
|
@@ -1,82 +1,61 @@
|
|
|
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
|
-
// <div>
|
|
60
|
-
// <h1>
|
|
61
|
-
// <Link to="/select">select</Link>
|
|
62
|
-
// </h1>
|
|
63
|
-
// <h1>
|
|
64
|
-
// <Link to="/tree-select">tree select</Link>
|
|
65
|
-
// </h1>
|
|
66
|
-
// <h1>
|
|
67
|
-
// <Link to="/tree">tree</Link>
|
|
68
|
-
// </h1>
|
|
69
|
-
// <h1>
|
|
70
|
-
// <Link to="/upload">upload</Link>
|
|
71
|
-
// </h1>
|
|
72
|
-
// </div>
|
|
73
|
-
// </Route>
|
|
74
|
-
// </Switch>
|
|
75
|
-
// </BrowserRouter>
|
|
76
|
-
// </ConfigProvider>,
|
|
77
|
-
// // </React.StrictMode>,
|
|
78
|
-
// document.getElementById('root')
|
|
79
|
-
// );
|
|
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 BasicDemo from './DemoCom/BasicDemo';
|
|
18
|
+
import FormDemo from './DemoCom/FormDemo';
|
|
19
|
+
dayjs.locale(zhCn);
|
|
20
|
+
ReactDOM.render(
|
|
21
|
+
// <React.StrictMode>
|
|
22
|
+
React.createElement(ConfigProvider, { locale: zhCN },
|
|
23
|
+
React.createElement(BrowserRouter, null,
|
|
24
|
+
React.createElement(Switch, null,
|
|
25
|
+
React.createElement(Route, { exact: true, path: "/" },
|
|
26
|
+
React.createElement(App, null)),
|
|
27
|
+
React.createElement(Route, { exact: true, path: "/select" },
|
|
28
|
+
React.createElement(Demo, null)),
|
|
29
|
+
React.createElement(Route, { exact: true, path: "/tree-select" },
|
|
30
|
+
React.createElement(TreeSelectDemo, null)),
|
|
31
|
+
React.createElement(Route, { exact: true, path: "/tree" },
|
|
32
|
+
React.createElement(TreeDemo, null)),
|
|
33
|
+
React.createElement(Route, { exact: true, path: "/upload" },
|
|
34
|
+
React.createElement(UploadDemo, null)),
|
|
35
|
+
React.createElement(Route, { exact: true, path: "/collapse" },
|
|
36
|
+
React.createElement(CollapseDemo, null)),
|
|
37
|
+
React.createElement(Route, { exact: true, path: "/timeline" },
|
|
38
|
+
React.createElement(TimelineDemo, null)),
|
|
39
|
+
React.createElement(Route, { exact: true, path: "/wechat" },
|
|
40
|
+
React.createElement(WeChatDemo, null)),
|
|
41
|
+
React.createElement(Route, { exact: true, path: "/table" },
|
|
42
|
+
React.createElement(TableDemo, null)),
|
|
43
|
+
React.createElement(Route, { exact: true, path: "/basic" },
|
|
44
|
+
React.createElement(BasicDemo, null)),
|
|
45
|
+
React.createElement(Route, { exact: true, path: "/form" },
|
|
46
|
+
React.createElement(FormDemo, null)),
|
|
47
|
+
React.createElement(Route, { exact: true, path: "/test" },
|
|
48
|
+
React.createElement("div", null,
|
|
49
|
+
React.createElement("h1", null,
|
|
50
|
+
React.createElement(Link, { to: "/select" }, "select")),
|
|
51
|
+
React.createElement("h1", null,
|
|
52
|
+
React.createElement(Link, { to: "/tree-select" }, "tree select")),
|
|
53
|
+
React.createElement("h1", null,
|
|
54
|
+
React.createElement(Link, { to: "/tree" }, "tree")),
|
|
55
|
+
React.createElement("h1", null,
|
|
56
|
+
React.createElement(Link, { to: "/upload" }, "upload"))))))),
|
|
57
|
+
// </React.StrictMode>,
|
|
58
|
+
document.getElementById('root'));
|
|
80
59
|
export { default as Button } from './components/Button';
|
|
81
60
|
export { default as Calendar } from './components/Calendar';
|
|
82
61
|
export { default as Checkbox } from './components/Checkbox';
|