@cniot/android-pda-components 0.2.20 → 0.2.21

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.
Files changed (113) hide show
  1. package/README.md +4 -21
  2. package/build/assets/index.51a8714a.css +1 -0
  3. package/build/assets/{index.66cd7994.js → index.b428d9a3.js} +16 -16
  4. package/build/assets/vendor.999402d8.js +40 -0
  5. package/build/index.html +3 -3
  6. package/package.json +1 -1
  7. package/packages/AppList/doc.jsx +138 -0
  8. package/packages/AppList/index.jsx +33 -0
  9. package/packages/AppList/index.less +52 -0
  10. package/packages/BaseLayout/BarcodeScan.jsx +88 -0
  11. package/packages/BaseLayout/BaseLayoutContainer.jsx +208 -0
  12. package/packages/BaseLayout/RfidOnce.jsx +106 -0
  13. package/packages/BaseLayout/RfidScan.jsx +118 -0
  14. package/packages/BaseLayout/doc.jsx +177 -0
  15. package/packages/BaseLayout/index.jsx +52 -0
  16. package/packages/BaseLayout/index.less +47 -0
  17. package/packages/Button/doc.jsx +62 -0
  18. package/packages/Button/index.jsx +27 -0
  19. package/packages/Button/index.less +62 -0
  20. package/packages/Confirm/doc.jsx +147 -0
  21. package/packages/Confirm/index.jsx +71 -0
  22. package/packages/Confirm/index.less +55 -0
  23. package/packages/Header/doc.jsx +171 -0
  24. package/packages/Header/index.jsx +191 -0
  25. package/packages/Header/index.less +71 -0
  26. package/packages/InfoCard/doc.jsx +244 -0
  27. package/packages/InfoCard/index.jsx +67 -0
  28. package/packages/InfoCard/index.less +111 -0
  29. package/packages/List/doc.jsx +89 -0
  30. package/packages/List/index.jsx +54 -0
  31. package/packages/List/index.less +43 -0
  32. package/packages/Overlay/doc.jsx +103 -0
  33. package/packages/Overlay/index.jsx +42 -0
  34. package/packages/Overlay/index.less +28 -0
  35. package/packages/PdaActionSheet/doc.jsx +193 -0
  36. package/packages/PdaActionSheet/index.jsx +44 -0
  37. package/packages/PdaActionSheet/index.less +65 -0
  38. package/packages/PdaDistanceCard/doc.jsx +62 -0
  39. package/packages/PdaDistanceCard/index.jsx +35 -0
  40. package/packages/PdaDistanceCard/index.less +42 -0
  41. package/packages/PdaFinishCard/doc.jsx +111 -0
  42. package/packages/PdaFinishCard/index.jsx +62 -0
  43. package/packages/PdaFinishCard/index.less +62 -0
  44. package/packages/PdaInfiniteScroll/doc.jsx +121 -0
  45. package/packages/PdaInfiniteScroll/index.jsx +114 -0
  46. package/packages/PdaInfiniteScroll/index.less +12 -0
  47. package/packages/PdaInfiniteScroll/utils.jsx +25 -0
  48. package/packages/PdaSteps/PdaStep/index.jsx +38 -0
  49. package/packages/PdaSteps/PdaStep/index.less +70 -0
  50. package/packages/PdaSteps/PdaSteps/index.jsx +33 -0
  51. package/packages/PdaSteps/PdaSteps/index.less +0 -0
  52. package/packages/PdaSteps/doc.jsx +131 -0
  53. package/packages/PdaSteps/index.jsx +5 -0
  54. package/packages/PdaTitle/doc.jsx +102 -0
  55. package/packages/PdaTitle/index.jsx +51 -0
  56. package/packages/Presentation/doc.jsx +72 -0
  57. package/packages/Presentation/index.jsx +25 -0
  58. package/packages/Presentation/index.less +31 -0
  59. package/packages/SelectCard/doc.jsx +57 -0
  60. package/packages/SelectCard/index.jsx +13 -0
  61. package/packages/SelectCard/index.less +30 -0
  62. package/packages/SimpleCard/doc.jsx +59 -0
  63. package/packages/SimpleCard/index.jsx +13 -0
  64. package/packages/SimpleCard/index.less +38 -0
  65. package/packages/SimpleCardBlock/doc.jsx +77 -0
  66. package/packages/SimpleCardBlock/index.jsx +43 -0
  67. package/packages/SimpleCardBlock/index.less +26 -0
  68. package/packages/SubCard/doc.jsx +63 -0
  69. package/packages/SubCard/index.jsx +28 -0
  70. package/packages/SubCard/index.less +64 -0
  71. package/packages/Tag/doc.jsx +47 -0
  72. package/packages/Tag/index.jsx +12 -0
  73. package/packages/Tag/index.less +22 -0
  74. package/packages/TaskCard/doc.jsx +151 -0
  75. package/packages/TaskCard/index.jsx +65 -0
  76. package/packages/TaskCard/index.less +101 -0
  77. package/packages/Toast/doc.jsx +112 -0
  78. package/packages/Toast/index.jsx +7 -0
  79. package/packages/Toast/index.less +23 -0
  80. package/packages/Toast/methods.jsx +77 -0
  81. package/packages/Toast/toast.jsx +96 -0
  82. package/packages/WakeKeyborard/doc.jsx +170 -0
  83. package/packages/WakeKeyborard/index.jsx +61 -0
  84. package/packages/WakeKeyborard/index.less +55 -0
  85. package/packages/WakeKeyborard/keyborard.jsx +61 -0
  86. package/packages/doc.jsx +19 -0
  87. package/packages/global.less +7 -0
  88. package/packages/index.jsx +60 -0
  89. package/packages/index.less +3 -0
  90. package/packages/pageflow-system-pages/alert/doc.jsx +70 -0
  91. package/packages/pageflow-system-pages/alert/index.jsx +22 -0
  92. package/packages/pageflow-system-pages/confirm/doc.jsx +118 -0
  93. package/packages/pageflow-system-pages/confirm/index.jsx +31 -0
  94. package/packages/pageflow-system-pages/debug/index.jsx +27 -0
  95. package/packages/pageflow-system-pages/debug/index.less +5 -0
  96. package/packages/pageflow-system-pages/index.jsx +38 -0
  97. package/packages/pageflow-system-pages/loading/index.jsx +37 -0
  98. package/packages/pageflow-system-pages/not-found/index.jsx +12 -0
  99. package/packages/pageflow-system-pages/not-found/index.less +26 -0
  100. package/packages/pageflow-system-pages/prompt/doc.jsx +95 -0
  101. package/packages/pageflow-system-pages/prompt/index.jsx +43 -0
  102. package/packages/pageflow-system-pages/prompt/index.less +44 -0
  103. package/packages/pageflow-system-pages/start/index.jsx +28 -0
  104. package/packages/pageflow-system-pages/start/index.less +12 -0
  105. package/packages/pageflow-system-pages/toast/doc.jsx +76 -0
  106. package/packages/pageflow-system-pages/toast/index.jsx +42 -0
  107. package/packages/utils/index.js +56 -0
  108. package/packages/variable.less +4 -0
  109. package/build/assets/index.b8d6d64c.css +0 -1
  110. package/build/assets/vendor.5080796b.js +0 -40
  111. package/es/index.cjs.js +0 -7
  112. package/es/index.es.js +0 -2194
  113. package/es/style.css +0 -1
@@ -0,0 +1,70 @@
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
+ }
@@ -0,0 +1,33 @@
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
@@ -0,0 +1,131 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ import Steps from './PdaSteps';
2
+ import Step from './PdaStep';
3
+
4
+ export { Step };
5
+ export default Steps;
@@ -0,0 +1,102 @@
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
+ }
@@ -0,0 +1,51 @@
1
+ import React from "react";
2
+ import classNames from "classnames";
3
+ // import OPInput from "../OPInput";
4
+ import Overlay from "../Overlay";
5
+ import "../Header/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
+ }
@@ -0,0 +1,72 @@
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
+ }
@@ -0,0 +1,25 @@
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";
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,57 @@
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
+ }
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,30 @@
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
+ }