@cniot/android-pda-components 0.2.30 → 0.2.32
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/build/assets/index.51a8714a.css +1 -0
- package/build/assets/{index.96f23a3d.js → index.7a87ca33.js} +16 -16
- package/build/index.html +2 -2
- package/doc/index.jsx +3 -2
- package/es/index.cjs.js +1 -1
- package/es/index.es.js +11 -5
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/build/assets/index.248cb4f2.css +0 -1
- package/packages/AppList/doc.jsx +0 -138
- package/packages/AppList/index.jsx +0 -33
- package/packages/AppList/index.less +0 -52
- package/packages/BaseLayout/BarcodeScan.jsx +0 -88
- package/packages/BaseLayout/BaseLayoutContainer.jsx +0 -208
- package/packages/BaseLayout/RfidOnce.jsx +0 -106
- package/packages/BaseLayout/RfidScan.jsx +0 -118
- package/packages/BaseLayout/doc.jsx +0 -177
- package/packages/BaseLayout/index.jsx +0 -52
- package/packages/BaseLayout/index.less +0 -47
- package/packages/Button/doc.jsx +0 -62
- package/packages/Button/index.jsx +0 -27
- package/packages/Button/index.less +0 -62
- package/packages/Confirm/doc.jsx +0 -147
- package/packages/Confirm/index.jsx +0 -71
- package/packages/Confirm/index.less +0 -55
- package/packages/Header/doc.jsx +0 -155
- package/packages/Header/index.jsx +0 -184
- package/packages/Header/index.less +0 -68
- package/packages/InfoCard/doc.jsx +0 -244
- package/packages/InfoCard/index.jsx +0 -67
- package/packages/InfoCard/index.less +0 -111
- package/packages/List/doc.jsx +0 -89
- package/packages/List/index.jsx +0 -54
- package/packages/List/index.less +0 -43
- package/packages/Overlay/doc.jsx +0 -103
- package/packages/Overlay/index.jsx +0 -42
- package/packages/Overlay/index.less +0 -28
- package/packages/PdaActionSheet/doc.jsx +0 -193
- package/packages/PdaActionSheet/index.jsx +0 -44
- package/packages/PdaActionSheet/index.less +0 -65
- package/packages/PdaDistanceCard/doc.jsx +0 -62
- package/packages/PdaDistanceCard/index.jsx +0 -35
- package/packages/PdaDistanceCard/index.less +0 -42
- package/packages/PdaFinishCard/doc.jsx +0 -111
- package/packages/PdaFinishCard/index.jsx +0 -62
- package/packages/PdaFinishCard/index.less +0 -62
- package/packages/PdaInfiniteScroll/doc.jsx +0 -121
- package/packages/PdaInfiniteScroll/index.jsx +0 -114
- package/packages/PdaInfiniteScroll/index.less +0 -12
- package/packages/PdaInfiniteScroll/utils.jsx +0 -25
- package/packages/PdaSteps/PdaStep/index.jsx +0 -38
- package/packages/PdaSteps/PdaStep/index.less +0 -70
- package/packages/PdaSteps/PdaSteps/index.jsx +0 -33
- package/packages/PdaSteps/PdaSteps/index.less +0 -0
- package/packages/PdaSteps/doc.jsx +0 -131
- package/packages/PdaSteps/index.jsx +0 -5
- package/packages/PdaTitle/doc.jsx +0 -102
- package/packages/PdaTitle/index.jsx +0 -51
- package/packages/PdaTitle/index.less +0 -65
- package/packages/Presentation/doc.jsx +0 -72
- package/packages/Presentation/index.jsx +0 -25
- package/packages/Presentation/index.less +0 -31
- package/packages/SelectCard/doc.jsx +0 -57
- package/packages/SelectCard/index.jsx +0 -13
- package/packages/SelectCard/index.less +0 -30
- package/packages/SimpleCard/doc.jsx +0 -59
- package/packages/SimpleCard/index.jsx +0 -13
- package/packages/SimpleCard/index.less +0 -38
- package/packages/SimpleCardBlock/doc.jsx +0 -77
- package/packages/SimpleCardBlock/index.jsx +0 -43
- package/packages/SimpleCardBlock/index.less +0 -26
- package/packages/SubCard/doc.jsx +0 -63
- package/packages/SubCard/index.jsx +0 -28
- package/packages/SubCard/index.less +0 -64
- package/packages/Tag/doc.jsx +0 -47
- package/packages/Tag/index.jsx +0 -12
- package/packages/Tag/index.less +0 -22
- package/packages/TaskCard/doc.jsx +0 -151
- package/packages/TaskCard/index.jsx +0 -65
- package/packages/TaskCard/index.less +0 -101
- package/packages/Toast/doc.jsx +0 -112
- package/packages/Toast/index.jsx +0 -7
- package/packages/Toast/index.less +0 -23
- package/packages/Toast/methods.jsx +0 -77
- package/packages/Toast/toast.jsx +0 -96
- package/packages/WakeKeyborard/doc.jsx +0 -170
- package/packages/WakeKeyborard/index.jsx +0 -61
- package/packages/WakeKeyborard/index.less +0 -55
- package/packages/WakeKeyborard/keyborard.jsx +0 -61
- package/packages/doc.jsx +0 -19
- package/packages/global.less +0 -7
- package/packages/index.jsx +0 -60
- package/packages/index.less +0 -3
- package/packages/pageflow-system-pages/alert/doc.jsx +0 -70
- package/packages/pageflow-system-pages/alert/index.jsx +0 -22
- package/packages/pageflow-system-pages/confirm/doc.jsx +0 -118
- package/packages/pageflow-system-pages/confirm/index.jsx +0 -31
- package/packages/pageflow-system-pages/debug/index.jsx +0 -27
- package/packages/pageflow-system-pages/debug/index.less +0 -5
- package/packages/pageflow-system-pages/index.jsx +0 -38
- package/packages/pageflow-system-pages/loading/index.jsx +0 -37
- package/packages/pageflow-system-pages/not-found/index.jsx +0 -12
- package/packages/pageflow-system-pages/not-found/index.less +0 -26
- package/packages/pageflow-system-pages/prompt/doc.jsx +0 -95
- package/packages/pageflow-system-pages/prompt/index.jsx +0 -43
- package/packages/pageflow-system-pages/prompt/index.less +0 -44
- package/packages/pageflow-system-pages/start/index.jsx +0 -28
- package/packages/pageflow-system-pages/start/index.less +0 -12
- package/packages/pageflow-system-pages/toast/doc.jsx +0 -76
- package/packages/pageflow-system-pages/toast/index.jsx +0 -42
- package/packages/utils/index.js +0 -56
- package/packages/variable.less +0 -4
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import InfiniteScroll from "./index";
|
|
3
|
-
import { List } from "..";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const dataSource = [{
|
|
7
|
-
title: "hello world",
|
|
8
|
-
subTitle:"sub title",
|
|
9
|
-
extra:"11111",
|
|
10
|
-
tags:[1,2,3,4]
|
|
11
|
-
},{
|
|
12
|
-
title: "hello world",
|
|
13
|
-
subTitle:"sub title",
|
|
14
|
-
extra:"",
|
|
15
|
-
tags:[1,2,3,4]
|
|
16
|
-
},{
|
|
17
|
-
title: "hello world",
|
|
18
|
-
subTitle:"sub title",
|
|
19
|
-
},{
|
|
20
|
-
title: "hello world",
|
|
21
|
-
subTitle:"sub title",
|
|
22
|
-
extra:"11111",
|
|
23
|
-
}];
|
|
24
|
-
|
|
25
|
-
export default function () {
|
|
26
|
-
return (
|
|
27
|
-
<div>
|
|
28
|
-
<h1>InfiniteScroll</h1>
|
|
29
|
-
<p>滚动加载组件</p>
|
|
30
|
-
<h2>示例</h2>
|
|
31
|
-
<div className="light-block">
|
|
32
|
-
<div style={{
|
|
33
|
-
width: '432px',
|
|
34
|
-
height: '425px',
|
|
35
|
-
overflow: 'scroll'
|
|
36
|
-
}}>
|
|
37
|
-
<List
|
|
38
|
-
onItemClick={console.log}
|
|
39
|
-
tabIndex={0}
|
|
40
|
-
dataSource={dataSource}
|
|
41
|
-
>
|
|
42
|
-
</List>
|
|
43
|
-
<InfiniteScroll
|
|
44
|
-
hasMore={true}
|
|
45
|
-
loadMore={() => {console.log("loadMore!")}}
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<code className="code">{`
|
|
50
|
-
|
|
51
|
-
const dataSource = [{
|
|
52
|
-
title: "hello world",
|
|
53
|
-
subTitle:"sub title",
|
|
54
|
-
extra:"11111",
|
|
55
|
-
tags:[1,2,3,4]
|
|
56
|
-
},{
|
|
57
|
-
title: "hello world",
|
|
58
|
-
subTitle:"sub title",
|
|
59
|
-
extra:"",
|
|
60
|
-
tags:[1,2,3,4]
|
|
61
|
-
},{
|
|
62
|
-
title: "hello world",
|
|
63
|
-
subTitle:"sub title",
|
|
64
|
-
},{
|
|
65
|
-
title: "hello world",
|
|
66
|
-
subTitle:"sub title",
|
|
67
|
-
extra:"11111",
|
|
68
|
-
}];
|
|
69
|
-
|
|
70
|
-
<div style={{
|
|
71
|
-
width: '432px',
|
|
72
|
-
height: '425px',
|
|
73
|
-
overflow: 'scroll'
|
|
74
|
-
}}>
|
|
75
|
-
|
|
76
|
-
<List
|
|
77
|
-
onItemClick={console.log}
|
|
78
|
-
tabIndex={0}
|
|
79
|
-
dataSource={dataSource}
|
|
80
|
-
>
|
|
81
|
-
</List>
|
|
82
|
-
<InfiniteScroll
|
|
83
|
-
hasMore={true}
|
|
84
|
-
loadMore={() => {console.log("loadMore!")}}
|
|
85
|
-
/>
|
|
86
|
-
</div>
|
|
87
|
-
`}</code>
|
|
88
|
-
<h2>参数</h2>
|
|
89
|
-
<table className="pure-table pure-table-bordered">
|
|
90
|
-
<thead>
|
|
91
|
-
<tr>
|
|
92
|
-
<th>属性</th>
|
|
93
|
-
<th>说明</th>
|
|
94
|
-
<th>类型</th>
|
|
95
|
-
<th>默认值</th>
|
|
96
|
-
</tr>
|
|
97
|
-
</thead>
|
|
98
|
-
<tbody>
|
|
99
|
-
<tr>
|
|
100
|
-
<td>hasMore</td>
|
|
101
|
-
<td>是否还有更多</td>
|
|
102
|
-
<td>boolean</td>
|
|
103
|
-
<td>false</td>
|
|
104
|
-
</tr>
|
|
105
|
-
<tr>
|
|
106
|
-
<td>loadMore</td>
|
|
107
|
-
<td>更多加载方法,当 hasMore 是 true 且拉到底部时会调用该方法</td>
|
|
108
|
-
<td>()=></td>
|
|
109
|
-
<td></td>
|
|
110
|
-
</tr>
|
|
111
|
-
<tr>
|
|
112
|
-
<td>threshold</td>
|
|
113
|
-
<td>阈值,底部距离页面多少的时候调用 loadMore 方法</td>
|
|
114
|
-
<td>number</td>
|
|
115
|
-
<td>0</td>
|
|
116
|
-
</tr>
|
|
117
|
-
</tbody>
|
|
118
|
-
</table>
|
|
119
|
-
</div>
|
|
120
|
-
);
|
|
121
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import React, {useEffect, useRef} from "react";
|
|
2
|
-
// import OPInput from "../OPInput";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
import usePersistFn from 'ahooks/es/usePersistFn';
|
|
6
|
-
import useLockFn from 'ahooks/es/useLockFn';
|
|
7
|
-
import { getScrollParent } from './utils'
|
|
8
|
-
|
|
9
|
-
function Loading (props) {
|
|
10
|
-
return <div
|
|
11
|
-
style={{
|
|
12
|
-
color: props.color || '#999'
|
|
13
|
-
}}
|
|
14
|
-
>
|
|
15
|
-
<svg
|
|
16
|
-
height='1em'
|
|
17
|
-
viewBox='0 0 100 40'
|
|
18
|
-
style={{ verticalAlign: '-0.125em' }}
|
|
19
|
-
>
|
|
20
|
-
<g stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>
|
|
21
|
-
<g transform='translate(-100.000000, -71.000000)'>
|
|
22
|
-
<g transform='translate(95.000000, 71.000000)'>
|
|
23
|
-
<g transform='translate(5.000000, 0.000000)'>
|
|
24
|
-
{[0, 1, 2].map(i => (
|
|
25
|
-
<rect
|
|
26
|
-
key={i}
|
|
27
|
-
fill='currentColor'
|
|
28
|
-
x={20 + i * 26}
|
|
29
|
-
y='16'
|
|
30
|
-
width='8'
|
|
31
|
-
height='8'
|
|
32
|
-
rx='2'
|
|
33
|
-
>
|
|
34
|
-
<animate
|
|
35
|
-
attributeName='y'
|
|
36
|
-
from='16'
|
|
37
|
-
to='16'
|
|
38
|
-
dur='2s'
|
|
39
|
-
begin={`${i * 0.2}s`}
|
|
40
|
-
repeatCount='indefinite'
|
|
41
|
-
values='16; 6; 26; 16; 16'
|
|
42
|
-
keyTimes='0; 0.1; 0.3; 0.4; 1'
|
|
43
|
-
id='circ-anim'
|
|
44
|
-
/>
|
|
45
|
-
</rect>
|
|
46
|
-
))}
|
|
47
|
-
</g>
|
|
48
|
-
</g>
|
|
49
|
-
</g>
|
|
50
|
-
</g>
|
|
51
|
-
</svg>
|
|
52
|
-
</div>
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function isWindow(element) {
|
|
56
|
-
return element === window;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export default function InfiniteScroll (props) {
|
|
60
|
-
const { className, hasMore, loadMore, threshold = 0, style } = props;
|
|
61
|
-
const doLoadMore = useLockFn(async () => {
|
|
62
|
-
await loadMore();
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const elementRef = useRef(null);
|
|
66
|
-
|
|
67
|
-
const check = usePersistFn(() => {
|
|
68
|
-
if (!hasMore) return;
|
|
69
|
-
const element = elementRef.current;
|
|
70
|
-
if (!element) return;
|
|
71
|
-
const parent = getScrollParent(element);
|
|
72
|
-
if (!parent) return;
|
|
73
|
-
const elementTop = element.getBoundingClientRect().top;
|
|
74
|
-
const current = isWindow(parent) ? window.innerHeight : parent.getBoundingClientRect().bottom;
|
|
75
|
-
if (current >= elementTop - threshold) {
|
|
76
|
-
doLoadMore();
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
// 确保在内容不足时会自动触发加载事件
|
|
81
|
-
useEffect(() => {
|
|
82
|
-
check();
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
useEffect(() => {
|
|
86
|
-
const element = elementRef.current;
|
|
87
|
-
if (!element) return;
|
|
88
|
-
const parent = getScrollParent(element);
|
|
89
|
-
if (!parent) return;
|
|
90
|
-
function onScroll() {
|
|
91
|
-
check();
|
|
92
|
-
}
|
|
93
|
-
parent.addEventListener('scroll', onScroll);
|
|
94
|
-
return () => {
|
|
95
|
-
parent.removeEventListener('scroll', onScroll)
|
|
96
|
-
}
|
|
97
|
-
}, [])
|
|
98
|
-
|
|
99
|
-
return (
|
|
100
|
-
<div className={classNames({[className]: true, "pda-infinite-scroll": true})} style={style} ref={elementRef}>
|
|
101
|
-
{hasMore ? (
|
|
102
|
-
<div className="pda-infinite-scroll-view">
|
|
103
|
-
<span>加载中</span>
|
|
104
|
-
<Loading />
|
|
105
|
-
</div>
|
|
106
|
-
) : (
|
|
107
|
-
<div className="pda-infinite-scroll-view">
|
|
108
|
-
<span>没有更多了~</span>
|
|
109
|
-
</div>
|
|
110
|
-
)}
|
|
111
|
-
</div>
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const overflowScrollReg = /scroll|auto/i;
|
|
3
|
-
|
|
4
|
-
function isElement(node) {
|
|
5
|
-
const ELEMENT_NODE_TYPE = 1;
|
|
6
|
-
return (
|
|
7
|
-
node.tagName !== 'HTML' &&
|
|
8
|
-
node.tagName !== 'BODY' &&
|
|
9
|
-
node.nodeType === ELEMENT_NODE_TYPE
|
|
10
|
-
)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function getScrollParent(el, root) {
|
|
14
|
-
let node = el;
|
|
15
|
-
|
|
16
|
-
while (node && node !== root && isElement(node)) {
|
|
17
|
-
const { overflowY } = window.getComputedStyle(node);
|
|
18
|
-
if (overflowScrollReg.test(overflowY)) {
|
|
19
|
-
return node;
|
|
20
|
-
}
|
|
21
|
-
node = node.parentNode;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return root;
|
|
25
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
// import OPInput from "../OPInput";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
|
|
6
|
-
export default class PdaInfoCard extends React.Component {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
render() {
|
|
12
|
-
const { className, title, isActive, infoList = [], style={}, index, isLast } = this.props;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className={classNames({[className]: true, "pda-step-card": true})} style={style}>
|
|
16
|
-
<div className="pda-step-indictor">
|
|
17
|
-
<div className={classNames({"pda-step-indictor-top": true, "pda-step-indictor-top-hidden": index === 0})}></div>
|
|
18
|
-
<div className={classNames({"pda-step-indictor-center": true, "pda-step-indictor-center-active": isActive})}></div>
|
|
19
|
-
<div className={classNames({"pda-step-indictor-bottom": true, "pda-step-indictor-bottom-hidden": isLast})}></div>
|
|
20
|
-
</div>
|
|
21
|
-
<div className={classNames({ 'pda-step': true, 'pda-step-dark': !isActive})}>
|
|
22
|
-
<div className="pda-step-title">{title}</div>
|
|
23
|
-
{
|
|
24
|
-
infoList.map((item, index) => {
|
|
25
|
-
return (
|
|
26
|
-
<div key={index} className="pda-step-list">
|
|
27
|
-
<span>{item.label || ''}</span>
|
|
28
|
-
|
|
29
|
-
<span>{item.content || ''}</span>
|
|
30
|
-
</div>
|
|
31
|
-
)
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
.pda-step-card {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
.pda-step-indictor {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
margin-right: 16px;
|
|
9
|
-
.pda-step-indictor-top {
|
|
10
|
-
width: 1px;
|
|
11
|
-
background-color: #BEC0C6;
|
|
12
|
-
flex: 1;
|
|
13
|
-
}
|
|
14
|
-
.pda-step-indictor-top-hidden {
|
|
15
|
-
background-color: #FFFFFF00;
|
|
16
|
-
}
|
|
17
|
-
.pda-step-indictor-center {
|
|
18
|
-
height: 24px;
|
|
19
|
-
width: 24px;
|
|
20
|
-
border-radius: 12px;
|
|
21
|
-
background-color: #BEC0C6;
|
|
22
|
-
}
|
|
23
|
-
.pda-step-indictor-center-active {
|
|
24
|
-
background-color: #0091EA;
|
|
25
|
-
}
|
|
26
|
-
.pda-step-indictor-bottom {
|
|
27
|
-
flex: 1;
|
|
28
|
-
width: 1px;
|
|
29
|
-
background-color: #BEC0C6;
|
|
30
|
-
}
|
|
31
|
-
.pda-step-indictor-bottom-hidden {
|
|
32
|
-
background-color: #FFFFFF00;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.pda-step {
|
|
39
|
-
border-radius: 16px;
|
|
40
|
-
padding: 24px 16px;
|
|
41
|
-
& p {
|
|
42
|
-
margin: 0;
|
|
43
|
-
}
|
|
44
|
-
background-color: #FFFFFF;
|
|
45
|
-
margin-bottom: 16px;
|
|
46
|
-
|
|
47
|
-
.pda-step-title {
|
|
48
|
-
font-size: 60px;
|
|
49
|
-
color: #0091EA;
|
|
50
|
-
// margin: 0;
|
|
51
|
-
// margin-bottom: 16px;
|
|
52
|
-
}
|
|
53
|
-
.pda-step-list {
|
|
54
|
-
margin-top: 8px;
|
|
55
|
-
color: #4A4A4A;
|
|
56
|
-
font-size: 32px;
|
|
57
|
-
line-height: 32px;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.pda-step.pda-step-dark {
|
|
62
|
-
background-color: #000;
|
|
63
|
-
.pda-step-title {
|
|
64
|
-
color: #FFFFFF;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.pda-step-list {
|
|
68
|
-
color: #BEC0C6;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, {cloneElement} from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import Step from '../PdaStep'
|
|
5
|
-
|
|
6
|
-
export default class PdaInfoCard extends React.Component {
|
|
7
|
-
static Step = Step;
|
|
8
|
-
|
|
9
|
-
constructor(props) {
|
|
10
|
-
super(props);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
render() {
|
|
14
|
-
const { className, style={}, theme='light', current = 0, children} = this.props;
|
|
15
|
-
return (
|
|
16
|
-
<div className={classNames({[className]: true})} style={style}>
|
|
17
|
-
{(children || []).map((child, index) => {
|
|
18
|
-
const childProps = {
|
|
19
|
-
index,
|
|
20
|
-
isLast: index === (children || []).length - 1,
|
|
21
|
-
...child.props
|
|
22
|
-
};
|
|
23
|
-
if (index === current) {
|
|
24
|
-
childProps.isActive = true;
|
|
25
|
-
} else {
|
|
26
|
-
childProps.isActive = false;
|
|
27
|
-
}
|
|
28
|
-
return cloneElement(child, childProps);
|
|
29
|
-
})}
|
|
30
|
-
</div>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
File without changes
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Steps from "./index";
|
|
3
|
-
|
|
4
|
-
const { Step } = Steps;
|
|
5
|
-
|
|
6
|
-
// const Step = Steps.step
|
|
7
|
-
|
|
8
|
-
export default function () {
|
|
9
|
-
return (
|
|
10
|
-
<div>
|
|
11
|
-
<h1>Steps</h1>
|
|
12
|
-
<p>步骤条组件</p>
|
|
13
|
-
<h2>示例</h2>
|
|
14
|
-
{/* const { className, title, highlightInfo, highlightInfoCN, highlightSubInfo, highlightSubInfoCN, boldInfo, infoList = [], style={}, theme='light' } = this.props; */}
|
|
15
|
-
<div className="light-block" style={{display: 'flex', flexDirection: 'row'}}>
|
|
16
|
-
<Steps current={0} style={{
|
|
17
|
-
marginRight: '32px',
|
|
18
|
-
}}>
|
|
19
|
-
<Step title="扫描中" infoList={
|
|
20
|
-
[
|
|
21
|
-
{label: '商品条码', content: '623126388798'},
|
|
22
|
-
{label: '截止日期', content: '2022-07-25'},
|
|
23
|
-
{label: '产品名称', content: '商品的名称'},
|
|
24
|
-
{label: '品号', content: '12398765423'},
|
|
25
|
-
]
|
|
26
|
-
} />
|
|
27
|
-
<Step title="已生产" infoList={
|
|
28
|
-
[
|
|
29
|
-
{label: '商品条码', content: '623126388798'},
|
|
30
|
-
{label: '截止日期', content: '2022-07-25'},
|
|
31
|
-
{label: '产品名称', content: '商品的名称'},
|
|
32
|
-
{label: '品号', content: '12398765423'},
|
|
33
|
-
]
|
|
34
|
-
} />
|
|
35
|
-
</Steps>
|
|
36
|
-
<Steps current={1}>
|
|
37
|
-
<Step title="扫描中" infoList={
|
|
38
|
-
[
|
|
39
|
-
{label: '商品条码', content: '623126388798'},
|
|
40
|
-
{label: '截止日期', content: '2022-07-25'},
|
|
41
|
-
{label: '产品名称', content: '商品的名称'},
|
|
42
|
-
{label: '品号', content: '12398765423'},
|
|
43
|
-
]
|
|
44
|
-
} />
|
|
45
|
-
<Step title="已生产" infoList={
|
|
46
|
-
[
|
|
47
|
-
{label: '商品条码', content: '623126388798'},
|
|
48
|
-
{label: '截止日期', content: '2022-07-25'},
|
|
49
|
-
{label: '产品名称', content: '商品的名称'},
|
|
50
|
-
{label: '品号', content: '12398765423'},
|
|
51
|
-
]
|
|
52
|
-
} />
|
|
53
|
-
<Step title="待扫描" infoList={
|
|
54
|
-
[
|
|
55
|
-
{label: '商品条码', content: '623126388798'},
|
|
56
|
-
{label: '截止日期', content: '2022-07-25'},
|
|
57
|
-
{label: '产品名称', content: '商品的名称'},
|
|
58
|
-
{label: '品号', content: '12398765423'},
|
|
59
|
-
]
|
|
60
|
-
} />
|
|
61
|
-
</Steps>
|
|
62
|
-
</div>
|
|
63
|
-
<code className="code">{`
|
|
64
|
-
<Steps current={0} style={{
|
|
65
|
-
marginRight: '32px',
|
|
66
|
-
}}>
|
|
67
|
-
<Step title="扫描中" infoList={
|
|
68
|
-
[
|
|
69
|
-
{label: '商品条码', content: '623126388798'},
|
|
70
|
-
{label: '截止日期', content: '2022-07-25'},
|
|
71
|
-
{label: '产品名称', content: '商品的名称'},
|
|
72
|
-
{label: '品号', content: '12398765423'},
|
|
73
|
-
]
|
|
74
|
-
} />
|
|
75
|
-
<Step title="已生产" infoList={
|
|
76
|
-
[
|
|
77
|
-
{label: '商品条码', content: '623126388798'},
|
|
78
|
-
{label: '截止日期', content: '2022-07-25'},
|
|
79
|
-
{label: '产品名称', content: '商品的名称'},
|
|
80
|
-
{label: '品号', content: '12398765423'},
|
|
81
|
-
]
|
|
82
|
-
} />
|
|
83
|
-
</Steps>
|
|
84
|
-
`}</code>
|
|
85
|
-
<h2>Steps 参数</h2>
|
|
86
|
-
<table className="pure-table pure-table-bordered">
|
|
87
|
-
<thead>
|
|
88
|
-
<tr>
|
|
89
|
-
<th>属性</th>
|
|
90
|
-
<th>说明</th>
|
|
91
|
-
<th>类型</th>
|
|
92
|
-
<th>默认值</th>
|
|
93
|
-
</tr>
|
|
94
|
-
</thead>
|
|
95
|
-
<tbody>
|
|
96
|
-
<tr>
|
|
97
|
-
<td>current</td>
|
|
98
|
-
<td>当前节点</td>
|
|
99
|
-
<td>number</td>
|
|
100
|
-
<td>0</td>
|
|
101
|
-
</tr>
|
|
102
|
-
</tbody>
|
|
103
|
-
</table>
|
|
104
|
-
<h2>Steps.Step 参数</h2>
|
|
105
|
-
<table className="pure-table pure-table-bordered">
|
|
106
|
-
<thead>
|
|
107
|
-
<tr>
|
|
108
|
-
<th>属性</th>
|
|
109
|
-
<th>说明</th>
|
|
110
|
-
<th>类型</th>
|
|
111
|
-
<th>默认值</th>
|
|
112
|
-
</tr>
|
|
113
|
-
</thead>
|
|
114
|
-
<tbody>
|
|
115
|
-
<tr>
|
|
116
|
-
<td>title</td>
|
|
117
|
-
<td>标题</td>
|
|
118
|
-
<td>string</td>
|
|
119
|
-
<td></td>
|
|
120
|
-
</tr>
|
|
121
|
-
<tr>
|
|
122
|
-
<td>infoList</td>
|
|
123
|
-
<td>更多信息</td>
|
|
124
|
-
<td>object[]</td>
|
|
125
|
-
<td></td>
|
|
126
|
-
</tr>
|
|
127
|
-
</tbody>
|
|
128
|
-
</table>
|
|
129
|
-
</div>
|
|
130
|
-
);
|
|
131
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Title from "./index";
|
|
3
|
-
import Button from '../Button';
|
|
4
|
-
export default function () {
|
|
5
|
-
return (
|
|
6
|
-
<div>
|
|
7
|
-
<h1>Title</h1>
|
|
8
|
-
<p>废弃-推荐用Header</p>
|
|
9
|
-
<h2>示例</h2>
|
|
10
|
-
<div className="dark-block">
|
|
11
|
-
{/* const { className, goBack = true, icon="scan", title="任务", more=false } = this.props; */}
|
|
12
|
-
<Title
|
|
13
|
-
title='hello world'
|
|
14
|
-
goBackHandle={() => {
|
|
15
|
-
console.log('go back');
|
|
16
|
-
}}
|
|
17
|
-
/>
|
|
18
|
-
<Title
|
|
19
|
-
icon='read'
|
|
20
|
-
title='hello world'
|
|
21
|
-
></Title>
|
|
22
|
-
<Title
|
|
23
|
-
icon='select'
|
|
24
|
-
title='hello world'
|
|
25
|
-
menus={
|
|
26
|
-
<>
|
|
27
|
-
<Button>按钮</Button>
|
|
28
|
-
<Button type='primary' onClick={e => console.log(e) }>确认</Button>
|
|
29
|
-
<Button type='dark'>深色</Button>
|
|
30
|
-
</>
|
|
31
|
-
}
|
|
32
|
-
onClickMenuItem={console.log}
|
|
33
|
-
></Title>
|
|
34
|
-
</div>
|
|
35
|
-
<code className="code">{`
|
|
36
|
-
<Title
|
|
37
|
-
title='hello world'
|
|
38
|
-
icon='read'
|
|
39
|
-
goBackHandle={() => {
|
|
40
|
-
console.log('go back');
|
|
41
|
-
}}
|
|
42
|
-
menuList = {
|
|
43
|
-
<>
|
|
44
|
-
<Button>按钮</Button>
|
|
45
|
-
<Button type='primary' onClick={e => console.log(e) }>确认</Button>
|
|
46
|
-
<Button type='dark'>深色</Button>
|
|
47
|
-
</>
|
|
48
|
-
}
|
|
49
|
-
/>
|
|
50
|
-
`}</code>
|
|
51
|
-
<h2>参数</h2>
|
|
52
|
-
<table className="pure-table pure-table-bordered">
|
|
53
|
-
<thead>
|
|
54
|
-
<tr>
|
|
55
|
-
<th>属性</th>
|
|
56
|
-
<th>说明</th>
|
|
57
|
-
<th>类型</th>
|
|
58
|
-
<th>默认值</th>
|
|
59
|
-
</tr>
|
|
60
|
-
</thead>
|
|
61
|
-
<tbody>
|
|
62
|
-
<tr>
|
|
63
|
-
<td>goBack</td>
|
|
64
|
-
<td>返回按钮</td>
|
|
65
|
-
<td>boolean</td>
|
|
66
|
-
<td>true</td>
|
|
67
|
-
</tr>
|
|
68
|
-
<tr>
|
|
69
|
-
<td>goBackHandle</td>
|
|
70
|
-
<td>返回按钮点击处理</td>
|
|
71
|
-
<td>function</td>
|
|
72
|
-
<td></td>
|
|
73
|
-
</tr>
|
|
74
|
-
<tr>
|
|
75
|
-
<td>icon</td>
|
|
76
|
-
<td>title 图标</td>
|
|
77
|
-
<td>string: scan | select | read</td>
|
|
78
|
-
<td>scan</td>
|
|
79
|
-
</tr>
|
|
80
|
-
<tr>
|
|
81
|
-
<td>title</td>
|
|
82
|
-
<td>标题</td>
|
|
83
|
-
<td>string</td>
|
|
84
|
-
<td></td>
|
|
85
|
-
</tr>
|
|
86
|
-
<tr>
|
|
87
|
-
<td>more(废弃,使用 menuList)</td>
|
|
88
|
-
<td>更多(废弃,使用 menuList)</td>
|
|
89
|
-
<td>boolean</td>
|
|
90
|
-
<td>false</td>
|
|
91
|
-
</tr>
|
|
92
|
-
<tr>
|
|
93
|
-
<td>menuList</td>
|
|
94
|
-
<td>弹出菜单列表</td>
|
|
95
|
-
<td></td>
|
|
96
|
-
<td></td>
|
|
97
|
-
</tr>
|
|
98
|
-
</tbody>
|
|
99
|
-
</table>
|
|
100
|
-
</div>
|
|
101
|
-
);
|
|
102
|
-
}
|