@cniot/android-pda-components 0.0.2 → 0.0.6

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.
@@ -1 +1 @@
1
- .pda-header{display:flex;flex-direction:row;align-items:center;color:#fff;height:84px;padding-left:24px;padding-right:24px}.pda-header .pda-goback{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);width:18px;height:32px;background-size:100%;margin-left:4px;margin-right:8px}.pda-header .pda-header-icon{height:36px;width:36px;margin-left:16px;background-image:url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png);background-size:100%}.pda-header .pda-title-text{margin-left:16px;font-size:40px}.pda-header .pda-header-more{height:36px;width:36px;background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png);background-size:100%;background-repeat:no-repeat;background-position:center;margin-left:auto}.pda-button{display:block;box-sizing:border-box;padding-right:0;text-align:center;font-size:40px;height:90px;line-height:90px;color:#fff;background-color:#f3f4f8;border-radius:10px;width:100%;border-width:0}.pda-button.pda-button-default{color:#000}.pda-button:active{background-color:#979797}.pda-button.pda-button-primary{background-color:#0091ea}.pda-button.pda-button-primary:active{background-color:#0074bb}.pda-button.pda-button-dark{background-color:#282828}.pda-button.pda-button-dark:active{background-color:#979797}.pda-button.pda-button-cutout{color:#0091ea;border-width:4px;border-color:#0091ea}.pda-info-card{border-radius:16px;padding:24px 16px}.pda-info-card p{margin:0}.pda-info-card .pda-info-card-title{font-size:32px;color:#666}.pda-info-card .pda-info-card-highlight{font-size:80px;line-height:64px;color:#0091ea;font-weight:bold;display:flex;flex-direction:row;align-items:flex-end}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight1CN{font-size:64px}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight2{font-size:50px;line-height:40px}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight2CN{font-size:40px;line-height:40px}.pda-info-card .pda-info-card-bold{font-weight:bold;font-size:40px;line-height:48px;color:#000;margin-top:12px}.pda-info-card .pda-info-card-list{margin-top:8px;color:#4a4a4a;font-size:32px;line-height:32px}.pda-info-card.pda-info-card-dark .pda-info-card-title{color:#ffffff60}.pda-info-card.pda-info-card-dark .pda-info-card-highlight{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-bold{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-list{color:#ffffff60}.pda-list-item{padding:24px 16px;border-radius:16px;position:relative}.pda-list-item p{margin:0}.pda-list-item>p,.pda-list-item>div{margin-bottom:16px}.pda-list-item .pda-listitem-highlight{font-size:40px;line-height:40px;font-weight:bold;color:#fff;display:flex;flex-direction:row;justify-content:space-between}.pda-list-item .pda-listitem-header,.pda-list-item .pda-listitem-state-text,.pda-list-item .pda-listitem-subinfo{font-size:32px;line-height:32px;color:#ffffff60}.pda-list-item .pda-listitem-state-block{display:flex;flex-direction:row;flex-wrap:wrap;margin-bottom:0}.pda-list-item .pda-listitem-state-block>div{padding:6px 10px;border-radius:4px;background-color:#0091ea;margin-bottom:12px;margin-right:12px;font-size:24px;line-height:24px}.pda-list-item .pda-listitem-state-block>div.success{background-color:#0f0}.pda-list-item .pda-listitem-state-block>div.warning{background-color:#fc0}.pda-list-item .pda-listitem-state-block>div.error{background-color:red}.pda-list-item .pda-listitem-icon{position:absolute;top:0;right:0;width:48px;height:48px;background-color:#0091ea;border-radius:0 16px}.confirm-wrap{background:#ffffff;border-radius:6px 6px 0 0;padding:10px;width:100%}.confirm-wrap .confirm-title{font-size:2.4rem;font-weight:700}.confirm-wrap .confirm-message{font-size:2.2rem;margin-bottom:1rem}.confirm-wrap .confirm-btns{display:flex}.confirm-wrap .confirm-btns button:last-child{margin-left:5%}.toast-wrap{background:#00FF00;border-radius:6px;padding:10px 15px;width:90%;box-sizing:border-box}.toast-wrap.warning{background-color:#ffcb00}.toast-wrap.error{background-color:red}.toast-wrap .toast-title{font-size:2.4rem;font-weight:700}.toast-wrap .toast-message{font-size:1.9rem}.op-overlay{top:0;left:0;position:fixed;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;background-color:#0006;z-index:100}.op-overlay.center{align-items:center;justify-content:center}.op-overlay.top{align-items:flex-start;justify-content:center}.op-overlay.bottom{align-items:flex-end;justify-content:center}.light-block-overlay{position:relative;height:300px}.light-block-overlay .op-overlay{position:absolute;width:100%;height:100%}.components-container{display:flex}.components-example{flex-direction:column;border-right:1px solid #d8d8d8;min-height:100vh;padding-right:10px}.components-example h1{margin-top:20px}.components-example h2{color:#00000073;font-size:14px;margin-top:20px;border-bottom:1px solid #d8d8d8;padding-bottom:5px}.components-example .components-item{color:#000000d9;font-size:16px;padding:10px 0;margin-left:20px;align-items:center;cursor:pointer}.components-example .components-item:hover,.components-example .components-item.active{color:#4f10fd73}.components-example .components-item>small{margin-left:1em}.show-case{display:flex;flex-direction:column;padding:50px;flex:1}.show-case h2{margin:20px 0}.show-case .code{white-space:pre;border:1px solid #e8e8e8;border-radius:4px;background-color:#f9f9f9;padding:5px 10px;display:block;margin:20px 0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.demo-box{display:block;margin:5px 0;padding:15px;border:1px solid #e9e9e9;border-radius:6px;flex-direction:column}.demo-box:not(:last-child){margin-bottom:20px}.version{font-size:12px;margin-left:10px}.dark-block{background-color:#000;padding:24px}.light-block{background-color:#ddd;padding:24px}
1
+ .pda-header{display:flex;flex-direction:row;align-items:center;color:#fff;height:84px;padding-left:24px;padding-right:24px}.pda-header .pda-goback{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);width:18px;height:32px;background-size:100%;margin-left:4px;margin-right:8px}.pda-header .pda-header-icon{height:36px;width:36px;margin-left:16px;background-image:url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png);background-size:100%}.pda-header .pda-title-text{margin-left:16px;font-size:40px}.pda-header .pda-header-more{height:36px;width:36px;background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png);background-size:100%;background-repeat:no-repeat;background-position:center;margin-left:auto}.pda-button{display:block;box-sizing:border-box;padding-right:0;text-align:center;font-size:40px;height:90px;line-height:90px;color:#fff;background-color:#f3f4f8;border-radius:10px;width:100%;border-width:0}.pda-button.pda-button-default{color:#000}.pda-button:active{background-color:#979797}.pda-button.pda-button-primary{background-color:#0091ea}.pda-button.pda-button-primary:active{background-color:#0074bb}.pda-button.pda-button-dark{background-color:#282828}.pda-button.pda-button-dark:active{background-color:#979797}.pda-button.pda-button-cutout{color:#0091ea;border-width:4px;border-color:#0091ea}.pda-info-card{border-radius:16px;padding:24px 16px}.pda-info-card p{margin:0}.pda-info-card .pda-info-card-title{font-size:32px;color:#666}.pda-info-card .pda-info-card-highlight{font-size:80px;line-height:64px;color:#0091ea;font-weight:bold;display:flex;flex-direction:row;align-items:flex-end}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight1CN{font-size:64px}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight2{font-size:50px;line-height:40px}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight2CN{font-size:40px;line-height:40px}.pda-info-card .pda-info-card-bold{font-weight:bold;font-size:40px;line-height:48px;color:#000;margin-top:12px}.pda-info-card .pda-info-card-list{margin-top:8px;color:#4a4a4a;font-size:32px;line-height:32px}.pda-info-card.pda-info-card-dark .pda-info-card-title{color:#ffffff60}.pda-info-card.pda-info-card-dark .pda-info-card-highlight{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-bold{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-list{color:#ffffff60}.pda-list-item{padding:24px 16px;border-radius:16px;position:relative}.pda-list-item p{margin:0}.pda-list-item>p,.pda-list-item>div{margin-bottom:16px}.pda-list-item .pda-listitem-highlight{font-size:40px;line-height:40px;font-weight:bold;color:#fff;display:flex;flex-direction:row;justify-content:space-between}.pda-list-item .pda-listitem-header,.pda-list-item .pda-listitem-state-text,.pda-list-item .pda-listitem-subinfo{font-size:32px;line-height:32px;color:#ffffff60}.pda-list-item .pda-listitem-state-block{display:flex;flex-direction:row;flex-wrap:wrap;margin-bottom:0}.pda-list-item .pda-listitem-state-block>div{padding:6px 10px;border-radius:4px;background-color:#0091ea;margin-bottom:12px;margin-right:12px;font-size:24px;line-height:24px}.pda-list-item .pda-listitem-state-block>div.success{background-color:#0f0}.pda-list-item .pda-listitem-state-block>div.warning{background-color:#fc0}.pda-list-item .pda-listitem-state-block>div.error{background-color:red}.pda-list-item .pda-listitem-icon{position:absolute;top:0;right:0;width:48px;height:48px;background-color:#0091ea;border-radius:0 16px}.confirm-wrap{background:#ffffff;border-radius:6px 6px 0 0;padding:10px;width:100%}.confirm-wrap .confirm-title{font-size:2.4rem;font-weight:700}.confirm-wrap .confirm-message{font-size:2.2rem;margin-bottom:1rem}.confirm-wrap .confirm-btns{display:flex}.confirm-wrap .confirm-btns button:last-child{margin-left:5%}.toast-wrap{background:#00FF00;border-radius:6px;padding:10px 15px;width:90%;box-sizing:border-box}.toast-wrap.warning{background-color:#ffcb00}.toast-wrap.error{background-color:red}.toast-wrap .toast-title{font-size:2.4rem;font-weight:700}.toast-wrap .toast-message{font-size:1.9rem}.op-overlay{top:0;left:0;position:fixed;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;background-color:#0006;z-index:100}.op-overlay.center{align-items:center;justify-content:center}.op-overlay.top{align-items:flex-start;justify-content:center}.op-overlay.bottom{align-items:flex-end;justify-content:center}.presentation-card{margin:12px;background-color:#fff;border-radius:6px;text-align:center;padding:20px 6px}.presentation-card img{width:50%;height:auto}.presentation-card.transparent{background-color:transparent;color:#fff}.presentation-card .text{margin-top:12px;font-weight:700;font-size:16px}.components-container{display:flex}.components-example{flex-direction:column;border-right:1px solid #d8d8d8;min-height:100vh;padding-right:10px}.components-example h1{margin-top:20px}.components-example h2{color:#00000073;font-size:14px;margin-top:20px;border-bottom:1px solid #d8d8d8;padding-bottom:5px}.components-example .components-item{color:#000000d9;font-size:16px;padding:10px 0;margin-left:20px;align-items:center;cursor:pointer}.components-example .components-item:hover,.components-example .components-item.active{color:#4f10fd73}.components-example .components-item>small{margin-left:1em}.show-case{display:flex;flex-direction:column;padding:50px;flex:1}.show-case h2{margin:20px 0}.show-case .code{white-space:pre;border:1px solid #e8e8e8;border-radius:4px;background-color:#f9f9f9;padding:5px 10px;display:block;margin:20px 0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.demo-box{display:block;margin:5px 0;padding:15px;border:1px solid #e9e9e9;border-radius:6px;flex-direction:column}.demo-box:not(:last-child){margin-bottom:20px}.version{font-size:12px;margin-left:10px}.dark-block{background-color:#000;padding:24px}.light-block{background-color:#ddd;padding:24px}.light-block.pda{width:50%}.light-block-overlay{position:relative;height:300px}.light-block-overlay .op-overlay{position:absolute;width:100%;height:100%}
@@ -0,0 +1 @@
1
+ import{R as e,c as t,a as l}from"./vendor.dd3aae6b.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const l of e)if("childList"===l.type)for(const e of l.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();class n extends e.Component{constructor(e){super(e)}render(){const{className:l,goBack:n=!0,icon:a="scan",title:r="任务",more:c=!1}=this.props;return e.createElement("div",{className:t({[l]:!0,"pda-header":!0})},n&&e.createElement("div",{className:"pda-goback"}),a&&e.createElement("div",{className:"pda-header-icon"}),e.createElement("p",{className:t({"pda-title-text":!0})},r),c&&e.createElement("div",{className:"pda-header-more"}))}}class a extends e.Component{constructor(e){super(e)}render(){const{type:l="default",width:n,style:a={},onClick:r}=this.props;n&&(a.width=n);let c="pda-button-"+l;return e.createElement("button",{className:t({className:!0,"pda-button":!0,[c]:!0}),style:a,onClick:r},this.props.children)}}class r extends e.Component{constructor(e){super(e)}render(){const{className:l,title:n,highlightInfo:a,highlightInfoCN:r,highlightSubInfo:c,highlightSubInfoCN:m,boldInfo:s,infoList:o=[],style:i={},theme:u="light"}=this.props;return e.createElement("div",{className:t({[l]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===u}),style:i},e.createElement("p",{className:"pda-info-card-title"},n),e.createElement("p",{className:"pda-info-card-highlight"},e.createElement("span",{className:"pda-info-card-highlight1"},a),e.createElement("span",{className:"pda-info-card-highlight1CN"},r),e.createElement("span",{className:"pda-info-card-highlight2"},c),e.createElement("span",{className:"pda-info-card-highlight2CN"},m)),e.createElement("p",{className:"pda-info-card-bold"},s),o.map(((t,l)=>e.createElement("p",{key:l,className:"pda-info-card-list"},e.createElement("span",null,t.label||""),"  ",e.createElement("span",null,t.content||"")))))}}class c extends e.Component{constructor(e){super(e)}render(){const{className:l,header:n,highlightText:a,highlightSubText:r,stateTextList:c=[],stateList:m=[],subInfoList:s=[],style:o={}}=this.props;return e.createElement("div",{className:t({[l]:!0,"pda-list-item":!0}),style:o},e.createElement("p",{className:"pda-listitem-header"},n),e.createElement("p",{className:"pda-listitem-highlight"},e.createElement("span",null,a),e.createElement("span",null,r)),e.createElement("p",{className:"pda-listitem-state-text"},c.map(((t,l)=>e.createElement("span",{key:l},t.label||"","|")))),e.createElement("div",{className:"pda-listitem-state-block"},m.map(((t,l)=>{const n=(null==t?void 0:t.type)?t.type:"default";return e.createElement("div",{key:l,className:n},t.label||"")}))),s.map(((t,l)=>e.createElement("p",{key:l,className:"pda-listitem-subinfo"},e.createElement("span",null,t.label||""),"  ",e.createElement("span",null,t.content||"")))),e.createElement("div",{className:"pda-listitem-icon"}))}}function m(){}function s(t){const{title:l="title",message:n="message",okText:r="okText",cancelText:c="cancelText",onClick:s=m}=t;return e.createElement("div",{className:"confirm-wrap"},e.createElement("div",{className:"confirm-title"},l),e.createElement("div",{className:"confirm-message"},n),e.createElement("div",{className:"confirm-btns"},c?e.createElement(a,{onClick:()=>s(!1)},c):null,e.createElement(a,{type:"primary",onClick:()=>s(!0)},r)))}function o(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function i(t){const{title:l="title",message:n="message",type:a="success"}=t;return e.createElement("div",{className:o(a)},e.createElement("div",{className:"toast-title"},l),e.createElement("div",{className:"toast-message"},n))}function u(t){const{verticalPosition:l="center"}=t;return e.createElement("div",{className:(n=l,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[n]||"op-overlay")},t.children);var n}function E(t){const{image:l=E.IMAGE_1,text:n="",transparent:a}=t;return e.createElement("div",{className:a?"presentation-card transparent":"presentation-card"},e.createElement("img",{src:l}),n?e.createElement("div",{className:"text"},n):null)}function d(t){const{service:l,data:n={}}=t,{title:a="title",message:r="message",okText:c="okText",cancelText:m=""}=n,o=e.useCallback((function(){l.onNext(!0)}),[l]);return e.createElement(u,{verticalPosition:"bottom"},e.createElement(s,{title:a,message:r,okText:c,cancelText:m,onClick:o}))}E.IMAGE_1="https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png",E.IMAGE_2="https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png",E.IMAGE_3="https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";var h={onNext(e){console.log("onnext",e)}};function p(t){const{service:l,data:n={}}=t,{title:a="title",message:r="message",okText:c="okText",cancelText:m=""}=n,o=e.useCallback((function(e){l.onNext(e)}),[l]);return e.createElement(u,{verticalPosition:"bottom"},e.createElement(s,{title:a,message:r,okText:c,cancelText:m,onClick:o}))}function g(t){const{data:l={},service:n}=t,{title:a,level:r,message:c}=l;return e.useEffect((()=>{!1!==l.hasNext&&n.onNext("")}),[l,n]),e.createElement(u,{verticalPosition:"bottom"},e.createElement(i,{type:r,title:a,message:c}))}const b=[{title:"组件列表",pages:[{key:"First",title:"快速开始",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"快速开始"),e.createElement("code",{className:"code"},"\n\ntnpm install @cniot/android-pda-components --save\n\nimport { Button } from '@cniot/android-pda-components';\n\nimport '@cniot/android-pda-components/es/style.css';\n\n "))}},{key:"Title",title:"Title",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"dark-block"},e.createElement(n,{title:"hello world",more:!0})),e.createElement("code",{className:"code"},"\n <Title\n title='hello world'\n more={true}\n ></Title>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"goBack"),e.createElement("td",null,"返回按钮"),e.createElement("td",null,"boolean"),e.createElement("td",null,"true")),e.createElement("tr",null,e.createElement("td",null,"icon"),e.createElement("td",null,"title 图标"),e.createElement("td",null,"string(类型待更新)"),e.createElement("td",null,"scan")),e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"more"),e.createElement("td",null,"更多"),e.createElement("td",null,"boolean"),e.createElement("td",null,"false")))))}},{key:"Button",title:"Button",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block"},e.createElement(a,null,"按钮"),e.createElement(a,{width:"60%",type:"primary",onClick:e=>console.log(e)},"确认"),e.createElement(a,{width:"150px",type:"dark",style:{marginTop:"12px",marginBottom:"12px"}},"深色"),e.createElement("div",{style:{display:"flex",flexDirection:"row"}},e.createElement(a,{type:"cutout",style:{marginRight:"12px"}},"镂空"),e.createElement(a,null,"按钮"))),e.createElement("code",{className:"code"},"\n <Button>按钮</Button>\n <Button width='60%' type='primary' onClick={e => console.log(e) }>确认</Button>\n <Button width='150px' type='dark' style={{marginTop: '12px', marginBottom: '12px'}}>深色</Button>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"type"),e.createElement("td",null,"类型"),e.createElement("td",null,"string: primary | dark | cutout"),e.createElement("td",null,"default")),e.createElement("tr",null,e.createElement("td",null,"width"),e.createElement("td",null,"按钮宽度"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"style"),e.createElement("td",null,"覆写样式"),e.createElement("td",null,"object"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"onClick"),e.createElement("td",null,"点击事件"),e.createElement("td",null,"function"),e.createElement("td",null)))))}},{key:"InfoCard",title:"InfoCard",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},e.createElement(r,{title:"待拣件数",highlightInfo:"800",highlightInfoCN:"件",highlightSubInfo:"/800",highlightSubInfoCN:"件",boldInfo:"加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行",style:{width:"400px",backgroundColor:"white",marginRight:"32px"},infoList:[{label:"商品条码",content:"623126388798"},{label:"截止日期",content:"2022-07-25"},{label:"产品名称",content:"商品的名称"},{label:"品号",content:"12398765423"}]}),e.createElement(r,{title:"待拣件数",highlightInfo:"800",highlightInfoCN:"件",highlightSubInfo:"/800",highlightSubInfoCN:"件",boldInfo:"加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行",style:{width:"400px",backgroundColor:"black"},theme:"dark",infoList:[{label:"商品条码",content:"623126388798"},{label:"截止日期",content:"2022-07-25"},{label:"产品名称",content:"商品的名称"},{label:"品号",content:"12398765423"}]})),e.createElement("code",{className:"code"},"\n<InfoCard\n title=\"待拣件数\"\n highlightInfo=\"800\"\n highlightInfoCN = \"件\"\n highlightSubInfo=\"/800\"\n highlightSubInfoCN=\"件\"\n boldInfo=\"加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行\"\n style={{\n width: '400px',\n backgroundColor: 'black',\n }}\n theme='dark'\n infoList={\n [\n {label: '商品条码', content: '623126388798'},\n {label: '截止日期', content: '2022-07-25'},\n {label: '产品名称', content: '商品的名称'},\n {label: '品号', content: '12398765423'},\n ]\n }\n/>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightInfo"),e.createElement("td",null,"高亮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightInfoCN"),e.createElement("td",null,"高亮文本(中文)"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightSubInfo"),e.createElement("td",null,"高亮副文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightSubInfoCN"),e.createElement("td",null,"高亮副文本(中文)"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"boldInfo"),e.createElement("td",null,"加粗文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"theme"),e.createElement("td",null,"主题"),e.createElement("td",null,"string: light | dark"),e.createElement("td",null,"light")),e.createElement("tr",null,e.createElement("td",null,"infoList"),e.createElement("td",null,"更多信息"),e.createElement("td",null,"object[]"),e.createElement("td",null)))))}},{key:"ListItem",title:"ListItem",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},e.createElement(c,{header:"任务单",highlightText:"XXXX-XX-XXX",highlightSubText:"30%",stateTextList:[{label:"状态1"},{label:"状态2"},{label:"状态2"}],stateList:[{label:"success",type:"success"},{label:"default"},{label:"warning",type:"warning"},{label:"error",type:"error"}],subInfoList:[{label:"商品条码",content:"623126388798"},{label:"截止日期",content:"2022-07-25"},{label:"产品名称",content:"商品的名称"},{label:"品号",content:"12398765423"}],style:{width:"432px",marginRight:"32px",backgroundColor:"black"}})),e.createElement("code",{className:"code"},"\n<ListItem\n header=\"任务单\"\n highlightText=\"XXXX-XX-XXX\"\n highlightSubText=\"30%\"\n stateTextList={[\n {label: '状态1'},\n {label: '状态2'},\n {label: '状态2'},\n ]}\n stateList={[\n {label: 'success', type: 'success'},\n {label: 'default', },\n {label: 'warning', type: 'warning'},\n {label: 'error', type: 'error'},\n ]}\n subInfoList={\n [\n {label: '商品条码', content: '623126388798'},\n {label: '截止日期', content: '2022-07-25'},\n {label: '产品名称', content: '商品的名称'},\n {label: '品号', content: '12398765423'},\n ]\n }\n/>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"header"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightText"),e.createElement("td",null,"高亮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightSubText"),e.createElement("td",null,"高亮副文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"stateTextList"),e.createElement("td",null,"状态列表"),e.createElement("td",null,"object[]"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"subInfoList"),e.createElement("td",null,"更多商品信息"),e.createElement("td",null,"object[]"),e.createElement("td",null)))))}},{key:"Confirm",title:"Confirm",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Confirm"),e.createElement("p",null,"确认组件, 如果要悬浮在页面上,请配合 Overlay 使用"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block"},e.createElement(s,{title:"111111",message:"22222",okText:"确认",cancelText:"取消",onClick:e=>{console.log("isConfirm",e)}})),e.createElement("code",{className:"code"},'\n <Confirm \n title="111111" \n message="22222" \n okText="确认" \n cancelText="取消"\n onClick={(isConfirm)=>{\n console.log("isConfirm", isConfirm);\n }}\n ></Confirm>\n '),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null,"标题文案")),e.createElement("tr",null,e.createElement("td",null,"message"),e.createElement("td",null,"消息内容"),e.createElement("td",null,"string"),e.createElement("td",null,"消息内容")),e.createElement("tr",null,e.createElement("td",null,"okText"),e.createElement("td",null,"确认按钮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"cancelText"),e.createElement("td",null,"取消按钮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"onClick"),e.createElement("td",null,"按钮点击回调"),e.createElement("td",null,"(isConfirm)=>"),e.createElement("td",null)))))}},{key:"Toast",title:"Toast",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Toast"),e.createElement("p",null,"弹窗组件,如果要悬浮在页面上,请配合 Overlay 使用"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block"},e.createElement(i,{title:"111111",message:"22222",type:"success"}),e.createElement("br",null),e.createElement(i,{title:"111111",message:"22222",type:"warning"}),e.createElement("br",null),e.createElement(i,{title:"111111",message:"22222",type:"error"}),e.createElement("br",null)),e.createElement("code",{className:"code"},'\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n <br />\n <Toast \n title="111111" \n message="22222"\n type="warning"\n ></Toast>\n\n <br />\n <Toast \n title="111111" \n message="22222"\n type="error"\n ></Toast>\n '),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null,"标题文案")),e.createElement("tr",null,e.createElement("td",null,"message"),e.createElement("td",null,"消息内容"),e.createElement("td",null,"string"),e.createElement("td",null,"消息内容")),e.createElement("tr",null,e.createElement("td",null,"type"),e.createElement("td",null,"消息类型"),e.createElement("td",null,"string"),e.createElement("td",null,"success|warning|error")))))}},{key:"Overlay",title:"Overlay",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Overlay"),e.createElement("p",null,"统一处理模态遮罩样式"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(u,{verticalPosition:"top"},e.createElement(i,{title:"111111",message:"22222",type:"success"}))),e.createElement("br",null),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(u,{verticalPosition:"center"},e.createElement(i,{title:"111111",message:"22222",type:"warning"}))),e.createElement("br",null),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(u,{verticalPosition:"bottom"},e.createElement(s,{title:"111111",message:"22222",type:"error"}))),e.createElement("code",{className:"code"},'\n <Overlay verticalPosition="top" >\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n </Overlay>\n\n <Overlay verticalPosition="center" >\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n </Overlay>\n\n <Overlay verticalPosition="bottom" >\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n </Overlay>\n \n '),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"verticalPosition"),e.createElement("td",null,"垂直方向位置"),e.createElement("td",null,"string"),e.createElement("td",null,"top|center|bottom")))))}},{key:"Presentation",title:"Presentation",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Confirm"),e.createElement("p",null,"确认组件, 如果要悬浮在页面上,请配合 Overlay 使用"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block pda"},e.createElement(E,{text:"请靠近箱码进行识别"})),e.createElement("br",null),e.createElement("div",{className:"light-block pda",style:{backgroundColor:"#000000"}},e.createElement(E,{image:E.IMAGE_2,text:"请靠近箱码进行识别",transparent:!0})),e.createElement("br",null),e.createElement("div",{className:"light-block pda",style:{backgroundColor:"#000000"}},e.createElement(E,{image:E.IMAGE_3,text:"请靠近箱码进行识别"})),e.createElement("br",null),e.createElement("code",{className:"code"},'\n<Presentation text="请靠近箱码进行识别" ></Presentation>\n<Presentation image={Presentation.IMAGE_2} text="请靠近箱码进行识别" transparent={true} ></Presentation>\n<Presentation image={Presentation.IMAGE_3} text="请靠近箱码进行识别" ></Presentation>\n '),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"image"),e.createElement("td",null,"图片地址"),e.createElement("td",null,"string"),e.createElement("td",null,"可以使用 Presentation.IMAGE_1, Presentation.IMAGE_2 2张内置图片")),e.createElement("tr",null,e.createElement("td",null,"text"),e.createElement("td",null,"文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"transparent"),e.createElement("td",null,"是否透明,不显示被色背景"),e.createElement("td",null,"boolean"),e.createElement("td",null,"默认false")))))}}]},{title:"内置界面预览",pages:[{key:"/system/alert",title:"/system/alert",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"/system/alert"),e.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),e.createElement("h2",null,"示例"),e.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.alert({\n title: '111',\n message: '2222',\n okText: \"确认\"\n })\n "),e.createElement("h2",null,"页面效果"),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(d,{service:h,data:{title:"111",message:"2222",okText:"确认"}})))}},{key:"/system/confirm",title:"/system/confirm",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"/system/alert"),e.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),e.createElement("h2",null,"示例"),e.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.confirm({\n title: '111',\n message: '2222',\n okText: \"确认\",\n cancelText:\"取消\"\n })\n "),e.createElement("h2",null,"页面效果"),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(p,{service:h,data:{title:"111",message:"2222",okText:"确认",cancelText:"取消"}})))}},{key:"/system/toast",title:"/system/toast",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"/system/toast"),e.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),e.createElement("h2",null,"示例"),e.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.toast({\n level: \"success\", // success|warning|error\n title: '111',\n message: '2222'\n })\n "),e.createElement("h2",null,"页面效果"),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(g,{service:h,data:{level:"success",title:"111",message:"2222"}})))}}]}];function f(){const[t,l]=e.useState("First"),n=e.useCallback((function(e){l(e)})),a=(r=t,b.map((e=>e.pages.filter((function(e){return e.key===r}))[0])).filter((e=>e))[0]);var r;return e.createElement("div",{className:"components-container"},e.createElement("div",{className:"components-example"},e.createElement("h1",{title:"@cniot/android-pda-components"},"Components"),b.map((function(l,a){return e.createElement(e.Fragment,{key:a},e.createElement("h2",null,l.title),l.pages.map((function(l){return e.createElement("div",{className:t===l.key?"components-item active":"components-item",onClick:n.bind(null,l.key),"data-index":l.key,key:l.key},e.createElement("span",null,l.title))})))}))),e.createElement("div",{className:"show-case"},a?e.createElement(a.doc,{}):null))}l.render(e.createElement(f,null),document.getElementById("root"));
package/build/index.html CHANGED
@@ -9,9 +9,9 @@
9
9
 
10
10
  <script src="https://g.alicdn.com/code/lib/react/17.0.2/umd/react.production.min.js"></script>
11
11
  <script src="https://g.alicdn.com/code/lib/react-dom/17.0.2/umd/react-dom.production.min.js"></script>
12
- <script type="module" crossorigin src="./assets/index.56dfe62c.js"></script>
12
+ <script type="module" crossorigin src="./assets/index.cdfa56e7.js"></script>
13
13
  <link rel="modulepreload" href="./assets/vendor.dd3aae6b.js">
14
- <link rel="stylesheet" href="./assets/index.b52b706a.css">
14
+ <link rel="stylesheet" href="./assets/index.7c7cdba7.css">
15
15
  </head>
16
16
 
17
17
  <body>
package/doc/index.jsx CHANGED
@@ -1,13 +1,22 @@
1
1
  import React from "react";
2
2
  import ReactDOM from "react-dom";
3
3
 
4
- import PdaTitle from "../packages/PdaTitle/doc.jsx";
5
- import PdaButton from "../packages/Button/doc.jsx";
6
- import PdaInfoCard from "../packages/PdaInfoCard/doc.jsx";
7
- import PdaListItem from "../packages/PdaListItem/doc.jsx";
4
+ import First from "../packages/doc.jsx";
5
+ import Title from "../packages/PdaTitle/doc.jsx";
6
+ import Button from "../packages/Button/doc.jsx";
7
+ import InfoCard from "../packages/PdaInfoCard/doc.jsx";
8
+ import ListItem from "../packages/PdaListItem/doc.jsx";
8
9
  import Confirm from "../packages/Confirm/doc.jsx";
9
10
  import Toast from "../packages/Toast/doc.jsx";
10
11
  import Overlay from "../packages/Overlay/doc.jsx";
12
+ import Presentation from "../packages/Presentation/doc.jsx";
13
+
14
+ import systemAlert from '../packages/pageflow-system-pages/alert/doc';
15
+ import systemConfirm from '../packages/pageflow-system-pages/confirm/doc';
16
+ import systemToast from '../packages/pageflow-system-pages/toast/doc';
17
+
18
+ // 系统界面
19
+ // import PageFlowSystemPages from "../packages/pageflow-system-pages";
11
20
 
12
21
  import "./index.less";
13
22
 
@@ -16,24 +25,29 @@ const docs = [
16
25
  title: "组件列表",
17
26
  pages: [
18
27
  {
19
- key: "PdaTitle",
20
- title: "PdaTitle",
21
- doc: PdaTitle,
28
+ key: "First",
29
+ title: "快速开始",
30
+ doc: First,
31
+ },
32
+ {
33
+ key: "Title",
34
+ title: "Title",
35
+ doc: Title,
22
36
  },
23
37
  {
24
- key: "PdaButton",
25
- title: "PdaButton",
26
- doc: PdaButton,
38
+ key: "Button",
39
+ title: "Button",
40
+ doc: Button,
27
41
  },
28
42
  {
29
- key: "PdaInfoCard",
30
- title: "PdaInfoCard",
31
- doc: PdaInfoCard,
43
+ key: "InfoCard",
44
+ title: "InfoCard",
45
+ doc: InfoCard,
32
46
  },
33
47
  {
34
- key: "PdaListItem",
35
- title: "PdaListItem",
36
- doc: PdaListItem,
48
+ key: "ListItem",
49
+ title: "ListItem",
50
+ doc: ListItem,
37
51
  },
38
52
  {
39
53
  key:"Confirm",
@@ -50,19 +64,46 @@ const docs = [
50
64
  title:"Overlay",
51
65
  doc: Overlay
52
66
  },
67
+ {
68
+ key:"Presentation",
69
+ title:"Presentation",
70
+ doc: Presentation
71
+ }
53
72
 
54
73
  ],
55
74
  },
75
+ {
76
+ title: "内置界面预览",
77
+ pages: [
78
+ {
79
+ key: "/system/alert",
80
+ title: "/system/alert",
81
+ doc: systemAlert,
82
+ },
83
+ {
84
+ key: "/system/confirm",
85
+ title: "/system/confirm",
86
+ doc: systemConfirm,
87
+ },
88
+ {
89
+ key: "/system/toast",
90
+ title: "/system/toast",
91
+ doc: systemToast,
92
+ },
93
+ ],
94
+ },
56
95
  ];
57
96
 
58
97
  function getDoc(key) {
59
- return docs[0].pages.filter(function (item) {
60
- return item.key === key;
61
- })[0];
98
+ return docs.map((doc)=>{
99
+ return doc.pages.filter(function (item) {
100
+ return item.key === key;
101
+ })[0];
102
+ }).filter(a => a)[0];
62
103
  }
63
104
 
64
105
  function App() {
65
- const [currentIndex, setCurrentIndex] = React.useState("PdaListItem");
106
+ const [currentIndex, setCurrentIndex] = React.useState("First");
66
107
  const onClickComponentItem = React.useCallback(function (key) {
67
108
  setCurrentIndex(key);
68
109
  });
@@ -71,7 +112,7 @@ function App() {
71
112
  return (
72
113
  <div className="components-container">
73
114
  <div className="components-example">
74
- <h1>Components</h1>
115
+ <h1 title="@cniot/android-pda-components" >Components</h1>
75
116
  {docs.map(function (item, index) {
76
117
  return (
77
118
  <React.Fragment key={index}>
package/doc/index.less CHANGED
@@ -134,4 +134,17 @@ th {
134
134
  .light-block {
135
135
  background-color: #ddd;
136
136
  padding: 24px;
137
+ &.pda{
138
+ width:50%;
139
+ }
140
+ }
141
+
142
+ .light-block-overlay{
143
+ position: relative;
144
+ height:300px;
145
+ .op-overlay{
146
+ position: absolute;
147
+ width: 100%;
148
+ height: 100%;
149
+ }
137
150
  }
package/es/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,s=(t,a,l)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[a]=l;Object.defineProperty(exports,"__esModule",{value:!0}),exports[Symbol.toStringTag]="Module";var c=require("react");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(c);c.forwardRef((function(e,i){const d=c.useRef(null),u=o.default.useCallback((function(t){"Enter"===t.nativeEvent.code&&(e.onSubmit&&e.onSubmit((t.target.value||"").trim()),t.target.select())}),[e.onSubmit]);return o.default.useEffect((function(){e.active&&d.current.focus()}),[e.active]),c.useImperativeHandle(i,(()=>({getInputNode:()=>d.current,focus(){d.current.focus()}}))),o.default.createElement("input",(p=((e,t)=>{for(var a in t||(t={}))r.call(t,a)&&s(e,a,t[a]);if(l)for(var a of l(t))n.call(t,a)&&s(e,a,t[a]);return e})({},e),t(p,a({ref:d,className:"op-input",onKeyDown:u}))));var p}));var d,u={exports:{}};
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports[Symbol.toStringTag]="Module";var t,a=e(require("react")),l={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
6
  */
7
- d=u,function(){var e={}.hasOwnProperty;function t(){for(var a=[],l=0;l<arguments.length;l++){var r=arguments[l];if(r){var n=typeof r;if("string"===n||"number"===n)a.push(r);else if(Array.isArray(r)){if(r.length){var s=t.apply(null,r);s&&a.push(s)}}else if("object"===n)if(r.toString===Object.prototype.toString)for(var c in r)e.call(r,c)&&r[c]&&a.push(c);else a.push(r.toString())}}return a.join(" ")}d.exports?(t.default=t,d.exports=t):window.classNames=t}();var p=u.exports;class f extends o.default.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,icon:a="scan",title:l="任务",more:r=!1}=this.props;return o.default.createElement("div",{className:p({className:!0,"pda-header":!0})},t&&o.default.createElement("div",{className:"pda-goback"}),a&&o.default.createElement("div",{className:"pda-header-icon"}),o.default.createElement("p",{className:p({"pda-title-text":!0})},l),r&&o.default.createElement("div",{className:"pda-header-more"}))}}class m extends o.default.Component{constructor(e){super(e)}render(){const{type:e="default",width:t,style:a={},onClick:l}=this.props;t&&(a.width=t);let r="pda-button-"+e;return o.default.createElement("button",{className:p({className:!0,"pda-button":!0,[r]:!0}),style:a,onClick:l},this.props.children)}}class h extends o.default.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:a,highlightInfoCN:l,highlightSubInfo:r,highlightSubInfoCN:n,boldInfo:s,infoList:c=[],style:i={},theme:d="light"}=this.props;return o.default.createElement("div",{className:p({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===d}),style:i},o.default.createElement("p",{className:"pda-info-card-title"},t),o.default.createElement("p",{className:"pda-info-card-highlight"},o.default.createElement("span",{className:"pda-info-card-highlight1"},a),o.default.createElement("span",{className:"pda-info-card-highlight1CN"},l),o.default.createElement("span",{className:"pda-info-card-highlight2"},r),o.default.createElement("span",{className:"pda-info-card-highlight2CN"},n)),o.default.createElement("p",{className:"pda-info-card-bold"},s),c.map(((e,t)=>o.default.createElement("p",{key:t,className:"pda-info-card-list"},o.default.createElement("span",null,e.label||""),"  ",o.default.createElement("span",null,e.content||"")))))}}class g extends o.default.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:a,highlightSubText:l,stateTextList:r=[],stateList:n=[],subInfoList:s=[],style:c={}}=this.props;return o.default.createElement("div",{className:p({[e]:!0,"pda-list-item":!0}),style:c},o.default.createElement("p",{className:"pda-listitem-header"},t),o.default.createElement("p",{className:"pda-listitem-highlight"},o.default.createElement("span",null,a),o.default.createElement("span",null,l)),o.default.createElement("p",{className:"pda-listitem-state-text"},r.map(((e,t)=>o.default.createElement("span",{key:t},e.label||"","|")))),o.default.createElement("div",{className:"pda-listitem-state-block"},n.map(((e,t)=>{const a=(null==e?void 0:e.type)?e.type:"default";return o.default.createElement("div",{key:t,className:a},e.label||"")}))),s.map(((e,t)=>o.default.createElement("p",{key:t,className:"pda-listitem-subinfo"},o.default.createElement("span",null,e.label||""),"  ",o.default.createElement("span",null,e.content||"")))),o.default.createElement("div",{className:"pda-listitem-icon"}))}}exports.Button=m,exports.InfoCard=h,exports.ListItem=g,exports.Title=f;
7
+ t=l,function(){var e={}.hasOwnProperty;function a(){for(var t=[],l=0;l<arguments.length;l++){var n=arguments[l];if(n){var s=typeof n;if("string"===s||"number"===s)t.push(n);else if(Array.isArray(n)){if(n.length){var r=a.apply(null,n);r&&t.push(r)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var c in n)e.call(n,c)&&n[c]&&t.push(c);else t.push(n.toString())}}return t.join(" ")}t.exports?(a.default=a,t.exports=a):window.classNames=a}();var n=l.exports;class s extends a.default.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,icon:l="scan",title:s="任务",more:r=!1}=this.props;return a.default.createElement("div",{className:n({[e]:!0,"pda-header":!0})},t&&a.default.createElement("div",{className:"pda-goback"}),l&&a.default.createElement("div",{className:"pda-header-icon"}),a.default.createElement("p",{className:n({"pda-title-text":!0})},s),r&&a.default.createElement("div",{className:"pda-header-more"}))}}class r extends a.default.Component{constructor(e){super(e)}render(){const{type:e="default",width:t,style:l={},onClick:s}=this.props;t&&(l.width=t);let r="pda-button-"+e;return a.default.createElement("button",{className:n({className:!0,"pda-button":!0,[r]:!0}),style:l,onClick:s},this.props.children)}}class c extends a.default.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:l,highlightInfoCN:s,highlightSubInfo:r,highlightSubInfoCN:c,boldInfo:o,infoList:i=[],style:u={},theme:d="light"}=this.props;return a.default.createElement("div",{className:n({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===d}),style:u},a.default.createElement("p",{className:"pda-info-card-title"},t),a.default.createElement("p",{className:"pda-info-card-highlight"},a.default.createElement("span",{className:"pda-info-card-highlight1"},l),a.default.createElement("span",{className:"pda-info-card-highlight1CN"},s),a.default.createElement("span",{className:"pda-info-card-highlight2"},r),a.default.createElement("span",{className:"pda-info-card-highlight2CN"},c)),a.default.createElement("p",{className:"pda-info-card-bold"},o),i.map(((e,t)=>a.default.createElement("p",{key:t,className:"pda-info-card-list"},a.default.createElement("span",null,e.label||""),"  ",a.default.createElement("span",null,e.content||"")))))}}class o extends a.default.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:l,highlightSubText:s,stateTextList:r=[],stateList:c=[],subInfoList:o=[],style:i={}}=this.props;return a.default.createElement("div",{className:n({[e]:!0,"pda-list-item":!0}),style:i},a.default.createElement("p",{className:"pda-listitem-header"},t),a.default.createElement("p",{className:"pda-listitem-highlight"},a.default.createElement("span",null,l),a.default.createElement("span",null,s)),a.default.createElement("p",{className:"pda-listitem-state-text"},r.map(((e,t)=>a.default.createElement("span",{key:t},e.label||"","|")))),a.default.createElement("div",{className:"pda-listitem-state-block"},c.map(((e,t)=>{const l=(null==e?void 0:e.type)?e.type:"default";return a.default.createElement("div",{key:t,className:l},e.label||"")}))),o.map(((e,t)=>a.default.createElement("p",{key:t,className:"pda-listitem-subinfo"},a.default.createElement("span",null,e.label||""),"  ",a.default.createElement("span",null,e.content||"")))),a.default.createElement("div",{className:"pda-listitem-icon"}))}}function i(e){const{verticalPosition:t="center"}=e;return a.default.createElement("div",{className:(l=t,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[l]||"op-overlay")},e.children);var l}function u(){}function d(e){const{title:t="title",message:l="message",okText:n="okText",cancelText:s="cancelText",onClick:c=u}=e;return a.default.createElement("div",{className:"confirm-wrap"},a.default.createElement("div",{className:"confirm-title"},t),a.default.createElement("div",{className:"confirm-message"},l),a.default.createElement("div",{className:"confirm-btns"},s?a.default.createElement(r,{onClick:()=>c(!1)},s):null,a.default.createElement(r,{type:"primary",onClick:()=>c(!0)},n)))}function f(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function m(e){const{title:t="title",message:l="message",type:n="success"}=e;return a.default.createElement("div",{className:f(n)},a.default.createElement("div",{className:"toast-title"},t),a.default.createElement("div",{className:"toast-message"},l))}var p={Alert:function(e){const{service:t,data:l={}}=e,{title:n="title",message:s="message",okText:r="okText",cancelText:c=""}=l,o=a.default.useCallback((function(){t.onNext(!0)}),[t]);return a.default.createElement(i,{verticalPosition:"bottom"},a.default.createElement(d,{title:n,message:s,okText:r,cancelText:c,onClick:o}))},Start:function(e){const{action:t,appManager:l,service:n}=e,s=a.default.useCallback((function(){n.onStart(l.config.appId)}));return a.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh"}},a.default.createElement(r,{type:"primary",onClick:s},"开始作业"),a.default.createElement("br",null),a.default.createElement("div",null,l.config.appId),a.default.createElement("div",null,l.config.groupId))},Toast:function(e){const{data:t={},service:l}=e,{title:n,level:s,message:r}=t;return a.default.useEffect((()=>{!1!==t.hasNext&&l.onNext("")}),[t,l]),a.default.createElement(i,{verticalPosition:"bottom"},a.default.createElement(m,{type:s,title:n,message:r}))},Confirm:function(e){const{service:t,data:l={}}=e,{title:n="title",message:s="message",okText:r="okText",cancelText:c=""}=l,o=a.default.useCallback((function(e){t.onNext(e)}),[t]);return a.default.createElement(i,{verticalPosition:"bottom"},a.default.createElement(d,{title:n,message:s,okText:r,cancelText:c,onClick:o}))},NotFound:function(e){return a.default.createElement("div",{style:{padding:"20%"}},a.default.createElement("h1",null,"404 ",a.default.createElement("small",{style:{fontSize:"60%"}},"Not found")),a.default.createElement("div",null,e.action.getPage()))},Debug:function(e){const{appManager:t}=e,l=Array.from(t.pageManager.keys()).reverse();return a.default.useEffect((function(){}),[]),a.default.createElement("div",{className:"local-debug-side"},a.default.createElement("ul",null,l.map((e=>a.default.createElement("li",{key:e},a.default.createElement("a",{href:`#${e}`},e))))))},Prompt:function(e){return a.default.createElement("div",null,"页面不存在")},Loading:function(e){const[t,l]=a.default.useState(!1),n=e.edgeService;return a.default.useEffect((function(){let e=!1;const t=function(t){e=t,t?setTimeout((function(){e===t&&l(!0)}),350):setTimeout((function(){e===t&&l(!1)}),100)};return n.on("IO_STATUS",t),function(){n.off("IO_STATUS",t)}}),[n]),t?a.default.createElement("div",{style:{position:"absolute",left:0,top:0,zIndex:100}},"LOADING..."):null}};exports.Button=r,exports.Confirm=d,exports.InfoCard=c,exports.ListItem=o,exports.Overlay=i,exports.PageFlowSystemPages=p,exports.Title=s,exports.Toast=m;
package/es/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,l=(t,a,n)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n;import c,{forwardRef as i,useRef as o,useImperativeHandle as p}from"react";i((function(e,i){const m=o(null),d=c.useCallback((function(t){"Enter"===t.nativeEvent.code&&(e.onSubmit&&e.onSubmit((t.target.value||"").trim()),t.target.select())}),[e.onSubmit]);return c.useEffect((function(){e.active&&m.current.focus()}),[e.active]),p(i,(()=>({getInputNode:()=>m.current,focus(){m.current.focus()}}))),c.createElement("input",(u=((e,t)=>{for(var a in t||(t={}))s.call(t,a)&&l(e,a,t[a]);if(n)for(var a of n(t))r.call(t,a)&&l(e,a,t[a]);return e})({},e),t(u,a({ref:m,className:"op-input",onKeyDown:d}))));var u}));var m,d={exports:{}};
1
+ import e from"react";var t,a={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
6
  */
7
- m=d,function(){var e={}.hasOwnProperty;function t(){for(var a=[],n=0;n<arguments.length;n++){var s=arguments[n];if(s){var r=typeof s;if("string"===r||"number"===r)a.push(s);else if(Array.isArray(s)){if(s.length){var l=t.apply(null,s);l&&a.push(l)}}else if("object"===r)if(s.toString===Object.prototype.toString)for(var c in s)e.call(s,c)&&s[c]&&a.push(c);else a.push(s.toString())}}return a.join(" ")}m.exports?(t.default=t,m.exports=t):window.classNames=t}();var u=d.exports;class h extends c.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,icon:a="scan",title:n="任务",more:s=!1}=this.props;return c.createElement("div",{className:u({className:!0,"pda-header":!0})},t&&c.createElement("div",{className:"pda-goback"}),a&&c.createElement("div",{className:"pda-header-icon"}),c.createElement("p",{className:u({"pda-title-text":!0})},n),s&&c.createElement("div",{className:"pda-header-more"}))}}class f extends c.Component{constructor(e){super(e)}render(){const{type:e="default",width:t,style:a={},onClick:n}=this.props;t&&(a.width=t);let s="pda-button-"+e;return c.createElement("button",{className:u({className:!0,"pda-button":!0,[s]:!0}),style:a,onClick:n},this.props.children)}}class g extends c.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:a,highlightInfoCN:n,highlightSubInfo:s,highlightSubInfoCN:r,boldInfo:l,infoList:i=[],style:o={},theme:p="light"}=this.props;return c.createElement("div",{className:u({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===p}),style:o},c.createElement("p",{className:"pda-info-card-title"},t),c.createElement("p",{className:"pda-info-card-highlight"},c.createElement("span",{className:"pda-info-card-highlight1"},a),c.createElement("span",{className:"pda-info-card-highlight1CN"},n),c.createElement("span",{className:"pda-info-card-highlight2"},s),c.createElement("span",{className:"pda-info-card-highlight2CN"},r)),c.createElement("p",{className:"pda-info-card-bold"},l),i.map(((e,t)=>c.createElement("p",{key:t,className:"pda-info-card-list"},c.createElement("span",null,e.label||""),"  ",c.createElement("span",null,e.content||"")))))}}class E extends c.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:a,highlightSubText:n,stateTextList:s=[],stateList:r=[],subInfoList:l=[],style:i={}}=this.props;return c.createElement("div",{className:u({[e]:!0,"pda-list-item":!0}),style:i},c.createElement("p",{className:"pda-listitem-header"},t),c.createElement("p",{className:"pda-listitem-highlight"},c.createElement("span",null,a),c.createElement("span",null,n)),c.createElement("p",{className:"pda-listitem-state-text"},s.map(((e,t)=>c.createElement("span",{key:t},e.label||"","|")))),c.createElement("div",{className:"pda-listitem-state-block"},r.map(((e,t)=>{const a=(null==e?void 0:e.type)?e.type:"default";return c.createElement("div",{key:t,className:a},e.label||"")}))),l.map(((e,t)=>c.createElement("p",{key:t,className:"pda-listitem-subinfo"},c.createElement("span",null,e.label||""),"  ",c.createElement("span",null,e.content||"")))),c.createElement("div",{className:"pda-listitem-icon"}))}}export{f as Button,g as InfoCard,E as ListItem,h as Title};
7
+ t=a,function(){var e={}.hasOwnProperty;function a(){for(var t=[],n=0;n<arguments.length;n++){var l=arguments[n];if(l){var s=typeof l;if("string"===s||"number"===s)t.push(l);else if(Array.isArray(l)){if(l.length){var r=a.apply(null,l);r&&t.push(r)}}else if("object"===s)if(l.toString===Object.prototype.toString)for(var c in l)e.call(l,c)&&l[c]&&t.push(c);else t.push(l.toString())}}return t.join(" ")}t.exports?(a.default=a,t.exports=a):window.classNames=a}();var n=a.exports;class l extends e.Component{constructor(e){super(e)}render(){const{className:t,goBack:a=!0,icon:l="scan",title:s="任务",more:r=!1}=this.props;return e.createElement("div",{className:n({[t]:!0,"pda-header":!0})},a&&e.createElement("div",{className:"pda-goback"}),l&&e.createElement("div",{className:"pda-header-icon"}),e.createElement("p",{className:n({"pda-title-text":!0})},s),r&&e.createElement("div",{className:"pda-header-more"}))}}class s extends e.Component{constructor(e){super(e)}render(){const{type:t="default",width:a,style:l={},onClick:s}=this.props;a&&(l.width=a);let r="pda-button-"+t;return e.createElement("button",{className:n({className:!0,"pda-button":!0,[r]:!0}),style:l,onClick:s},this.props.children)}}class r extends e.Component{constructor(e){super(e)}render(){const{className:t,title:a,highlightInfo:l,highlightInfoCN:s,highlightSubInfo:r,highlightSubInfoCN:c,boldInfo:i,infoList:o=[],style:m={},theme:p="light"}=this.props;return e.createElement("div",{className:n({[t]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===p}),style:m},e.createElement("p",{className:"pda-info-card-title"},a),e.createElement("p",{className:"pda-info-card-highlight"},e.createElement("span",{className:"pda-info-card-highlight1"},l),e.createElement("span",{className:"pda-info-card-highlight1CN"},s),e.createElement("span",{className:"pda-info-card-highlight2"},r),e.createElement("span",{className:"pda-info-card-highlight2CN"},c)),e.createElement("p",{className:"pda-info-card-bold"},i),o.map(((t,a)=>e.createElement("p",{key:a,className:"pda-info-card-list"},e.createElement("span",null,t.label||""),"  ",e.createElement("span",null,t.content||"")))))}}class c extends e.Component{constructor(e){super(e)}render(){const{className:t,header:a,highlightText:l,highlightSubText:s,stateTextList:r=[],stateList:c=[],subInfoList:i=[],style:o={}}=this.props;return e.createElement("div",{className:n({[t]:!0,"pda-list-item":!0}),style:o},e.createElement("p",{className:"pda-listitem-header"},a),e.createElement("p",{className:"pda-listitem-highlight"},e.createElement("span",null,l),e.createElement("span",null,s)),e.createElement("p",{className:"pda-listitem-state-text"},r.map(((t,a)=>e.createElement("span",{key:a},t.label||"","|")))),e.createElement("div",{className:"pda-listitem-state-block"},c.map(((t,a)=>{const n=(null==t?void 0:t.type)?t.type:"default";return e.createElement("div",{key:a,className:n},t.label||"")}))),i.map(((t,a)=>e.createElement("p",{key:a,className:"pda-listitem-subinfo"},e.createElement("span",null,t.label||""),"  ",e.createElement("span",null,t.content||"")))),e.createElement("div",{className:"pda-listitem-icon"}))}}function i(t){const{verticalPosition:a="center"}=t;return e.createElement("div",{className:(n=a,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[n]||"op-overlay")},t.children);var n}function o(){}function m(t){const{title:a="title",message:n="message",okText:l="okText",cancelText:r="cancelText",onClick:c=o}=t;return e.createElement("div",{className:"confirm-wrap"},e.createElement("div",{className:"confirm-title"},a),e.createElement("div",{className:"confirm-message"},n),e.createElement("div",{className:"confirm-btns"},r?e.createElement(s,{onClick:()=>c(!1)},r):null,e.createElement(s,{type:"primary",onClick:()=>c(!0)},l)))}function p(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function u(t){const{title:a="title",message:n="message",type:l="success"}=t;return e.createElement("div",{className:p(l)},e.createElement("div",{className:"toast-title"},a),e.createElement("div",{className:"toast-message"},n))}var d={Alert:function(t){const{service:a,data:n={}}=t,{title:l="title",message:s="message",okText:r="okText",cancelText:c=""}=n,o=e.useCallback((function(){a.onNext(!0)}),[a]);return e.createElement(i,{verticalPosition:"bottom"},e.createElement(m,{title:l,message:s,okText:r,cancelText:c,onClick:o}))},Start:function(t){const{action:a,appManager:n,service:l}=t,r=e.useCallback((function(){l.onStart(n.config.appId)}));return e.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh"}},e.createElement(s,{type:"primary",onClick:r},"开始作业"),e.createElement("br",null),e.createElement("div",null,n.config.appId),e.createElement("div",null,n.config.groupId))},Toast:function(t){const{data:a={},service:n}=t,{title:l,level:s,message:r}=a;return e.useEffect((()=>{!1!==a.hasNext&&n.onNext("")}),[a,n]),e.createElement(i,{verticalPosition:"bottom"},e.createElement(u,{type:s,title:l,message:r}))},Confirm:function(t){const{service:a,data:n={}}=t,{title:l="title",message:s="message",okText:r="okText",cancelText:c=""}=n,o=e.useCallback((function(e){a.onNext(e)}),[a]);return e.createElement(i,{verticalPosition:"bottom"},e.createElement(m,{title:l,message:s,okText:r,cancelText:c,onClick:o}))},NotFound:function(t){return e.createElement("div",{style:{padding:"20%"}},e.createElement("h1",null,"404 ",e.createElement("small",{style:{fontSize:"60%"}},"Not found")),e.createElement("div",null,t.action.getPage()))},Debug:function(t){const{appManager:a}=t,n=Array.from(a.pageManager.keys()).reverse();return e.useEffect((function(){}),[]),e.createElement("div",{className:"local-debug-side"},e.createElement("ul",null,n.map((t=>e.createElement("li",{key:t},e.createElement("a",{href:`#${t}`},t))))))},Prompt:function(t){return e.createElement("div",null,"页面不存在")},Loading:function(t){const[a,n]=e.useState(!1),l=t.edgeService;return e.useEffect((function(){let e=!1;const t=function(t){e=t,t?setTimeout((function(){e===t&&n(!0)}),350):setTimeout((function(){e===t&&n(!1)}),100)};return l.on("IO_STATUS",t),function(){l.off("IO_STATUS",t)}}),[l]),a?e.createElement("div",{style:{position:"absolute",left:0,top:0,zIndex:100}},"LOADING..."):null}};export{s as Button,m as Confirm,r as InfoCard,c as ListItem,i as Overlay,d as PageFlowSystemPages,l as Title,u as Toast};
package/es/style.css CHANGED
@@ -1,216 +1 @@
1
- .op-input {
2
- display: block;
3
- background-color: #fff;
4
- border: 1px solid #cccccc;
5
- min-width: 100%;
6
- min-height: 52px;
7
- padding: 0 10px;
8
- width: 100%;
9
- font-size: 24px;
10
- color: #000;
11
- border-radius: 4px;
12
- appearance: none;
13
- -webkit-appearance: none;
14
- -moz-appearance: none;
15
- outline: none;
16
- box-sizing: border-box;
17
- }
18
- .op-input:focus {
19
- border-color: #5584ff;
20
- box-shadow: 0 0 0 2px #5584ff33;
21
- }
22
- .op-input.disabled {
23
- background-color: #f4f4f4;
24
- opacity: 0.6;
25
- }
26
- .pda-header {
27
- display: flex;
28
- flex-direction: row;
29
- align-items: center;
30
- color: #fff;
31
- height: 84px;
32
- padding-left: 24px;
33
- padding-right: 24px;
34
- }
35
- .pda-header .pda-goback {
36
- background-image: url(https://img.alicdn.com/imgextra/i4/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);
37
- width: 18px;
38
- height: 32px;
39
- background-size: 100%;
40
- margin-left: 4px;
41
- margin-right: 8px;
42
- }
43
- .pda-header .pda-header-icon {
44
- height: 36px;
45
- width: 36px;
46
- margin-left: 16px;
47
- background-image: url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png);
48
- background-size: 100%;
49
- }
50
- .pda-header .pda-title-text {
51
- margin-left: 16px;
52
- font-size: 40px;
53
- }
54
- .pda-header .pda-header-more {
55
- height: 36px;
56
- width: 36px;
57
- background-image: url(https://img.alicdn.com/imgextra/i4/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png);
58
- background-size: 100%;
59
- background-repeat: no-repeat;
60
- background-position: center;
61
- margin-left: auto;
62
- }
63
- .pda-button {
64
- display: block;
65
- box-sizing: border-box;
66
- padding-right: 0;
67
- text-align: center;
68
- font-size: 40px;
69
- height: 90px;
70
- line-height: 90px;
71
- color: #fff;
72
- background-color: #f3f4f8;
73
- border-radius: 10px;
74
- width: 100%;
75
- border-width: 0;
76
- }
77
- .pda-button.pda-button-default {
78
- color: #000;
79
- }
80
- .pda-button:active {
81
- background-color: #979797;
82
- }
83
- .pda-button.pda-button-primary {
84
- background-color: #0091ea;
85
- }
86
- .pda-button.pda-button-primary:active {
87
- background-color: #0074bb;
88
- }
89
- .pda-button.pda-button-dark {
90
- background-color: #282828;
91
- }
92
- .pda-button.pda-button-dark:active {
93
- background-color: #979797;
94
- }
95
- .pda-button.pda-button-cutout {
96
- color: #0091ea;
97
- border-width: 4px;
98
- border-color: #0091ea;
99
- }
100
- .pda-info-card {
101
- border-radius: 16px;
102
- padding: 24px 16px;
103
- }
104
- .pda-info-card p {
105
- margin: 0;
106
- }
107
- .pda-info-card .pda-info-card-title {
108
- font-size: 32px;
109
- color: #666;
110
- }
111
- .pda-info-card .pda-info-card-highlight {
112
- font-size: 80px;
113
- line-height: 64px;
114
- color: #0091ea;
115
- font-weight: bold;
116
- display: flex;
117
- flex-direction: row;
118
- align-items: flex-end;
119
- }
120
- .pda-info-card .pda-info-card-highlight .pda-info-card-highlight1CN {
121
- font-size: 64px;
122
- }
123
- .pda-info-card .pda-info-card-highlight .pda-info-card-highlight2 {
124
- font-size: 50px;
125
- line-height: 40px;
126
- }
127
- .pda-info-card .pda-info-card-highlight .pda-info-card-highlight2CN {
128
- font-size: 40px;
129
- line-height: 40px;
130
- }
131
- .pda-info-card .pda-info-card-bold {
132
- font-weight: bold;
133
- font-size: 40px;
134
- line-height: 48px;
135
- color: #000;
136
- margin-top: 12px;
137
- }
138
- .pda-info-card .pda-info-card-list {
139
- margin-top: 8px;
140
- color: #4a4a4a;
141
- font-size: 32px;
142
- line-height: 32px;
143
- }
144
- .pda-info-card.pda-info-card-dark .pda-info-card-title {
145
- color: #ffffff60;
146
- }
147
- .pda-info-card.pda-info-card-dark .pda-info-card-highlight {
148
- color: #fff;
149
- }
150
- .pda-info-card.pda-info-card-dark .pda-info-card-bold {
151
- color: #fff;
152
- }
153
- .pda-info-card.pda-info-card-dark .pda-info-card-list {
154
- color: #ffffff60;
155
- }
156
- .pda-list-item {
157
- padding: 24px 16px;
158
- border-radius: 16px;
159
- position: relative;
160
- }
161
- .pda-list-item p {
162
- margin: 0;
163
- }
164
- .pda-list-item > p,
165
- .pda-list-item > div {
166
- margin-bottom: 16px;
167
- }
168
- .pda-list-item .pda-listitem-highlight {
169
- font-size: 40px;
170
- line-height: 40px;
171
- font-weight: bold;
172
- color: #fff;
173
- display: flex;
174
- flex-direction: row;
175
- justify-content: space-between;
176
- }
177
- .pda-list-item .pda-listitem-header,
178
- .pda-list-item .pda-listitem-state-text,
179
- .pda-list-item .pda-listitem-subinfo {
180
- font-size: 32px;
181
- line-height: 32px;
182
- color: #ffffff60;
183
- }
184
- .pda-list-item .pda-listitem-state-block {
185
- display: flex;
186
- flex-direction: row;
187
- flex-wrap: wrap;
188
- margin-bottom: 0;
189
- }
190
- .pda-list-item .pda-listitem-state-block > div {
191
- padding: 6px 10px;
192
- border-radius: 4px;
193
- background-color: #0091ea;
194
- margin-bottom: 12px;
195
- margin-right: 12px;
196
- font-size: 24px;
197
- line-height: 24px;
198
- }
199
- .pda-list-item .pda-listitem-state-block > div.success {
200
- background-color: #0f0;
201
- }
202
- .pda-list-item .pda-listitem-state-block > div.warning {
203
- background-color: #fc0;
204
- }
205
- .pda-list-item .pda-listitem-state-block > div.error {
206
- background-color: red;
207
- }
208
- .pda-list-item .pda-listitem-icon {
209
- position: absolute;
210
- top: 0;
211
- right: 0;
212
- width: 48px;
213
- height: 48px;
214
- background-color: #0091ea;
215
- border-radius: 0 16px;
216
- }
1
+ .pda-header{display:flex;flex-direction:row;align-items:center;color:#fff;height:84px;padding-left:24px;padding-right:24px}.pda-header .pda-goback{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);width:18px;height:32px;background-size:100%;margin-left:4px;margin-right:8px}.pda-header .pda-header-icon{height:36px;width:36px;margin-left:16px;background-image:url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png);background-size:100%}.pda-header .pda-title-text{margin-left:16px;font-size:40px}.pda-header .pda-header-more{height:36px;width:36px;background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png);background-size:100%;background-repeat:no-repeat;background-position:center;margin-left:auto}.pda-button{display:block;box-sizing:border-box;padding-right:0;text-align:center;font-size:40px;height:90px;line-height:90px;color:#fff;background-color:#f3f4f8;border-radius:10px;width:100%;border-width:0}.pda-button.pda-button-default{color:#000}.pda-button:active{background-color:#979797}.pda-button.pda-button-primary{background-color:#0091ea}.pda-button.pda-button-primary:active{background-color:#0074bb}.pda-button.pda-button-dark{background-color:#282828}.pda-button.pda-button-dark:active{background-color:#979797}.pda-button.pda-button-cutout{color:#0091ea;border-width:4px;border-color:#0091ea}.pda-info-card{border-radius:16px;padding:24px 16px}.pda-info-card p{margin:0}.pda-info-card .pda-info-card-title{font-size:32px;color:#666}.pda-info-card .pda-info-card-highlight{font-size:80px;line-height:64px;color:#0091ea;font-weight:bold;display:flex;flex-direction:row;align-items:flex-end}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight1CN{font-size:64px}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight2{font-size:50px;line-height:40px}.pda-info-card .pda-info-card-highlight .pda-info-card-highlight2CN{font-size:40px;line-height:40px}.pda-info-card .pda-info-card-bold{font-weight:bold;font-size:40px;line-height:48px;color:#000;margin-top:12px}.pda-info-card .pda-info-card-list{margin-top:8px;color:#4a4a4a;font-size:32px;line-height:32px}.pda-info-card.pda-info-card-dark .pda-info-card-title{color:#ffffff60}.pda-info-card.pda-info-card-dark .pda-info-card-highlight{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-bold{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-list{color:#ffffff60}.pda-list-item{padding:24px 16px;border-radius:16px;position:relative}.pda-list-item p{margin:0}.pda-list-item>p,.pda-list-item>div{margin-bottom:16px}.pda-list-item .pda-listitem-highlight{font-size:40px;line-height:40px;font-weight:bold;color:#fff;display:flex;flex-direction:row;justify-content:space-between}.pda-list-item .pda-listitem-header,.pda-list-item .pda-listitem-state-text,.pda-list-item .pda-listitem-subinfo{font-size:32px;line-height:32px;color:#ffffff60}.pda-list-item .pda-listitem-state-block{display:flex;flex-direction:row;flex-wrap:wrap;margin-bottom:0}.pda-list-item .pda-listitem-state-block>div{padding:6px 10px;border-radius:4px;background-color:#0091ea;margin-bottom:12px;margin-right:12px;font-size:24px;line-height:24px}.pda-list-item .pda-listitem-state-block>div.success{background-color:#0f0}.pda-list-item .pda-listitem-state-block>div.warning{background-color:#fc0}.pda-list-item .pda-listitem-state-block>div.error{background-color:red}.pda-list-item .pda-listitem-icon{position:absolute;top:0;right:0;width:48px;height:48px;background-color:#0091ea;border-radius:0 16px}.op-overlay{top:0;left:0;position:fixed;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;background-color:#0006;z-index:100}.op-overlay.center{align-items:center;justify-content:center}.op-overlay.top{align-items:flex-start;justify-content:center}.op-overlay.bottom{align-items:flex-end;justify-content:center}.confirm-wrap{background:#ffffff;border-radius:6px 6px 0 0;padding:10px;width:100%}.confirm-wrap .confirm-title{font-size:2.4rem;font-weight:700}.confirm-wrap .confirm-message{font-size:2.2rem;margin-bottom:1rem}.confirm-wrap .confirm-btns{display:flex}.confirm-wrap .confirm-btns button:last-child{margin-left:5%}.toast-wrap{background:#00FF00;border-radius:6px;padding:10px 15px;width:90%;box-sizing:border-box}.toast-wrap.warning{background-color:#ffcb00}.toast-wrap.error{background-color:red}.toast-wrap .toast-title{font-size:2.4rem;font-weight:700}.toast-wrap .toast-message{font-size:1.9rem}.mini-app-start-page{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100vw;height:100vh}.mini-app-start-page button{padding:.3em 3em;border-radius:6px;border:none;font-size:36px;background-color:#00bdff;color:#fff;margin-top:20px}.mini-app-start-page button:active{transform:scale(.95)}.mini-app-start-page .desc{opacity:.3}.local-debug-side{position:absolute;right:0;bottom:0}
@@ -0,0 +1,5 @@
1
+ export default {
2
+ onNext(inputvalue){
3
+ console.log("onnext", inputvalue);
4
+ }
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cniot/android-pda-components",
3
- "version": "0.0.2",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "main": "./es/index.cjs.js",
6
6
  "module": "./es/index.es.js",
package/vite.config.js CHANGED
@@ -1,32 +1,32 @@
1
- export default {
2
- // 配置选项
3
- base: "./",
4
- build: {
5
- outDir: "./es",
6
- lib: {
7
- entry: "./packages/index.jsx",
8
- formats: ["es", "cjs"],
9
- fileName: "index",
10
- },
11
- rollupOptions: {
12
- // 确保外部化处理那些你不想打包进库的依赖
13
- external: ["react", "react-dom"],
14
- output: {
15
- // 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
16
- globals: {
17
- react: "React",
18
- "react-dom": "ReactDOM",
19
- },
20
- },
21
- },
22
- },
23
- };
24
-
25
1
  // export default {
26
2
  // // 配置选项
27
3
  // base: "./",
28
4
  // build: {
29
- // // 以下是 doc 的打包
30
- // outDir: "./build",
5
+ // outDir: "./es",
6
+ // lib: {
7
+ // entry: "./packages/index.jsx",
8
+ // formats: ["es", "cjs"],
9
+ // fileName: "index",
10
+ // },
11
+ // rollupOptions: {
12
+ // // 确保外部化处理那些你不想打包进库的依赖
13
+ // external: ["react", "react-dom"],
14
+ // output: {
15
+ // // 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
16
+ // globals: {
17
+ // react: "React",
18
+ // "react-dom": "ReactDOM",
19
+ // },
20
+ // },
21
+ // },
31
22
  // },
32
23
  // };
24
+
25
+ export default {
26
+ // 配置选项
27
+ base: "./",
28
+ build: {
29
+ // 以下是 doc 的打包
30
+ outDir: "./build",
31
+ },
32
+ };
@@ -1 +0,0 @@
1
- import{R as e,c as t,a as l}from"./vendor.dd3aae6b.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const l of e)if("childList"===l.type)for(const e of l.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();class n extends e.Component{constructor(e){super(e)}render(){const{className:l,goBack:n=!0,icon:a="scan",title:r="任务",more:c=!1}=this.props;return e.createElement("div",{className:t({[l]:!0,"pda-header":!0})},n&&e.createElement("div",{className:"pda-goback"}),a&&e.createElement("div",{className:"pda-header-icon"}),e.createElement("p",{className:t({"pda-title-text":!0})},r),c&&e.createElement("div",{className:"pda-header-more"}))}}class a extends e.Component{constructor(e){super(e)}render(){const{type:l="default",width:n,style:a={},onClick:r}=this.props;n&&(a.width=n);let c="pda-button-"+l;return e.createElement("button",{className:t({className:!0,"pda-button":!0,[c]:!0}),style:a,onClick:r},this.props.children)}}class r extends e.Component{constructor(e){super(e)}render(){const{className:l,title:n,highlightInfo:a,highlightInfoCN:r,highlightSubInfo:c,highlightSubInfoCN:m,boldInfo:s,infoList:i=[],style:o={},theme:u="light"}=this.props;return e.createElement("div",{className:t({[l]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===u}),style:o},e.createElement("p",{className:"pda-info-card-title"},n),e.createElement("p",{className:"pda-info-card-highlight"},e.createElement("span",{className:"pda-info-card-highlight1"},a),e.createElement("span",{className:"pda-info-card-highlight1CN"},r),e.createElement("span",{className:"pda-info-card-highlight2"},c),e.createElement("span",{className:"pda-info-card-highlight2CN"},m)),e.createElement("p",{className:"pda-info-card-bold"},s),i.map(((t,l)=>e.createElement("p",{key:l,className:"pda-info-card-list"},e.createElement("span",null,t.label||""),"  ",e.createElement("span",null,t.content||"")))))}}class c extends e.Component{constructor(e){super(e)}render(){const{className:l,header:n,highlightText:a,highlightSubText:r,stateTextList:c=[],stateList:m=[],subInfoList:s=[],style:i={}}=this.props;return e.createElement("div",{className:t({[l]:!0,"pda-list-item":!0}),style:i},e.createElement("p",{className:"pda-listitem-header"},n),e.createElement("p",{className:"pda-listitem-highlight"},e.createElement("span",null,a),e.createElement("span",null,r)),e.createElement("p",{className:"pda-listitem-state-text"},c.map(((t,l)=>e.createElement("span",{key:l},t.label||"","|")))),e.createElement("div",{className:"pda-listitem-state-block"},m.map(((t,l)=>{const n=(null==t?void 0:t.type)?t.type:"default";return e.createElement("div",{key:l,className:n},t.label||"")}))),s.map(((t,l)=>e.createElement("p",{key:l,className:"pda-listitem-subinfo"},e.createElement("span",null,t.label||""),"  ",e.createElement("span",null,t.content||"")))),e.createElement("div",{className:"pda-listitem-icon"}))}}function m(){}function s(t){const{title:l="title",message:n="message",okText:r="okText",cancelText:c="cancelText",onClick:s=m}=t;return e.createElement("div",{className:"confirm-wrap"},e.createElement("div",{className:"confirm-title"},l),e.createElement("div",{className:"confirm-message"},n),e.createElement("div",{className:"confirm-btns"},e.createElement(a,{onClick:()=>s(!1)},c),e.createElement(a,{type:"primary",onClick:()=>s(!0)},r)))}function i(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function o(t){const{title:l="title",message:n="message",type:a="success"}=t;return e.createElement("div",{className:i(a)},e.createElement("div",{className:"toast-title"},l),e.createElement("div",{className:"toast-message"},n))}function u(t){const{verticalPosition:l="center"}=t;return e.createElement("div",{className:(n=l,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[n]||"op-overlay")},t.children);var n}const d=[{title:"组件列表",pages:[{key:"PdaTitle",title:"PdaTitle",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"dark-block"},e.createElement(n,{title:"hello world",more:!0})),e.createElement("code",{className:"code"},"\n <PdaTitle\n title='hello world'\n more={true}\n ></PdaTitle>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"goBack"),e.createElement("td",null,"返回按钮"),e.createElement("td",null,"boolean"),e.createElement("td",null,"true")),e.createElement("tr",null,e.createElement("td",null,"icon"),e.createElement("td",null,"title 图标"),e.createElement("td",null,"string(类型待更新)"),e.createElement("td",null,"scan")),e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"more"),e.createElement("td",null,"更多"),e.createElement("td",null,"boolean"),e.createElement("td",null,"false")))))}},{key:"PdaButton",title:"PdaButton",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block"},e.createElement(a,null,"按钮"),e.createElement(a,{width:"60%",type:"primary",onClick:e=>console.log(e)},"确认"),e.createElement(a,{width:"150px",type:"dark",style:{marginTop:"12px",marginBottom:"12px"}},"深色"),e.createElement("div",{style:{display:"flex",flexDirection:"row"}},e.createElement(a,{type:"cutout",style:{marginRight:"12px"}},"镂空"),e.createElement(a,null,"按钮"))),e.createElement("code",{className:"code"},"\n <PdaButton>按钮</PdaButton>\n <PdaButton width='60%' type='primary' onClick={e => console.log(e) }>确认</PdaButton>\n <PdaButton width='150px' type='dark' style={{marginTop: '12px', marginBottom: '12px'}}>深色</PdaButton>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"type"),e.createElement("td",null,"类型"),e.createElement("td",null,"string: primary | dark | cutout"),e.createElement("td",null,"default")),e.createElement("tr",null,e.createElement("td",null,"width"),e.createElement("td",null,"按钮宽度"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"style"),e.createElement("td",null,"覆写样式"),e.createElement("td",null,"object"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"onClick"),e.createElement("td",null,"点击事件"),e.createElement("td",null,"function"),e.createElement("td",null)))))}},{key:"PdaInfoCard",title:"PdaInfoCard",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},e.createElement(r,{title:"待拣件数",highlightInfo:"800",highlightInfoCN:"件",highlightSubInfo:"/800",highlightSubInfoCN:"件",boldInfo:"加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行",style:{width:"400px",backgroundColor:"white",marginRight:"32px"},infoList:[{label:"商品条码",content:"623126388798"},{label:"截止日期",content:"2022-07-25"},{label:"产品名称",content:"商品的名称"},{label:"品号",content:"12398765423"}]}),e.createElement(r,{title:"待拣件数",highlightInfo:"800",highlightInfoCN:"件",highlightSubInfo:"/800",highlightSubInfoCN:"件",boldInfo:"加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行",style:{width:"400px",backgroundColor:"black"},theme:"dark",infoList:[{label:"商品条码",content:"623126388798"},{label:"截止日期",content:"2022-07-25"},{label:"产品名称",content:"商品的名称"},{label:"品号",content:"12398765423"}]})),e.createElement("code",{className:"code"},"\n<PdaInfoCard\n title=\"待拣件数\"\n highlightInfo=\"800\"\n highlightInfoCN = \"件\"\n highlightSubInfo=\"/800\"\n highlightSubInfoCN=\"件\"\n boldInfo=\"加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行\"\n style={{\n width: '400px',\n backgroundColor: 'black',\n }}\n theme='dark'\n infoList={\n [\n {label: '商品条码', content: '623126388798'},\n {label: '截止日期', content: '2022-07-25'},\n {label: '产品名称', content: '商品的名称'},\n {label: '品号', content: '12398765423'},\n ]\n }\n/>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightInfo"),e.createElement("td",null,"高亮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightInfoCN"),e.createElement("td",null,"高亮文本(中文)"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightSubInfo"),e.createElement("td",null,"高亮副文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightSubInfoCN"),e.createElement("td",null,"高亮副文本(中文)"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"boldInfo"),e.createElement("td",null,"加粗文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"theme"),e.createElement("td",null,"主题"),e.createElement("td",null,"string: light | dark"),e.createElement("td",null,"light")),e.createElement("tr",null,e.createElement("td",null,"infoList"),e.createElement("td",null,"更多信息"),e.createElement("td",null,"object[]"),e.createElement("td",null)))))}},{key:"PdaListItem",title:"PdaListItem",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Scan"),e.createElement("p",null,"扫码组件"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},e.createElement(c,{header:"任务单",highlightText:"XXXX-XX-XXX",highlightSubText:"30%",stateTextList:[{label:"状态1"},{label:"状态2"},{label:"状态2"}],stateList:[{label:"success",type:"success"},{label:"default"},{label:"warning",type:"warning"},{label:"error",type:"error"}],subInfoList:[{label:"商品条码",content:"623126388798"},{label:"截止日期",content:"2022-07-25"},{label:"产品名称",content:"商品的名称"},{label:"品号",content:"12398765423"}],style:{width:"432px",marginRight:"32px",backgroundColor:"black"}})),e.createElement("code",{className:"code"},"\n<PdaListItem\n header=\"任务单\"\n highlightText=\"XXXX-XX-XXX\"\n highlightSubText=\"30%\"\n stateTextList={[\n {label: '状态1'},\n {label: '状态2'},\n {label: '状态2'},\n ]}\n stateList={[\n {label: 'success', type: 'success'},\n {label: 'default', },\n {label: 'warning', type: 'warning'},\n {label: 'error', type: 'error'},\n ]}\n subInfoList={\n [\n {label: '商品条码', content: '623126388798'},\n {label: '截止日期', content: '2022-07-25'},\n {label: '产品名称', content: '商品的名称'},\n {label: '品号', content: '12398765423'},\n ]\n }\n/>\n "),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"header"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightText"),e.createElement("td",null,"高亮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"highlightSubText"),e.createElement("td",null,"高亮副文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"stateTextList"),e.createElement("td",null,"状态列表"),e.createElement("td",null,"object[]"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"subInfoList"),e.createElement("td",null,"更多商品信息"),e.createElement("td",null,"object[]"),e.createElement("td",null)))))}},{key:"Confirm",title:"Confirm",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Confirm"),e.createElement("p",null,"确认组件, 如果要悬浮在页面上,请配合 Overlay 使用"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block"},e.createElement(s,{title:"111111",message:"22222",okText:"确认",cancelText:"取消",onClick:e=>{console.log("isConfirm",e)}})),e.createElement("code",{className:"code"},'\n <Confirm \n title="111111" \n message="22222" \n okText="确认" \n cancelText="取消"\n onClick={(isConfirm)=>{\n console.log("isConfirm", isConfirm);\n }}\n ></Confirm>\n '),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null,"标题文案")),e.createElement("tr",null,e.createElement("td",null,"message"),e.createElement("td",null,"消息内容"),e.createElement("td",null,"string"),e.createElement("td",null,"消息内容")),e.createElement("tr",null,e.createElement("td",null,"okText"),e.createElement("td",null,"确认按钮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"cancelText"),e.createElement("td",null,"取消按钮文本"),e.createElement("td",null,"string"),e.createElement("td",null)),e.createElement("tr",null,e.createElement("td",null,"onClick"),e.createElement("td",null,"按钮点击回调"),e.createElement("td",null,"(isConfirm)=>"),e.createElement("td",null)))))}},{key:"Toast",title:"Toast",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Toast"),e.createElement("p",null,"弹窗组件,如果要悬浮在页面上,请配合 Overlay 使用"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block"},e.createElement(o,{title:"111111",message:"22222",type:"success"}),e.createElement("br",null),e.createElement(o,{title:"111111",message:"22222",type:"warning"}),e.createElement("br",null),e.createElement(o,{title:"111111",message:"22222",type:"error"}),e.createElement("br",null)),e.createElement("code",{className:"code"},'\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n <br />\n <Toast \n title="111111" \n message="22222"\n type="warning"\n ></Toast>\n\n <br />\n <Toast \n title="111111" \n message="22222"\n type="error"\n ></Toast>\n '),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"title"),e.createElement("td",null,"标题"),e.createElement("td",null,"string"),e.createElement("td",null,"标题文案")),e.createElement("tr",null,e.createElement("td",null,"message"),e.createElement("td",null,"消息内容"),e.createElement("td",null,"string"),e.createElement("td",null,"消息内容")),e.createElement("tr",null,e.createElement("td",null,"type"),e.createElement("td",null,"消息类型"),e.createElement("td",null,"string"),e.createElement("td",null,"success|warning|error")))))}},{key:"Overlay",title:"Overlay",doc:function(){return e.createElement("div",null,e.createElement("h1",null,"Overlay"),e.createElement("p",null,"统一处理模态遮罩样式"),e.createElement("h2",null,"示例"),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(u,{verticalPosition:"top"},e.createElement(o,{title:"111111",message:"22222",type:"success"}))),e.createElement("br",null),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(u,{verticalPosition:"center"},e.createElement(o,{title:"111111",message:"22222",type:"warning"}))),e.createElement("br",null),e.createElement("div",{className:"light-block light-block-overlay"},e.createElement(u,{verticalPosition:"bottom"},e.createElement(s,{title:"111111",message:"22222",type:"error"}))),e.createElement("code",{className:"code"},'\n <Overlay verticalPosition="top" >\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n </Overlay>\n\n <Overlay verticalPosition="center" >\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n </Overlay>\n\n <Overlay verticalPosition="bottom" >\n <Toast \n title="111111" \n message="22222"\n type="success"\n ></Toast>\n </Overlay>\n \n '),e.createElement("h2",null,"参数"),e.createElement("table",{className:"pure-table pure-table-bordered"},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,"属性"),e.createElement("th",null,"说明"),e.createElement("th",null,"类型"),e.createElement("th",null,"默认值"))),e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",null,"verticalPosition"),e.createElement("td",null,"垂直方向位置"),e.createElement("td",null,"string"),e.createElement("td",null,"top|center|bottom")))))}}]}];function E(){const[t,l]=e.useState("PdaListItem"),n=e.useCallback((function(e){l(e)})),a=(r=t,d[0].pages.filter((function(e){return e.key===r}))[0]);var r;return e.createElement("div",{className:"components-container"},e.createElement("div",{className:"components-example"},e.createElement("h1",null,"Components"),d.map((function(l,a){return e.createElement(e.Fragment,{key:a},e.createElement("h2",null,l.title),l.pages.map((function(l){return e.createElement("div",{className:t===l.key?"components-item active":"components-item",onClick:n.bind(null,l.key),"data-index":l.key,key:l.key},e.createElement("span",null,l.title))})))}))),e.createElement("div",{className:"show-case"},a?e.createElement(a.doc,{}):null))}l.render(e.createElement(E,null),document.getElementById("root"));