@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,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
// import OPInput from "../OPInput";
|
|
4
|
-
import Overlay from "../Overlay";
|
|
5
|
-
import "./index.less";
|
|
6
|
-
|
|
7
|
-
const blankFunc = () => {}
|
|
8
|
-
export default class PdaTitle extends React.Component {
|
|
9
|
-
state = {
|
|
10
|
-
showMenu: false,
|
|
11
|
-
}
|
|
12
|
-
constructor(props) {
|
|
13
|
-
super(props);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
render() {
|
|
17
|
-
const { className, goBack = true, goBackHandle = blankFunc, icon="scan", title="任务", menuList = null } = this.props;
|
|
18
|
-
const { showMenu } = this.state;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div className={classNames({[className]: true, 'pda-header': true})}>
|
|
22
|
-
<div className='header-click-area' onClick={ goBack ? goBackHandle : blankFunc}>
|
|
23
|
-
{
|
|
24
|
-
goBack && <div className="pda-goback"></div>
|
|
25
|
-
}
|
|
26
|
-
{
|
|
27
|
-
icon && <div className={classNames({"pda-header-icon": true, ["pda-header-icon-"+icon]: true})}></div>
|
|
28
|
-
}
|
|
29
|
-
</div>
|
|
30
|
-
<p className={classNames({'pda-title-text': true})}>{ title }</p>
|
|
31
|
-
{
|
|
32
|
-
menuList ? (<div className="pda-header-more" onClick={e => {
|
|
33
|
-
this.setState({showMenu: true});
|
|
34
|
-
}}/> ) : null
|
|
35
|
-
}
|
|
36
|
-
{
|
|
37
|
-
<Overlay
|
|
38
|
-
visible = {showMenu}
|
|
39
|
-
verticalPosition = 'bottom'
|
|
40
|
-
closable={true}
|
|
41
|
-
onClosed={e => this.setState({showMenu: false})}
|
|
42
|
-
>
|
|
43
|
-
<div className='pda-menus'>
|
|
44
|
-
{menuList}
|
|
45
|
-
</div>
|
|
46
|
-
</Overlay>
|
|
47
|
-
}
|
|
48
|
-
</div>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.pda-header {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
// justify-content: center;
|
|
5
|
-
align-items: center;
|
|
6
|
-
color: white;
|
|
7
|
-
height: 84px;
|
|
8
|
-
.header-click-area {
|
|
9
|
-
height: 100%;
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
flex-direction: row;
|
|
13
|
-
}
|
|
14
|
-
.pda-goback {
|
|
15
|
-
background-image: url(https://img.alicdn.com/imgextra/i4/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);
|
|
16
|
-
width: 18px;
|
|
17
|
-
height: 32px;
|
|
18
|
-
background-size: 100%;
|
|
19
|
-
margin-left: 28px;
|
|
20
|
-
margin-right: 8px;
|
|
21
|
-
}
|
|
22
|
-
.pda-header-icon {
|
|
23
|
-
height: 36px;
|
|
24
|
-
width: 36px;
|
|
25
|
-
margin-left: 16px;
|
|
26
|
-
background-size: 100%;
|
|
27
|
-
// background-repeat: no-repeat;
|
|
28
|
-
// background-position: center;
|
|
29
|
-
}
|
|
30
|
-
.pda-header-icon-scan {
|
|
31
|
-
background-image: url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png);
|
|
32
|
-
}
|
|
33
|
-
.pda-header-icon-select {
|
|
34
|
-
background-image: url(https://img.alicdn.com/imgextra/i2/O1CN0170QXc91udWriUp19S_!!6000000006060-2-tps-74-72.png);
|
|
35
|
-
}
|
|
36
|
-
.pda-header-icon-read {
|
|
37
|
-
background-image: url(https://img.alicdn.com/imgextra/i2/O1CN01EMphgH1ylYGXImCZn_!!6000000006619-2-tps-70-70.png);
|
|
38
|
-
}
|
|
39
|
-
.pda-title-text {
|
|
40
|
-
margin-left: 16px;
|
|
41
|
-
font-size: 40px;
|
|
42
|
-
}
|
|
43
|
-
.pda-header-more {
|
|
44
|
-
height: 36px;
|
|
45
|
-
width: 36px;
|
|
46
|
-
margin-left: 16px;
|
|
47
|
-
background-image: url(https://img.alicdn.com/imgextra/i4/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png);
|
|
48
|
-
background-size: 100%;
|
|
49
|
-
background-repeat: no-repeat;
|
|
50
|
-
background-position: center;
|
|
51
|
-
margin-left: auto;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.pda-menus {
|
|
55
|
-
background-color: white;
|
|
56
|
-
border-radius: 8px 8px 0 0;
|
|
57
|
-
width: 100%;
|
|
58
|
-
padding: 24px;
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
&>* {
|
|
62
|
-
margin-bottom: 12px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Presentation from "./index";
|
|
3
|
-
export default function () {
|
|
4
|
-
return (
|
|
5
|
-
<div>
|
|
6
|
-
<h1>Presentation</h1>
|
|
7
|
-
<p>图示组件,通常包含一个图片+一行文字</p>
|
|
8
|
-
<h2>示例</h2>
|
|
9
|
-
<div className="light-block pda">
|
|
10
|
-
<Presentation text="请靠近报废纸箱" subText="开始识别"></Presentation>
|
|
11
|
-
</div>
|
|
12
|
-
<br />
|
|
13
|
-
<div className="light-block pda" style={{backgroundColor:"#000000"}}>
|
|
14
|
-
<Presentation image={Presentation.IMAGE_4} text="请靠近纸箱" subText="开始识别" transparent={true}></Presentation>
|
|
15
|
-
</div>
|
|
16
|
-
<br />
|
|
17
|
-
<div className="light-block pda" imageWidth={300} imageHeight={500} style={{backgroundColor:"#000000"}} >
|
|
18
|
-
<Presentation image={Presentation.IMAGE_2} imageStyle={{width: "500px"}} text="请靠近报废纸箱" subText="开始识别" transparent={true} ></Presentation>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<br />
|
|
22
|
-
<div className="light-block pda" style={{backgroundColor:"#000000"}} >
|
|
23
|
-
<Presentation image={Presentation.IMAGE_3} text="请靠近箱码进行识别" ></Presentation>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<br />
|
|
27
|
-
<code className="code">{`
|
|
28
|
-
<Presentation text="请靠近报废纸箱" subText="开始识别"></Presentation>
|
|
29
|
-
<Presentation image={Presentation.IMAGE_4} text="请靠近纸箱" subText="开始识别" transparent={true}></Presentation>
|
|
30
|
-
<Presentation image={Presentation.IMAGE_2} imageStyle={{width: "500px"}} text="请靠近报废纸箱" subText="开始识别" transparent={true} ></Presentation>
|
|
31
|
-
<Presentation image={Presentation.IMAGE_3} text="请靠近箱码进行识别" ></Presentation>
|
|
32
|
-
`}</code>
|
|
33
|
-
<h2>参数</h2>
|
|
34
|
-
<table className="pure-table pure-table-bordered">
|
|
35
|
-
<thead>
|
|
36
|
-
<tr>
|
|
37
|
-
<th>属性</th>
|
|
38
|
-
<th>说明</th>
|
|
39
|
-
<th>类型</th>
|
|
40
|
-
<th>默认值</th>
|
|
41
|
-
</tr>
|
|
42
|
-
</thead>
|
|
43
|
-
<tbody>
|
|
44
|
-
<tr>
|
|
45
|
-
<td>image</td>
|
|
46
|
-
<td>图片地址</td>
|
|
47
|
-
<td>string</td>
|
|
48
|
-
<td>可以使用 Presentation.IMAGE_1, Presentation.IMAGE_2, Presentation.IMAGE_3, Presentation.IMAGE_4 4张内置图片</td>
|
|
49
|
-
</tr>
|
|
50
|
-
<tr>
|
|
51
|
-
<td>text</td>
|
|
52
|
-
<td>文本</td>
|
|
53
|
-
<td>string</td>
|
|
54
|
-
<td></td>
|
|
55
|
-
</tr>
|
|
56
|
-
<tr>
|
|
57
|
-
<td>transparent</td>
|
|
58
|
-
<td>是否透明,不显示被色背景</td>
|
|
59
|
-
<td>boolean</td>
|
|
60
|
-
<td>默认false</td>
|
|
61
|
-
</tr>
|
|
62
|
-
<tr>
|
|
63
|
-
<td>subText</td>
|
|
64
|
-
<td>副文本</td>
|
|
65
|
-
<td>string</td>
|
|
66
|
-
<td></td>
|
|
67
|
-
</tr>
|
|
68
|
-
</tbody>
|
|
69
|
-
</table>
|
|
70
|
-
</div>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import './index.less';
|
|
3
|
-
// 图示
|
|
4
|
-
export default function Presentation(props){
|
|
5
|
-
const {
|
|
6
|
-
image= Presentation.IMAGE_1,
|
|
7
|
-
text="",
|
|
8
|
-
subText="",
|
|
9
|
-
transparent
|
|
10
|
-
} = props;
|
|
11
|
-
return <div className={transparent ? "presentation-card transparent" : "presentation-card"}>
|
|
12
|
-
<img src={image} />
|
|
13
|
-
{
|
|
14
|
-
text ? <div className="text">{text}</div> : null
|
|
15
|
-
}
|
|
16
|
-
{
|
|
17
|
-
subText ? <div className="sub-text">{subText}</div> : null
|
|
18
|
-
}
|
|
19
|
-
</div>
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
Presentation.IMAGE_1 = "https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png";
|
|
23
|
-
Presentation.IMAGE_2 = "https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png";
|
|
24
|
-
Presentation.IMAGE_3 = "https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";
|
|
25
|
-
Presentation.IMAGE_4 = "https://img.alicdn.com/imgextra/i3/O1CN017gNM8F1Fmmcfti7Dg_!!6000000000530-1-tps-414-286.gif";
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@import '../variable.less';
|
|
2
|
-
|
|
3
|
-
.presentation-card{
|
|
4
|
-
margin:12px;
|
|
5
|
-
background-color:#ffffff;
|
|
6
|
-
border-radius: 6px;
|
|
7
|
-
text-align: center;
|
|
8
|
-
padding:20px 6px;
|
|
9
|
-
img{
|
|
10
|
-
width:70%;
|
|
11
|
-
height:auto;
|
|
12
|
-
}
|
|
13
|
-
&.transparent{
|
|
14
|
-
background-color:transparent;
|
|
15
|
-
color:#ffffff;
|
|
16
|
-
margin-top: 80px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.text{
|
|
20
|
-
margin-top:12px;
|
|
21
|
-
font-weight:700;
|
|
22
|
-
font-size:32px;
|
|
23
|
-
}
|
|
24
|
-
.sub-text {
|
|
25
|
-
margin-top:6px;
|
|
26
|
-
font-weight:700;
|
|
27
|
-
font-size:24px;
|
|
28
|
-
line-height: 24px;
|
|
29
|
-
color: #999999;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React, {useState} from "react";
|
|
2
|
-
import SelectCard from "./index";
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
return (
|
|
6
|
-
<div>
|
|
7
|
-
<h1>SelectCard</h1>
|
|
8
|
-
<p>选择 Card</p>
|
|
9
|
-
<h2>示例</h2>
|
|
10
|
-
<div className="dark-block">
|
|
11
|
-
<SelectCard title='栈板' label='徐福记' onClick={e => {console.log(e)} }/>
|
|
12
|
-
<SelectCard title='栈板' label='徐福记' select={false} onClick={e => {console.log(e)} }/>
|
|
13
|
-
</div>
|
|
14
|
-
<code className="code">{`
|
|
15
|
-
<SelectCard title='栈板' label='徐福记' onClick={e => {console.log(e)} }/>
|
|
16
|
-
<SelectCard title='栈板' label='徐福记' select={false} onClick={e => {console.log(e)} }/>
|
|
17
|
-
`}</code>
|
|
18
|
-
<h2>参数</h2>
|
|
19
|
-
<table className="pure-table pure-table-bordered">
|
|
20
|
-
<thead>
|
|
21
|
-
<tr>
|
|
22
|
-
<th>属性</th>
|
|
23
|
-
<th>说明</th>
|
|
24
|
-
<th>类型</th>
|
|
25
|
-
<th>默认值</th>
|
|
26
|
-
</tr>
|
|
27
|
-
</thead>
|
|
28
|
-
<tbody>
|
|
29
|
-
<tr>
|
|
30
|
-
<td>title</td>
|
|
31
|
-
<td>标题</td>
|
|
32
|
-
<td>string</td>
|
|
33
|
-
<td>''</td>
|
|
34
|
-
</tr>
|
|
35
|
-
<tr>
|
|
36
|
-
<td>label</td>
|
|
37
|
-
<td>内容</td>
|
|
38
|
-
<td>string</td>
|
|
39
|
-
<td></td>
|
|
40
|
-
</tr>
|
|
41
|
-
<tr>
|
|
42
|
-
<td>select</td>
|
|
43
|
-
<td>是否显示小箭头</td>
|
|
44
|
-
<td>boolean</td>
|
|
45
|
-
<td>true</td>
|
|
46
|
-
</tr>
|
|
47
|
-
<tr>
|
|
48
|
-
<td>onClick</td>
|
|
49
|
-
<td>点击事件</td>
|
|
50
|
-
<td>function</td>
|
|
51
|
-
<td></td>
|
|
52
|
-
</tr>
|
|
53
|
-
</tbody>
|
|
54
|
-
</table>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React, {useState, useEffect} from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
|
|
5
|
-
export default function SelectCard (props) {
|
|
6
|
-
const {title, label, select = true, onClick = e => {}} = props;
|
|
7
|
-
return (
|
|
8
|
-
<div className="select-card" >
|
|
9
|
-
<p>{title}</p>
|
|
10
|
-
<div className="select-card-content" onClick={onClick}>{label} {select ? <span className="select-icon"></span> : null} </div>
|
|
11
|
-
</div>
|
|
12
|
-
)
|
|
13
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.select-card {
|
|
2
|
-
padding-top: 12px;
|
|
3
|
-
p {
|
|
4
|
-
color: #999999;
|
|
5
|
-
font-size: 32px;
|
|
6
|
-
line-height: 40px;
|
|
7
|
-
margin-bottom: 12px;
|
|
8
|
-
padding-left: 16px;
|
|
9
|
-
}
|
|
10
|
-
.select-card-content {
|
|
11
|
-
background-color: #282828;
|
|
12
|
-
padding: 24px 16px;
|
|
13
|
-
padding-right: 24px;
|
|
14
|
-
border-radius: 16px;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: row;
|
|
17
|
-
justify-content: space-between;
|
|
18
|
-
color: #FFFFFF;
|
|
19
|
-
font-size: 40px;
|
|
20
|
-
line-height: 40px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.select-icon {
|
|
24
|
-
background-image: url(https://img.alicdn.com/imgextra/i1/O1CN01WnYl6Z1qBM3uInOvw_!!6000000005457-2-tps-40-68.png);
|
|
25
|
-
background-size: 100%;
|
|
26
|
-
background-repeat: no-repeat;
|
|
27
|
-
background-position: center;
|
|
28
|
-
width: 20px;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React, {useState} from "react";
|
|
2
|
-
import SimpleCard from "./index";
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
return (
|
|
6
|
-
<div>
|
|
7
|
-
<h1>SimpleCard</h1>
|
|
8
|
-
<p>简单 Card</p>
|
|
9
|
-
<h2>示例</h2>
|
|
10
|
-
<div className="light-block">
|
|
11
|
-
<SimpleCard />
|
|
12
|
-
<SimpleCard title="标题" content="内容" type='error' onClick={e=>{console.log(e);}}/>
|
|
13
|
-
<SimpleCard title="500" content="装车完成" onClick={e=>{console.log(e);}}/>
|
|
14
|
-
</div>
|
|
15
|
-
<code className="code">{`
|
|
16
|
-
<SimpleCard />
|
|
17
|
-
<SimpleCard title="标题" content="内容" type='error' onClick={e=>{console.log(e);}}/>
|
|
18
|
-
<SimpleCard title="500" content="装车完成" onClick={e=>{console.log(e);}}/>
|
|
19
|
-
`}</code>
|
|
20
|
-
<h2>参数</h2>
|
|
21
|
-
<table className="pure-table pure-table-bordered">
|
|
22
|
-
<thead>
|
|
23
|
-
<tr>
|
|
24
|
-
<th>属性</th>
|
|
25
|
-
<th>说明</th>
|
|
26
|
-
<th>类型</th>
|
|
27
|
-
<th>默认值</th>
|
|
28
|
-
</tr>
|
|
29
|
-
</thead>
|
|
30
|
-
<tbody>
|
|
31
|
-
<tr>
|
|
32
|
-
<td>title</td>
|
|
33
|
-
<td>标题</td>
|
|
34
|
-
<td>string</td>
|
|
35
|
-
<td>title</td>
|
|
36
|
-
</tr>
|
|
37
|
-
<tr>
|
|
38
|
-
<td>content</td>
|
|
39
|
-
<td>内容</td>
|
|
40
|
-
<td>string</td>
|
|
41
|
-
<td>content</td>
|
|
42
|
-
</tr>
|
|
43
|
-
<tr>
|
|
44
|
-
<td>onClick</td>
|
|
45
|
-
<td>点击事件</td>
|
|
46
|
-
<td>function</td>
|
|
47
|
-
<td></td>
|
|
48
|
-
</tr>
|
|
49
|
-
<tr>
|
|
50
|
-
<td>type</td>
|
|
51
|
-
<td>类型</td>
|
|
52
|
-
<td>default | error</td>
|
|
53
|
-
<td>default</td>
|
|
54
|
-
</tr>
|
|
55
|
-
</tbody>
|
|
56
|
-
</table>
|
|
57
|
-
</div>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React, {useState, useEffect} from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
|
|
5
|
-
export default function SimpleCard (props) {
|
|
6
|
-
const { className=undefined, title='', content='', type='default', onClick=()=>{} } = props;
|
|
7
|
-
return title || content ? (
|
|
8
|
-
<div className={classNames({[className]: true, 'simple-card': true, ['simple-card-'+type]: true})} onClick={onClick}>
|
|
9
|
-
<p className="simple-card-title">{title}</p>
|
|
10
|
-
<p className="simple-card-content">{content}</p>
|
|
11
|
-
</div>
|
|
12
|
-
) : null
|
|
13
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.simple-card {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
padding: 12px 0 12px 18px;
|
|
4
|
-
border-radius: 12px;
|
|
5
|
-
// margin-top: 12px;
|
|
6
|
-
// margin-left: 12px;
|
|
7
|
-
|
|
8
|
-
.simple-card-title {
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
font-size: 56px;
|
|
11
|
-
line-height: 40px;
|
|
12
|
-
margin-top: 12px;
|
|
13
|
-
}
|
|
14
|
-
.simple-card-content {
|
|
15
|
-
font-size: 28px;
|
|
16
|
-
line-height: 40px;
|
|
17
|
-
margin-top: 12px;
|
|
18
|
-
// margin-bottom: 12px;
|
|
19
|
-
}
|
|
20
|
-
&.simple-card-default {
|
|
21
|
-
background-color: #F3F4F9;
|
|
22
|
-
.simple-card-title {
|
|
23
|
-
color: #0091EA;
|
|
24
|
-
}
|
|
25
|
-
.simple-card-content {
|
|
26
|
-
color: #000000;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
&.simple-card-error {
|
|
30
|
-
background-color: #ff0000;
|
|
31
|
-
.simple-card-title {
|
|
32
|
-
color: white;
|
|
33
|
-
}
|
|
34
|
-
.simple-card-content {
|
|
35
|
-
color: #FFAFB1;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React, {useState} from "react";
|
|
2
|
-
import SimpleCardBlock from "./index";
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
return (
|
|
6
|
-
<div>
|
|
7
|
-
<h1>SimpleCardBlock</h1>
|
|
8
|
-
<p>卡片块</p>
|
|
9
|
-
<h2>示例</h2>
|
|
10
|
-
<div className="light-block">
|
|
11
|
-
<SimpleCardBlock
|
|
12
|
-
title="出库信息出库信息出库信息出库信息出库信息出库信息出库信息"
|
|
13
|
-
tag={
|
|
14
|
-
{label: '注意啦', type: 'warning'}
|
|
15
|
-
}
|
|
16
|
-
dataSource={
|
|
17
|
-
[
|
|
18
|
-
{title: '500', content: '装车完成'},
|
|
19
|
-
{title: "标题", content: "内容", type: 'error', onClick: e=>console.log(e) },
|
|
20
|
-
{title: '500', content: '装车完成'},
|
|
21
|
-
{title: "标题", content: "内容", type: 'error', onClick: e=>console.log(e) },
|
|
22
|
-
{title: '500', content: '装车完成'},
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
/>
|
|
26
|
-
</div>
|
|
27
|
-
<code className="code">{`
|
|
28
|
-
<SimpleCardBlock
|
|
29
|
-
title="出库信息出库信息出库信息出库信息出库信息出库信息出库信息"
|
|
30
|
-
tag={
|
|
31
|
-
{label: '注意啦', type: 'warning'}
|
|
32
|
-
}
|
|
33
|
-
dataSource={
|
|
34
|
-
[
|
|
35
|
-
{title: '500', content: '装车完成'},
|
|
36
|
-
{title: "标题", content: "内容", type: 'error', onClick: e=>console.log(e) },
|
|
37
|
-
{title: '500', content: '装车完成'},
|
|
38
|
-
{title: "标题", content: "内容", type: 'error', onClick: e=>console.log(e) },
|
|
39
|
-
{title: '500', content: '装车完成'},
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
/>
|
|
43
|
-
`}</code>
|
|
44
|
-
<h2>参数</h2>
|
|
45
|
-
<table className="pure-table pure-table-bordered">
|
|
46
|
-
<thead>
|
|
47
|
-
<tr>
|
|
48
|
-
<th>属性</th>
|
|
49
|
-
<th>说明</th>
|
|
50
|
-
<th>类型</th>
|
|
51
|
-
<th>默认值</th>
|
|
52
|
-
</tr>
|
|
53
|
-
</thead>
|
|
54
|
-
<tbody>
|
|
55
|
-
<tr>
|
|
56
|
-
<td>title</td>
|
|
57
|
-
<td>标题</td>
|
|
58
|
-
<td>string</td>
|
|
59
|
-
<td>title</td>
|
|
60
|
-
</tr>
|
|
61
|
-
<tr>
|
|
62
|
-
<td>tag</td>
|
|
63
|
-
<td>标签</td>
|
|
64
|
-
<td>object</td>
|
|
65
|
-
<td>参考 Tab</td>
|
|
66
|
-
</tr>
|
|
67
|
-
<tr>
|
|
68
|
-
<td>dataSource</td>
|
|
69
|
-
<td>card 数据源</td>
|
|
70
|
-
<td>{JSON.stringify([{}, {}])}</td>
|
|
71
|
-
<td>对象格式参考 SimpleCard</td>
|
|
72
|
-
</tr>
|
|
73
|
-
</tbody>
|
|
74
|
-
</table>
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React, {useState, useEffect} from "react";
|
|
2
|
-
import SimpleCard from "../SimpleCard";
|
|
3
|
-
import Tag from '../Tag';
|
|
4
|
-
import "./index.less";
|
|
5
|
-
import classNames from "classnames";
|
|
6
|
-
|
|
7
|
-
export default function SimpleCardBlock (props) {
|
|
8
|
-
const { className=undefined, dataSource=[], title='', tag} = props;
|
|
9
|
-
return (
|
|
10
|
-
<div className={classNames({[className]: true, 'simple-card-block': true, })} >
|
|
11
|
-
<div className="simple-card-block-header">
|
|
12
|
-
<p className="simple-card-block-title">{title}</p>
|
|
13
|
-
{
|
|
14
|
-
tag ? (
|
|
15
|
-
<div style={{marginLeft: 12}}>
|
|
16
|
-
<Tag {...tag} />
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
) : null
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
</div>
|
|
23
|
-
{
|
|
24
|
-
dataSource.length > 0 ? (
|
|
25
|
-
<div className="simple-card-block-content">
|
|
26
|
-
{
|
|
27
|
-
dataSource.map((item, index) => {
|
|
28
|
-
return <SimpleCard
|
|
29
|
-
key={index}
|
|
30
|
-
{
|
|
31
|
-
...item
|
|
32
|
-
}
|
|
33
|
-
/>
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
<div style={{display: 'inline-block', padding: '12px 18px'}}></div>
|
|
37
|
-
<div style={{display: 'inline-block', padding: '0 18px', margin: 0}}></div>
|
|
38
|
-
</div>
|
|
39
|
-
) : null
|
|
40
|
-
}
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.simple-card-block {
|
|
2
|
-
background-color: white;
|
|
3
|
-
padding: 24px 12px;
|
|
4
|
-
border-radius: 12px;
|
|
5
|
-
|
|
6
|
-
.simple-card-block-header {
|
|
7
|
-
display: flex;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.simple-card-block-title {
|
|
12
|
-
color: #666666;
|
|
13
|
-
font-size: 32px;
|
|
14
|
-
line-height: 32px;
|
|
15
|
-
}
|
|
16
|
-
.simple-card-block-content {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-wrap: wrap;
|
|
19
|
-
&>div {
|
|
20
|
-
min-width: 190px;
|
|
21
|
-
flex: 1;
|
|
22
|
-
margin-right: 12px;
|
|
23
|
-
margin-top: 12px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
package/packages/SubCard/doc.jsx
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import SubCard from "./index";
|
|
3
|
-
export default function () {
|
|
4
|
-
return (
|
|
5
|
-
<div>
|
|
6
|
-
<h1>SubCard</h1>
|
|
7
|
-
<p>附卡片</p>
|
|
8
|
-
<h2>示例</h2>
|
|
9
|
-
<div className="dark-block" style={{display:"flex"}}>
|
|
10
|
-
<SubCard style={{marginRight: "20px", width: 400}} tag={{label: "散箱", type: "default"}} title="品号" context="50827834508278345082783450827834" attrs={["批次:23842839", "数量:234"]} ></SubCard>
|
|
11
|
-
<SubCard style={{marginRight: "20px", width: 400}} title="品号" tag={{label: "少货", type: "warning"}} context="5082 7834" name="徐福记抹茶凤梨酥17g" attrs={["批次:23842839", "数量:234"]} ></SubCard>
|
|
12
|
-
<SubCard title="品号" tag={{label: "少货", type: "warning"}} name="徐福记抹茶凤梨酥17g"></SubCard>
|
|
13
|
-
</div>
|
|
14
|
-
<code className="code">{`
|
|
15
|
-
<SubCard tag={{label: "散箱", type: "default"}} title="品号" context="5082 7834" attrs={["批次:23842839", "数量:234"]} ></SubCard>
|
|
16
|
-
<SubCard title="品号" tag={{label: "少货", type: "warning"}} context="5082 7834" name="徐福记抹茶凤梨酥17g" attrs={["批次:23842839", "数量:234"]} ></SubCard>
|
|
17
|
-
`}</code>
|
|
18
|
-
<h2>参数</h2>
|
|
19
|
-
<table className="pure-table pure-table-bordered">
|
|
20
|
-
<thead>
|
|
21
|
-
<tr>
|
|
22
|
-
<th>属性</th>
|
|
23
|
-
<th>说明</th>
|
|
24
|
-
<th>类型</th>
|
|
25
|
-
<th>默认值</th>
|
|
26
|
-
</tr>
|
|
27
|
-
</thead>
|
|
28
|
-
<tbody>
|
|
29
|
-
<tr>
|
|
30
|
-
<td>title</td>
|
|
31
|
-
<td>标题</td>
|
|
32
|
-
<td>string</td>
|
|
33
|
-
<td></td>
|
|
34
|
-
</tr>
|
|
35
|
-
<tr>
|
|
36
|
-
<td>context</td>
|
|
37
|
-
<td>内容</td>
|
|
38
|
-
<td>string</td>
|
|
39
|
-
<td></td>
|
|
40
|
-
</tr>
|
|
41
|
-
<tr>
|
|
42
|
-
<td>name</td>
|
|
43
|
-
<td>品名</td>
|
|
44
|
-
<td>string</td>
|
|
45
|
-
<td></td>
|
|
46
|
-
</tr>
|
|
47
|
-
<tr>
|
|
48
|
-
<td>tag</td>
|
|
49
|
-
<td>标签名</td>
|
|
50
|
-
<td>object</td>
|
|
51
|
-
<td></td>
|
|
52
|
-
</tr>
|
|
53
|
-
<tr>
|
|
54
|
-
<td>attrs</td>
|
|
55
|
-
<td>Array</td>
|
|
56
|
-
<td></td>
|
|
57
|
-
<td></td>
|
|
58
|
-
</tr>
|
|
59
|
-
</tbody>
|
|
60
|
-
</table>
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
}
|