@cniot/android-pda-components 0.0.11 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/index.77d75e9e.js +1 -0
- package/build/assets/index.c65987ea.css +1 -0
- package/build/index.html +2 -2
- package/doc/index.jsx +15 -1
- package/es/index.cjs.js +2 -2
- package/es/index.es.js +2 -2
- package/es/style.css +1 -1
- package/package.json +3 -2
- package/build/assets/index.4667c66a.css +0 -1
- package/build/assets/index.c2fedc7b.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=(t,l,n)=>(((t,l,n)=>{l in t?e(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n})(t,"symbol"!=typeof l?l+"":l,n),n);import{R as l,c as n,a}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)}}();const r=()=>{};class c extends l.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,goBackHandle:a=r,icon:c="scan",title:m="任务",more:o=!1}=this.props;return l.createElement("div",{className:n({[e]:!0,"pda-header":!0})},t&&l.createElement("div",{className:"pda-goback",onClick:a}),c&&l.createElement("div",{className:n({"pda-header-icon":!0,["pda-header-icon-"+c]:!0})}),l.createElement("p",{className:n({"pda-title-text":!0})},m),o&&l.createElement("div",{className:"pda-header-more"}))}}class m extends l.Component{render(){const{type:e="default",width:t,style:a={},onClick:r}=this.props;t&&(a.width=t);let c="pda-button-"+e;return l.createElement("button",{className:n({className:!0,"pda-button":!0,[c]:!0}),style:a,onClick:r},this.props.children)}}class o extends l.Component{render(){return l.createElement("div",{className:n({"button-group":!0})},this.props.children)}}m.Group=o;class s extends l.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:a,highlightInfoCN:r,highlightSubInfo:c,highlightSubInfoCN:m,boldInfo:o,infoList:s=[],style:i={},theme:u="light"}=this.props;return l.createElement("div",{className:n({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===u}),style:i},l.createElement("p",{className:"pda-info-card-title"},t),l.createElement("p",{className:"pda-info-card-highlight"},l.createElement("span",{className:"pda-info-card-highlight1"},a),l.createElement("span",{className:"pda-info-card-highlight1CN"},r),l.createElement("span",{className:"pda-info-card-highlight2"},c),l.createElement("span",{className:"pda-info-card-highlight2CN"},m)),l.createElement("p",{className:"pda-info-card-bold"},o),s.map(((e,t)=>l.createElement("p",{key:t,className:"pda-info-card-list"},l.createElement("span",null,e.label||"")," ",l.createElement("span",null,e.content||"")))))}}class i extends l.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:a,highlightSubText:r,stateTextList:c=[],stateList:m=[],subInfoList:o=[],style:s={},icon:i}=this.props;return l.createElement("div",{className:n({[e]:!0,"pda-list-item":!0}),style:s},l.createElement("p",{className:"pda-listitem-header"},t),l.createElement("p",{className:"pda-listitem-highlight"},l.createElement("span",null,a),l.createElement("span",null,r)),l.createElement("p",{className:"pda-listitem-state-text"},c.map(((e,t)=>l.createElement("span",{key:t},e.label||"","|")))),l.createElement("div",{className:"pda-listitem-state-block"},m.map(((e,t)=>{const n=(null==e?void 0:e.type)?e.type:"default";return l.createElement("div",{key:t,className:n},e.label||"")}))),o.map(((e,t)=>l.createElement("p",{key:t,className:"pda-listitem-subinfo"},l.createElement("span",null,e.label||"")," ",l.createElement("span",null,e.content||"")))),i?l.createElement("div",{className:"pda-listitem-icon"},l.createElement("div",{className:n({"listitem-icon-container":!0,["listitem-icon-"+i]:!0})})):null)}}function u(){}function d(e){const{title:t="title",message:n="message",okText:a="okText",cancelText:r="cancelText",onClick:c=u}=e;return l.createElement("div",{className:"confirm-wrap"},l.createElement("div",{className:"confirm-title"},t),l.createElement("div",{className:"confirm-message"},n),l.createElement("div",{className:"confirm-btns"},r?l.createElement(m,{onClick:()=>c(!1)},r):null,l.createElement(m,{type:"primary",onClick:()=>c(!0)},a)))}function E(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function h(e){const{title:t="title",message:n="message",type:a="success"}=e;return l.createElement("div",{className:E(a)},l.createElement("div",{className:"toast-title"},t),l.createElement("div",{className:"toast-message"},n))}function p(e){const{verticalPosition:t="center"}=e;return l.createElement("div",{className:(n=t,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[n]||"op-overlay")},e.children);var n}function b(e){const{image:t=b.IMAGE_1,text:n="",subText:a="",transparent:r}=e;return l.createElement("div",{className:r?"presentation-card transparent":"presentation-card"},l.createElement("img",{src:t}),n?l.createElement("div",{className:"text"},n):null,a?l.createElement("div",{className:"sub-text"},a):null)}b.IMAGE_1="https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png",b.IMAGE_2="https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png",b.IMAGE_3="https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";function g(){}function y(e){const{tabIndex:t=1,onItemClick:n=g}=e;return l.createElement("div",{className:"android-pda-list"},l.Children.map(e.children,((e,a)=>{const r=e.props.onClick;return l.cloneElement(e,Object.assign({tabIndex:t+a},e.props,{onClick:e=>{r&&r(e),n(e)}}),e.props.children)})))}y.Item=function(e){const{onClick:t,title:n,subTitle:a,extra:r,tags:c=[],tabIndex:m}=e;return l.createElement("div",{className:"default-item",onClick:()=>{t(e)},tabIndex:m},l.createElement("div",{className:"text"},l.createElement("div",null,n),l.createElement("div",{className:"sub-text"},a),l.createElement("div",{className:"sub-tags"},c.map((e=>l.createElement("div",{className:"sub-tag-item"},e))))),l.createElement("div",{className:"extra"},r))};const f=()=>{};class k extends l.Component{constructor(){super(...arguments),t(this,"state",{inputVisible:!1}),t(this,"_useInput",null)}render(){const{inputVisible:e}=this.state,{onWakeKeyboard:t=f,onClick:n=f}=this.props;return l.createElement("div",{className:"wakekeyborard"},e?l.createElement("div",{className:"wakekeyborard-overlay"},l.createElement("div",{className:"wakekeyborard-inputbox"},l.createElement("input",{ref:e=>{this._useInput=e},type:"tel"}),l.createElement(m,{type:"primary",onClick:t=>{n(this._useInput.value),this.setState({inputVisible:!e})}},"查询"))):null,e?null:l.createElement("div",{className:"wakekeyborard-icon",onClick:l=>{this.setState({inputVisible:!e}),requestAnimationFrame((()=>{this._useInput.focus(),t()}))}}))}}function v(e){const{title:t,context:n,attrs:a=[]}=e;return l.createElement("div",{className:"android-sub-card"},l.createElement("div",{className:"android-sub-card-title"},t),l.createElement("div",{className:"android-sub-card-context"},n),l.createElement("div",{className:"android-sub-card-attrs"},a.map((e=>l.createElement("div",null,e)))))}function N(e){const{service:t,data:n={}}=e,{title:a="title",message:r="message",okText:c="okText",cancelText:m=""}=n,o=l.useCallback((function(){t.onNext(!0)}),[t]);return l.createElement(p,{verticalPosition:"bottom"},l.createElement(d,{title:a,message:r,okText:c,cancelText:m,onClick:o}))}var x={onNext(e){console.log("onnext",e)}};function C(e){const{service:t,data:n={}}=e,{title:a="title",message:r="message",okText:c="okText",cancelText:m=""}=n,o=l.useCallback((function(e){t.onNext(e)}),[t]);return l.createElement(p,{verticalPosition:"bottom"},l.createElement(d,{title:a,message:r,okText:c,cancelText:m,onClick:o}))}function I(e){const{data:t={},service:n}=e,{title:a,level:r,message:c}=t;return l.useEffect((()=>{!1!==t.hasNext&&n.onNext("")}),[t,n]),l.createElement(p,{verticalPosition:"bottom"},l.createElement(h,{type:r,title:a,message:T(c)}))}function T(e){var t=String(e).split("by Error:");return t[1]||t[0]}class w extends l.Component{constructor(e){super(e)}render(){const{style:e={},header:t,footer:a}=this.props;return l.createElement("div",{className:n({"baselayout-wrapper":!0}),style:e},t&&l.createElement("div",{className:n({"baselayout-header":!0})},t),l.createElement("div",{className:n({"baselayout-container":!0})},this.props.children),a&&l.createElement("div",{className:n({"baselayout-footer":!0})},a))}}const L=[{title:"组件列表",pages:[{key:"First",title:"快速开始",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"快速开始"),l.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 l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"dark-block"},l.createElement(c,{title:"hello world",more:!0,goBackHandle:()=>{console.log("go back")}}),l.createElement(c,{icon:"read",title:"hello world",more:!0}),l.createElement(c,{icon:"select",title:"hello world",more:!0})),l.createElement("code",{className:"code"},"\n <Title\n title='hello world'\n icon='read'\n more={true}\n goBackHandle={() => {\n console.log('go back');\n }}\n />\n "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"goBack"),l.createElement("td",null,"返回按钮"),l.createElement("td",null,"boolean"),l.createElement("td",null,"true")),l.createElement("tr",null,l.createElement("td",null,"goBackHandle"),l.createElement("td",null,"返回按钮点击处理"),l.createElement("td",null,"function"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"icon"),l.createElement("td",null,"title 图标"),l.createElement("td",null,"string: scan | select | read"),l.createElement("td",null,"scan")),l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"more"),l.createElement("td",null,"更多"),l.createElement("td",null,"boolean"),l.createElement("td",null,"false")))))}},{key:"Button",title:"Button",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement(m,null,"按钮"),l.createElement(m,{width:"60%",type:"primary",onClick:e=>console.log(e)},"确认"),l.createElement(m,{width:"150px",type:"dark",style:{marginTop:"12px",marginBottom:"12px"}},"深色"),l.createElement(m.Group,null,l.createElement(m,{type:"cutout"},"镂空"),l.createElement(m,null,"按钮"))),l.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 // 按钮组:\n <Button.Group>\n <Button type=\"cutout\">镂空</Button>\n <Button>按钮</Button>\n </Button.Group>\n "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"type"),l.createElement("td",null,"类型"),l.createElement("td",null,"string: primary | dark | cutout"),l.createElement("td",null,"default")),l.createElement("tr",null,l.createElement("td",null,"width"),l.createElement("td",null,"按钮宽度"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"style"),l.createElement("td",null,"覆写样式"),l.createElement("td",null,"object"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"onClick"),l.createElement("td",null,"点击事件"),l.createElement("td",null,"function"),l.createElement("td",null)))))}},{key:"InfoCard",title:"InfoCard",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},l.createElement(s,{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"}]}),l.createElement(s,{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"}]})),l.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 "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightInfo"),l.createElement("td",null,"高亮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightInfoCN"),l.createElement("td",null,"高亮文本(中文)"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightSubInfo"),l.createElement("td",null,"高亮副文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightSubInfoCN"),l.createElement("td",null,"高亮副文本(中文)"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"boldInfo"),l.createElement("td",null,"加粗文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"theme"),l.createElement("td",null,"主题"),l.createElement("td",null,"string: light | dark"),l.createElement("td",null,"light")),l.createElement("tr",null,l.createElement("td",null,"infoList"),l.createElement("td",null,"更多信息"),l.createElement("td",null,"object[]"),l.createElement("td",null)))))}},{key:"ListItem",title:"ListItem",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},l.createElement(i,{header:"任务单",highlightText:"XXXX-XX-XXX",highlightSubText:"30%",icon:"next",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"}})),l.createElement("code",{className:"code"},"\n<ListItem\n header=\"任务单\"\n highlightText=\"XXXX-XX-XXX\"\n highlightSubText=\"30%\"\n icon=\"next\"\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 "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"header"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"icon"),l.createElement("td",null,"右上方icon"),l.createElement("td",null,"string: next"),l.createElement("td",null,"暂时只支持 next")),l.createElement("tr",null,l.createElement("td",null,"highlightText"),l.createElement("td",null,"高亮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightSubText"),l.createElement("td",null,"高亮副文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"stateTextList"),l.createElement("td",null,"状态列表"),l.createElement("td",null,"object[]"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"subInfoList"),l.createElement("td",null,"更多商品信息"),l.createElement("td",null,"object[]"),l.createElement("td",null)))))}},{key:"Confirm",title:"Confirm",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Confirm"),l.createElement("p",null,"确认组件, 如果要悬浮在页面上,请配合 Overlay 使用"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement(d,{title:"111111",message:"22222",okText:"确认",cancelText:"取消",onClick:e=>{console.log("isConfirm",e)}})),l.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 '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null,"标题文案")),l.createElement("tr",null,l.createElement("td",null,"message"),l.createElement("td",null,"消息内容"),l.createElement("td",null,"string"),l.createElement("td",null,"消息内容")),l.createElement("tr",null,l.createElement("td",null,"okText"),l.createElement("td",null,"确认按钮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"cancelText"),l.createElement("td",null,"取消按钮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"onClick"),l.createElement("td",null,"按钮点击回调"),l.createElement("td",null,"(isConfirm)=>"),l.createElement("td",null)))))}},{key:"Toast",title:"Toast",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Toast"),l.createElement("p",null,"弹窗组件,如果要悬浮在页面上,请配合 Overlay 使用"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement(h,{title:"111111",message:"22222",type:"success"}),l.createElement("br",null),l.createElement(h,{title:"111111",message:"22222",type:"warning"}),l.createElement("br",null),l.createElement(h,{title:"111111",message:"22222",type:"error"}),l.createElement("br",null)),l.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 '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null,"标题文案")),l.createElement("tr",null,l.createElement("td",null,"message"),l.createElement("td",null,"消息内容"),l.createElement("td",null,"string"),l.createElement("td",null,"消息内容")),l.createElement("tr",null,l.createElement("td",null,"type"),l.createElement("td",null,"消息类型"),l.createElement("td",null,"string"),l.createElement("td",null,"success|warning|error")))))}},{key:"Overlay",title:"Overlay",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Overlay"),l.createElement("p",null,"统一处理模态遮罩样式"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(p,{verticalPosition:"top"},l.createElement(h,{title:"111111",message:"22222",type:"success"}))),l.createElement("br",null),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(p,{verticalPosition:"center"},l.createElement(h,{title:"111111",message:"22222",type:"warning"}))),l.createElement("br",null),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(p,{verticalPosition:"bottom"},l.createElement(d,{title:"111111",message:"22222",type:"error"}))),l.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 '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"verticalPosition"),l.createElement("td",null,"垂直方向位置"),l.createElement("td",null,"string"),l.createElement("td",null,"top|center|bottom")))))}},{key:"Presentation",title:"Presentation",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Presentation"),l.createElement("p",null,"图示组件,通常包含一个图片+一行文字"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block pda"},l.createElement(b,{text:"请靠近报废纸箱",subText:"开始识别"})),l.createElement("br",null),l.createElement("div",{className:"light-block pda",style:{backgroundColor:"#000000"}},l.createElement(b,{image:b.IMAGE_2,text:"请靠近报废纸箱",subText:"开始识别",transparent:!0})),l.createElement("br",null),l.createElement("div",{className:"light-block pda",style:{backgroundColor:"#000000"}},l.createElement(b,{image:b.IMAGE_3,text:"请靠近箱码进行识别"})),l.createElement("br",null),l.createElement("code",{className:"code"},'\n<Presentation text="请靠近报废纸箱" subText="开始识别"></Presentation>\n<Presentation image={Presentation.IMAGE_2} text="请靠近箱码进行识别" transparent={true} ></Presentation>\n<Presentation image={Presentation.IMAGE_3} text="请靠近箱码进行识别" ></Presentation>\n '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"image"),l.createElement("td",null,"图片地址"),l.createElement("td",null,"string"),l.createElement("td",null,"可以使用 Presentation.IMAGE_1, Presentation.IMAGE_2 2张内置图片")),l.createElement("tr",null,l.createElement("td",null,"text"),l.createElement("td",null,"文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"transparent"),l.createElement("td",null,"是否透明,不显示被色背景"),l.createElement("td",null,"boolean"),l.createElement("td",null,"默认false")))))}},{key:"List",title:"List",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"List"),l.createElement("p",null,"列表组件,通常要配合不同的 List Item 来使用"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement(y,{onItemClick:console.log,tabIndex:0},l.createElement(y.Item,{title:"hello world"},"hello world"),l.createElement(y.Item,{title:"hello world",subTitle:"sub title"},"hello world"),l.createElement(y.Item,{title:"hello world",subTitle:"sub title",extra:"11111"},"hello world"),l.createElement(y.Item,{title:"hello world",subTitle:"sub title",extra:"11111",tags:[1,2,34]},"hello world"),l.createElement(y.Item,{title:"hello world",subTitle:"sub title",tags:[1,2,34]},"hello world"))),l.createElement("code",{className:"code"},'\n <List onItemClick={console.log} >\n <List.Item title="hello world" >hello world</List.Item>\n <List.Item title="hello world" subTitle="sub title" >hello world</List.Item>\n <List.Item title="hello world" subTitle="sub title" extra={"11111"} >hello world</List.Item>\n <List.Item title="hello world" subTitle="sub title" extra={"11111"} tags={[1,2,34]} >hello world</List.Item>\n <List.Item title="hello world" subTitle="sub title" tags={[1,2,34]} >hello world</List.Item>\n </List>\n '),l.createElement("h2",null,"List"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"onItemClick"),l.createElement("td",null,"item 点击回调"),l.createElement("td",null,"Function"),l.createElement("td",null,"默认回调参数 item 的所有 props")))),l.createElement("h2",null,"List.Item"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"String"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"extra"),l.createElement("td",null,"右边的内容"),l.createElement("td",null,"String"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"subTitle"),l.createElement("td",null,"副标题"),l.createElement("td",null,"String"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"tags"),l.createElement("td",null,"标签"),l.createElement("td",null,"Array"),l.createElement("td",null,"[]")))))}},{key:"WakeKeyborard",title:"WakeKeyborard",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement("p",null,"点击右下角键盘"),l.createElement(k,{onWakeKeyboard:()=>{console.log("wake keyboard")},onClick:e=>{console.log("v is ",e)}})),l.createElement("code",{className:"code"},"\n<WakeKeyborard\nonWakeKeyboard={ () => {console.log('wake keyboard')}}\nonClick={v => {console.log('v is ', v);}}\n/>\n "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"onWakeKeyboard"),l.createElement("td",null,"唤起键盘回调"),l.createElement("td",null,"function"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"onClick"),l.createElement("td",null,"点击查询回调"),l.createElement("td",null,"function: (value) => "),l.createElement("td",null,"(value) => ")))))}},{key:"SubCard",title:"SubCard",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"SubCard"),l.createElement("p",null,"附卡片"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"dark-block"},l.createElement(v,{title:"品号",context:"5082 7834",attrs:["批次:23842839","数量:234"]})),l.createElement("code",{className:"code"},'\n <SubCard title="品号" context="5082 7834" attrs={["批次:23842839", "数量:234"]} ></SubCard>\n '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"String"),l.createElement("td",null,"true")),l.createElement("tr",null,l.createElement("td",null,"context"),l.createElement("td",null,"内容"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"attrs"),l.createElement("td",null,"Array"),l.createElement("td",null),l.createElement("td",null)))))}}]},{title:"内置界面预览",pages:[{key:"/system/alert",title:"/system/alert",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"/system/alert"),l.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),l.createElement("h2",null,"示例"),l.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.alert({\n title: '111',\n message: '2222',\n okText: \"确认\"\n })\n "),l.createElement("h2",null,"页面效果"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(N,{service:x,data:{title:"111",message:"2222",okText:"确认"}})))}},{key:"/system/confirm",title:"/system/confirm",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"/system/alert"),l.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),l.createElement("h2",null,"示例"),l.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.confirm({\n title: '111',\n message: '2222',\n okText: \"确认\",\n cancelText:\"取消\"\n })\n "),l.createElement("h2",null,"页面效果"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(C,{service:x,data:{title:"111",message:"2222",okText:"确认",cancelText:"取消"}})))}},{key:"/system/toast",title:"/system/toast",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"/system/toast"),l.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),l.createElement("h2",null,"示例"),l.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.toast({\n level: \"success\", // success|warning|error\n title: '111',\n message: '2222'\n })\n "),l.createElement("h2",null,"页面效果"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(I,{service:x,data:{level:"success",title:"111",message:"2222"}})))}}]},{title:"布局容器",pages:[{key:"BaseLayout",title:"BaseLayout",doc:function(){const e=l.createElement(c,null),t=l.createElement(m.Group,null,l.createElement(m,{type:"cutout",onClick:e=>console.log("cancle")},"取消"),l.createElement(m,{type:"primary"},"确认"));return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block",style:{display:"flex"}},l.createElement("div",{style:{width:480,height:800,position:"relative"}},l.createElement(w,{style:{backgroundColor:"black",marginRight:20},header:e,footer:t},l.createElement(b,{text:"请靠近箱码进行识别"}))),l.createElement("div",{style:{width:480,height:800,position:"relative"}},l.createElement(w,{style:{backgroundColor:"black"},header:e,footer:t},[{},{},{}].map(((e,t)=>l.createElement(s,{key:t,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"}]})))))),l.createElement("code",{className:"code"},'\n const header = <Title></Title>;\n const footer = (\n <Button.Group>\n <Button type="cutout" onClick={e => console.log(\'cancle\')}>取消</Button>\n <Button type="primary">确认</Button>\n </Button.Group>\n )\n\n <BaseLayout\n header={header}\n footer={footer}\n >\n <Presentation text="请靠近箱码进行识别" ></Presentation>\n </BaseLayout>\n '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"header"),l.createElement("td",null,"吸顶组件"),l.createElement("td",null),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"footer"),l.createElement("td",null,"吸底组件"),l.createElement("td",null),l.createElement("td",null)))))}}]}];function S(){const[e,t]=l.useState("First"),n=l.useCallback((function(e){t(e)})),a=(r=e,L.map((e=>e.pages.filter((function(e){return e.key===r}))[0])).filter((e=>e))[0]);var r;return l.createElement("div",{className:"components-container"},l.createElement("div",{className:"components-example"},l.createElement("h1",{title:"@cniot/android-pda-components"},"Components"),L.map((function(t,a){return l.createElement(l.Fragment,{key:a},l.createElement("h2",null,t.title),t.pages.map((function(t){return l.createElement("div",{className:e===t.key?"components-item active":"components-item",onClick:n.bind(null,t.key),"data-index":t.key,key:t.key},l.createElement("span",null,t.title))})))}))),l.createElement("div",{className:"show-case"},a?l.createElement(a.doc,{}):null))}a.render(l.createElement(S,null),document.getElementById("root"));
|
|
@@ -0,0 +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-size:100%}.pda-header .pda-header-icon-scan{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png)}.pda-header .pda-header-icon-select{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN0170QXc91udWriUp19S_!!6000000006060-2-tps-74-72.png)}.pda-header .pda-header-icon-read{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN01EMphgH1ylYGXImCZn_!!6000000006619-2-tps-70-70.png)}.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}.button-group{display:flex;flex-direction:row;padding:20px 24px}.button-group .pda-button:not(:last-child){margin-right:16px}.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;display:flex;justify-content:center;align-items:center}.pda-list-item .listitem-icon-container{background-size:100%;background-repeat:no-repeat;width:16px;height:24px}.pda-list-item .listitem-icon-next{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01FkZisA1tCg1sj3b6U_!!6000000005866-2-tps-40-58.png)}.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}.presentation-card .sub-text{margin-top:6px;font-weight:700;font-size:12px}.android-pda-list .default-item{background-color:#282828;font-size:23.76px;padding:10px;border-radius:6px;color:#fff;margin:5px 0;display:flex;justify-content:space-between;align-items:center}.android-pda-list .default-item:hover,.android-pda-list .default-item:active,.android-pda-list .default-item:focus{background-color:#686868}.android-pda-list .default-item .text{flex:1}.android-pda-list .default-item .sub-text{font-size:80%;opacity:.7}.android-pda-list .default-item .sub-tags{display:flex}.android-pda-list .default-item .sub-tags .sub-tag-item{background-color:#0f0;padding:2px;font-size:60%;margin-right:3px;border-radius:2px;color:#000;line-height:1em}.android-pda-list .default-item .sub-tags .sub-tag-item:first-child{margin-left:0}.android-pda-list .default-item .extra{font-size:80%;opacity:.7}.wakekeyborard .wakekeyborard-icon{width:80px;height:80px;background-image:url(https://img.alicdn.com/imgextra/i3/O1CN01kxYh3U25Xzr9nAcYp_!!6000000007537-2-tps-240-240.png);background-size:100%;position:fixed;right:24px;bottom:24px}.wakekeyborard .wakekeyborard-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background-color:#dedede33}.wakekeyborard .wakekeyborard-inputbox{display:flex;flex-direction:row;height:85px;position:absolute;bottom:0;left:0;right:0}.wakekeyborard .wakekeyborard-inputbox input{flex:2}.wakekeyborard .wakekeyborard-inputbox button{flex:1}.android-sub-card{background:#282828;border-radius:16px;padding:10px;color:#fff}.android-sub-card .android-sub-card-title{opacity:.6;font-size:21.312px}.android-sub-card .android-sub-card-context{font-size:39.6px}.android-sub-card .android-sub-card-attrs{opacity:.6;font-size:21.12px}.baselayout-wrapper{height:100%;min-height:100%;display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}.baselayout-wrapper .baselayout-container{padding:0 24px;overflow-x:auto;flex:1}.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%}
|
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.
|
|
12
|
+
<script type="module" crossorigin src="./assets/index.77d75e9e.js"></script>
|
|
13
13
|
<link rel="modulepreload" href="./assets/vendor.dd3aae6b.js">
|
|
14
|
-
<link rel="stylesheet" href="./assets/index.
|
|
14
|
+
<link rel="stylesheet" href="./assets/index.c65987ea.css">
|
|
15
15
|
</head>
|
|
16
16
|
|
|
17
17
|
<body>
|
package/doc/index.jsx
CHANGED
|
@@ -10,7 +10,9 @@ import Confirm from "../packages/Confirm/doc.jsx";
|
|
|
10
10
|
import Toast from "../packages/Toast/doc.jsx";
|
|
11
11
|
import Overlay from "../packages/Overlay/doc.jsx";
|
|
12
12
|
import Presentation from "../packages/Presentation/doc.jsx";
|
|
13
|
+
import List from "../packages/List/doc.jsx";
|
|
13
14
|
import WakeKeyborard from "../packages/WakeKeyborard/doc.jsx";
|
|
15
|
+
import SubCard from "../packages/SubCard/doc.jsx";
|
|
14
16
|
|
|
15
17
|
import systemAlert from '../packages/pageflow-system-pages/alert/doc';
|
|
16
18
|
import systemConfirm from '../packages/pageflow-system-pages/confirm/doc';
|
|
@@ -72,12 +74,24 @@ const docs = [
|
|
|
72
74
|
title:"Presentation",
|
|
73
75
|
doc: Presentation
|
|
74
76
|
},
|
|
77
|
+
|
|
78
|
+
{
|
|
79
|
+
key:"List",
|
|
80
|
+
title:"List",
|
|
81
|
+
doc: List
|
|
82
|
+
},
|
|
83
|
+
|
|
75
84
|
{
|
|
76
85
|
key:"WakeKeyborard",
|
|
77
86
|
title:"WakeKeyborard",
|
|
78
87
|
doc: WakeKeyborard
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
key:"SubCard",
|
|
91
|
+
title:"SubCard",
|
|
92
|
+
doc: SubCard
|
|
79
93
|
}
|
|
80
|
-
|
|
94
|
+
|
|
81
95
|
],
|
|
82
96
|
},
|
|
83
97
|
{
|
package/es/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var e=Object.defineProperty,t=(t,a,
|
|
1
|
+
"use strict";var e=Object.defineProperty,t=(t,a,n)=>(((t,a,n)=>{a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[a]=n})(t,"symbol"!=typeof a?a+"":a,n),n);function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports[Symbol.toStringTag]="Module";var n,l=a(require("react")),r={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
|
-
l=s,function(){var e={}.hasOwnProperty;function t(){for(var a=[],l=0;l<arguments.length;l++){var n=arguments[l];if(n){var s=typeof n;if("string"===s||"number"===s)a.push(n);else if(Array.isArray(n)){if(n.length){var r=t.apply(null,n);r&&a.push(r)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var c in n)e.call(n,c)&&n[c]&&a.push(c);else a.push(n.toString())}}return a.join(" ")}l.exports?(t.default=t,l.exports=t):window.classNames=t}();var r=s.exports;const c=()=>{};class i extends n.default.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,goBackHandle:a=c,icon:l="scan",title:s="任务",more:i=!1}=this.props;return n.default.createElement("div",{className:r({[e]:!0,"pda-header":!0})},t&&n.default.createElement("div",{className:"pda-goback",onClick:a}),l&&n.default.createElement("div",{className:r({"pda-header-icon":!0,["pda-header-icon-"+l]:!0})}),n.default.createElement("p",{className:r({"pda-title-text":!0})},s),i&&n.default.createElement("div",{className:"pda-header-more"}))}}class o extends n.default.Component{render(){const{type:e="default",width:t,style:a={},onClick:l}=this.props;t&&(a.width=t);let s="pda-button-"+e;return n.default.createElement("button",{className:r({className:!0,"pda-button":!0,[s]:!0}),style:a,onClick:l},this.props.children)}}class u extends n.default.Component{render(){return n.default.createElement("div",{className:r({"button-group":!0})},this.props.children)}}o.Group=u;class d extends n.default.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:a,highlightInfoCN:l,highlightSubInfo:s,highlightSubInfoCN:c,boldInfo:i,infoList:o=[],style:u={},theme:d="light"}=this.props;return n.default.createElement("div",{className:r({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===d}),style:u},n.default.createElement("p",{className:"pda-info-card-title"},t),n.default.createElement("p",{className:"pda-info-card-highlight"},n.default.createElement("span",{className:"pda-info-card-highlight1"},a),n.default.createElement("span",{className:"pda-info-card-highlight1CN"},l),n.default.createElement("span",{className:"pda-info-card-highlight2"},s),n.default.createElement("span",{className:"pda-info-card-highlight2CN"},c)),n.default.createElement("p",{className:"pda-info-card-bold"},i),o.map(((e,t)=>n.default.createElement("p",{key:t,className:"pda-info-card-list"},n.default.createElement("span",null,e.label||"")," ",n.default.createElement("span",null,e.content||"")))))}}class m extends n.default.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:a,highlightSubText:l,stateTextList:s=[],stateList:c=[],subInfoList:i=[],style:o={},icon:u}=this.props;return n.default.createElement("div",{className:r({[e]:!0,"pda-list-item":!0}),style:o},n.default.createElement("p",{className:"pda-listitem-header"},t),n.default.createElement("p",{className:"pda-listitem-highlight"},n.default.createElement("span",null,a),n.default.createElement("span",null,l)),n.default.createElement("p",{className:"pda-listitem-state-text"},s.map(((e,t)=>n.default.createElement("span",{key:t},e.label||"","|")))),n.default.createElement("div",{className:"pda-listitem-state-block"},c.map(((e,t)=>{const a=(null==e?void 0:e.type)?e.type:"default";return n.default.createElement("div",{key:t,className:a},e.label||"")}))),i.map(((e,t)=>n.default.createElement("p",{key:t,className:"pda-listitem-subinfo"},n.default.createElement("span",null,e.label||"")," ",n.default.createElement("span",null,e.content||"")))),u?n.default.createElement("div",{className:"pda-listitem-icon"},n.default.createElement("div",{className:r({"listitem-icon-container":!0,["listitem-icon-"+u]:!0})})):null)}}function f(){}function p(e){const{title:t="title",message:a="message",okText:l="okText",cancelText:s="cancelText",onClick:r=f}=e;return n.default.createElement("div",{className:"confirm-wrap"},n.default.createElement("div",{className:"confirm-title"},t),n.default.createElement("div",{className:"confirm-message"},a),n.default.createElement("div",{className:"confirm-btns"},s?n.default.createElement(o,{onClick:()=>r(!1)},s):null,n.default.createElement(o,{type:"primary",onClick:()=>r(!0)},l)))}function h(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function g(e){const{title:t="title",message:a="message",type:l="success"}=e;return n.default.createElement("div",{className:h(l)},n.default.createElement("div",{className:"toast-title"},t),n.default.createElement("div",{className:"toast-message"},a))}function E(e){const{verticalPosition:t="center"}=e;return n.default.createElement("div",{className:(a=t,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[a]||"op-overlay")},e.children);var a}var v={Alert:function(e){const{service:t,data:a={}}=e,{title:l="title",message:s="message",okText:r="okText",cancelText:c=""}=a,i=n.default.useCallback((function(){t.onNext(!0)}),[t]);return n.default.createElement(E,{verticalPosition:"bottom"},n.default.createElement(p,{title:l,message:s,okText:r,cancelText:c,onClick:i}))},Start:function(e){const{action:t,appManager:a,service:l}=e,s=n.default.useCallback((function(){l.onStart(a.config.appId)}));return n.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh"}},n.default.createElement(o,{type:"primary",onClick:s},"开始作业"),n.default.createElement("br",null),n.default.createElement("div",null,a.config.appId),n.default.createElement("div",null,a.config.groupId))},Toast:function(e){const{data:t={},service:a}=e,{title:l,level:s,message:r}=t;return n.default.useEffect((()=>{!1!==t.hasNext&&a.onNext("")}),[t,a]),n.default.createElement(E,{verticalPosition:"bottom"},n.default.createElement(g,{type:s,title:l,message:r}))},Confirm:function(e){const{service:t,data:a={}}=e,{title:l="title",message:s="message",okText:r="okText",cancelText:c=""}=a,i=n.default.useCallback((function(e){t.onNext(e)}),[t]);return n.default.createElement(E,{verticalPosition:"bottom"},n.default.createElement(p,{title:l,message:s,okText:r,cancelText:c,onClick:i}))},NotFound:function(e){return n.default.createElement("div",{style:{padding:"20%"}},n.default.createElement("h1",null,"404 ",n.default.createElement("small",{style:{fontSize:"60%"}},"Not found")),n.default.createElement("div",null,e.action.getPage()))},Debug:function(e){const{appManager:t}=e,a=Array.from(t.pageManager.keys()).reverse();return n.default.useEffect((function(){}),[]),n.default.createElement("div",{className:"local-debug-side"},n.default.createElement("ul",null,a.map((e=>n.default.createElement("li",{key:e},n.default.createElement("a",{href:`#${e}`},e))))))},Prompt:function(e){return n.default.createElement("div",null,"页面不存在")},Loading:function(e){const[t,a]=n.default.useState(!1),l=e.edgeService;return n.default.useEffect((function(){let e=!1;const t=function(t){e=t,t?setTimeout((function(){e===t&&a(!0)}),350):setTimeout((function(){e===t&&a(!1)}),100)};return l.on("IO_STATUS",t),function(){l.off("IO_STATUS",t)}}),[l]),t?n.default.createElement("div",{style:{position:"absolute",left:0,top:0,zIndex:100}},"LOADING..."):null}};function y(e){const{image:t=y.IMAGE_1,text:a="",subText:l="",transparent:s}=e;return n.default.createElement("div",{className:s?"presentation-card transparent":"presentation-card"},n.default.createElement("img",{src:t}),a?n.default.createElement("div",{className:"text"},a):null,l?n.default.createElement("div",{className:"sub-text"},l):null)}y.IMAGE_1="https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png",y.IMAGE_2="https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png",y.IMAGE_3="https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";class N extends n.default.Component{constructor(e){super(e)}render(){const{style:e={},header:t,footer:a}=this.props;return n.default.createElement("div",{className:r({"baselayout-wrapper":!0}),style:e},t&&n.default.createElement("div",{className:r({"baselayout-header":!0})},t),n.default.createElement("div",{className:r({"baselayout-container":!0})},this.props.children),a&&n.default.createElement("div",{className:r({"baselayout-footer":!0})},a))}}const b=()=>{};class x extends n.default.Component{constructor(){super(...arguments),t(this,"state",{inputVisible:!1}),t(this,"_useInput",null)}render(){const{inputVisible:e}=this.state,{onWakeKeyboard:t=b,onClick:a=b}=this.props;return n.default.createElement("div",{className:"wakekeyborard"},e?n.default.createElement("div",{className:"wakekeyborard-overlay"},n.default.createElement("div",{className:"wakekeyborard-inputbox"},n.default.createElement("input",{ref:e=>{this._useInput=e},type:"tel"}),n.default.createElement(o,{type:"primary",onClick:t=>{a(this._useInput.value),this.setState({inputVisible:!e})}},"查询"))):null,e?null:n.default.createElement("div",{className:"wakekeyborard-icon",onClick:a=>{this.setState({inputVisible:!e}),requestAnimationFrame((()=>{this._useInput.focus(),t()}))}}))}}exports.BaseLayout=N,exports.Button=o,exports.Confirm=p,exports.InfoCard=d,exports.ListItem=m,exports.Overlay=E,exports.PageFlowSystemPages=v,exports.Presentation=y,exports.Title=i,exports.Toast=g,exports.WakeKeyborard=x;
|
|
7
|
+
n=r,function(){var e={}.hasOwnProperty;function t(){for(var a=[],n=0;n<arguments.length;n++){var l=arguments[n];if(l){var r=typeof l;if("string"===r||"number"===r)a.push(l);else if(Array.isArray(l)){if(l.length){var s=t.apply(null,l);s&&a.push(s)}}else if("object"===r)if(l.toString===Object.prototype.toString)for(var i in l)e.call(l,i)&&l[i]&&a.push(i);else a.push(l.toString())}}return a.join(" ")}n.exports?(t.default=t,n.exports=t):window.classNames=t}();var s=r.exports;const i=()=>{};class c extends l.default.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,goBackHandle:a=i,icon:n="scan",title:r="任务",more:c=!1}=this.props;return l.default.createElement("div",{className:s({[e]:!0,"pda-header":!0})},t&&l.default.createElement("div",{className:"pda-goback",onClick:a}),n&&l.default.createElement("div",{className:s({"pda-header-icon":!0,["pda-header-icon-"+n]:!0})}),l.default.createElement("p",{className:s({"pda-title-text":!0})},r),c&&l.default.createElement("div",{className:"pda-header-more"}))}}class o extends l.default.Component{render(){const{type:e="default",width:t,style:a={},onClick:n}=this.props;t&&(a.width=t);let r="pda-button-"+e;return l.default.createElement("button",{className:s({className:!0,"pda-button":!0,[r]:!0}),style:a,onClick:n},this.props.children)}}class u extends l.default.Component{render(){return l.default.createElement("div",{className:s({"button-group":!0})},this.props.children)}}o.Group=u;class d extends l.default.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:a,highlightInfoCN:n,highlightSubInfo:r,isProgress:i,percentage:c,highlightSubInfoCN:o,boldInfo:u,infoList:d=[],style:f={},theme:m="light"}=this.props;return l.default.createElement("div",{className:s({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===m}),style:f},l.default.createElement("p",{className:"pda-info-card-title"},t),l.default.createElement("p",{className:"pda-info-card-highlight"},l.default.createElement("span",{className:"pda-info-card-highlight1"},a),l.default.createElement("span",{className:"pda-info-card-highlight1CN"},n),l.default.createElement("span",{className:"pda-info-card-highlight2"},r),l.default.createElement("span",{className:"pda-info-card-highlight2CN"},o)),i?l.default.createElement("div",{className:"pda-info-card-progress"},l.default.createElement("div",{className:"pda-info-card-progress-inside",style:{width:100*c+"%"}})):null,l.default.createElement("p",{className:"pda-info-card-bold"},u),d.map(((e,t)=>l.default.createElement("p",{key:t,className:"pda-info-card-list"},l.default.createElement("span",null,e.label||"")," ",l.default.createElement("span",null,e.content||"")))))}}class f extends l.default.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:a,highlightSubText:n,stateTextList:r=[],stateList:i=[],subInfoList:c=[],style:o={},icon:u}=this.props;return l.default.createElement("div",{className:s({[e]:!0,"pda-list-item":!0}),style:o},l.default.createElement("p",{className:"pda-listitem-header"},t),l.default.createElement("p",{className:"pda-listitem-highlight"},l.default.createElement("span",null,a),l.default.createElement("span",null,n)),l.default.createElement("p",{className:"pda-listitem-state-text"},r.map(((e,t)=>l.default.createElement("span",{key:t},e.label||"","|")))),l.default.createElement("div",{className:"pda-listitem-state-block"},i.map(((e,t)=>{const a=(null==e?void 0:e.type)?e.type:"default";return l.default.createElement("div",{key:t,className:a},e.label||"")}))),c.map(((e,t)=>l.default.createElement("p",{key:t,className:"pda-listitem-subinfo"},l.default.createElement("span",null,e.label||"")," ",l.default.createElement("span",null,e.content||"")))),u?l.default.createElement("div",{className:"pda-listitem-icon"},l.default.createElement("div",{className:s({"listitem-icon-container":!0,["listitem-icon-"+u]:!0})})):null)}}function m(){}function p(e){const{title:t="title",message:a="message",okText:n="okText",cancelText:r="cancelText",onClick:s=m}=e;return l.default.createElement("div",{className:"confirm-wrap"},l.default.createElement("div",{className:"confirm-title"},t),l.default.createElement("div",{className:"confirm-message"},a),l.default.createElement("div",{className:"confirm-btns"},r?l.default.createElement(o,{onClick:()=>s(!1)},r):null,l.default.createElement(o,{type:"primary",onClick:()=>s(!0)},n)))}function h(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function v(e){const{title:t="title",message:a="message",type:n="success"}=e;return l.default.createElement("div",{className:h(n)},l.default.createElement("div",{className:"toast-title"},t),l.default.createElement("div",{className:"toast-message"},a))}function g(e){const{verticalPosition:t="center"}=e;return l.default.createElement("div",{className:(a=t,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[a]||"op-overlay")},e.children);var a}function E(e){var t=String(e).split("by Error:");return t[1]||t[0]}function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}var b,x=b||(b={});x.Pop="POP",x.Push="PUSH",x.Replace="REPLACE";function N(e){e.preventDefault(),e.returnValue=""}function k(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function C(e){var t=e.pathname,a=e.search;return(void 0===t?"/":t)+(void 0===a?"":a)+(void 0===(e=e.hash)?"":e)}function I(e){var t={};if(e){var a=e.indexOf("#");0<=a&&(t.hash=e.substr(a),e=e.substr(0,a)),0<=(a=e.indexOf("?"))&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}var T={Alert:function(e){const{service:t,data:a={}}=e,{title:n="title",message:r="message",okText:s="okText",cancelText:i=""}=a,c=l.default.useCallback((function(){t.onNext(!0)}),[t]);return l.default.createElement(g,{verticalPosition:"bottom"},l.default.createElement(p,{title:n,message:r,okText:s,cancelText:i,onClick:c}))},Start:function(e){const{action:t,appManager:a,service:n}=e,r=l.default.useCallback((function(){n.onStart(a.config.appId)}));return l.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh"}},l.default.createElement(o,{type:"primary",onClick:r},"开始作业"),l.default.createElement("br",null),l.default.createElement("div",null,a.config.appId),l.default.createElement("div",null,a.config.groupId))},Toast:function(e){const{data:t={},service:a}=e,{title:n,level:r,message:s}=t;return l.default.useEffect((()=>{!1!==t.hasNext&&a.onNext("")}),[t,a]),l.default.createElement(g,{verticalPosition:"bottom"},l.default.createElement(v,{type:r,title:n,message:E(s)}))},Confirm:function(e){const{service:t,data:a={}}=e,{title:n="title",message:r="message",okText:s="okText",cancelText:i=""}=a,c=l.default.useCallback((function(e){t.onNext(e)}),[t]);return l.default.createElement(g,{verticalPosition:"bottom"},l.default.createElement(p,{title:n,message:r,okText:s,cancelText:i,onClick:c}))},NotFound:function(e){return l.default.createElement("div",{style:{padding:"20%"}},l.default.createElement("h1",null,"404 ",l.default.createElement("small",{style:{fontSize:"60%"}},"Not found")),l.default.createElement("div",null,e.action.getPage()))},Debug:function(e){const{appManager:t}=e,a=Array.from(t.pageManager.keys()).reverse();return l.default.useEffect((function(){return function(e){function t(){var e=I(i.location.hash.substr(1)),t=e.pathname,a=e.search;e=e.hash;var n=c.state||{};return[n.idx,{pathname:void 0===t?"/":t,search:void 0===a?"":a,hash:void 0===e?"":e,state:n.usr||null,key:n.key||"default"}]}function a(){if(o)p.call(o),o=null;else{var e=b.Pop,a=t(),n=a[0];if(a=a[1],p.length){if(null!=n){var l=d-n;l&&(o={action:e,location:a,retry:function(){s(-1*l)}},s(l))}}else r(e)}}function n(e){var t=document.querySelector("base"),a="";return t&&t.getAttribute("href")&&(a=-1===(a=(t=i.location.href).indexOf("#"))?t:t.slice(0,a)),a+"#"+("string"==typeof e?e:C(e))}function l(e,t){return void 0===t&&(t=null),y({},f,"string"==typeof e?I(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function r(e){u=e,e=t(),d=e[0],f=e[1],m.call({action:u,location:f})}function s(e){c.go(e)}void 0===e&&(e={});var i=void 0===(e=e.window)?document.defaultView:e,c=i.history,o=null;i.addEventListener("popstate",a),i.addEventListener("hashchange",(function(){C(t()[1])!==C(f)&&a()}));var u=b.Pop,d=(e=t())[0],f=e[1],m=k(),p=k();return null==d&&(d=0,c.replaceState(y({},c.state,{idx:d}),"")),{get action(){return u},get location(){return f},createHref:n,push:function e(t,a){var s=b.Push,o=l(t,a);if(!p.length||(p.call({action:s,location:o,retry:function(){e(t,a)}}),0)){var u=[{usr:o.state,key:o.key,idx:d+1},n(o)];o=u[0],u=u[1];try{c.pushState(o,"",u)}catch(f){i.location.assign(u)}r(s)}},replace:function e(t,a){var s=b.Replace,i=l(t,a);p.length&&(p.call({action:s,location:i,retry:function(){e(t,a)}}),1)||(i=[{usr:i.state,key:i.key,idx:d},n(i)],c.replaceState(i[0],"",i[1]),r(s))},go:s,back:function(){s(-1)},forward:function(){s(1)},listen:function(e){return m.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&i.addEventListener("beforeunload",N),function(){t(),p.length||i.removeEventListener("beforeunload",N)}}}}().listen((({action:e,location:a})=>{const n=a.pathname;t.mockToPage(n,{})}))}),[]),l.default.createElement("div",{className:"local-debug-side"},l.default.createElement("ul",null,a.map((e=>l.default.createElement("li",{key:e},l.default.createElement("a",{href:`#${e}`},e))))))},Prompt:function(e){return l.default.createElement("div",null,"页面不存在")},Loading:function(e){const[t,a]=l.default.useState(!1),n=e.edgeService;return l.default.useEffect((function(){let e=!1;const t=function(t){e=t,t?setTimeout((function(){e===t&&a(!0)}),350):setTimeout((function(){e===t&&a(!1)}),100)};return n.on("IO_STATUS",t),function(){n.off("IO_STATUS",t)}}),[n]),t?l.default.createElement("div",{style:{position:"absolute",left:0,top:0,zIndex:100}},"LOADING..."):null}};function w(e){const{image:t=w.IMAGE_1,text:a="",subText:n="",transparent:r}=e;return l.default.createElement("div",{className:r?"presentation-card transparent":"presentation-card"},l.default.createElement("img",{src:t}),a?l.default.createElement("div",{className:"text"},a):null,n?l.default.createElement("div",{className:"sub-text"},n):null)}w.IMAGE_1="https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png",w.IMAGE_2="https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png",w.IMAGE_3="https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";function S(){}function P(e){const{tabIndex:t=1,onItemClick:a=S}=e;return l.default.createElement("div",{className:"android-pda-list"},l.default.Children.map(e.children,((e,n)=>{const r=e.props.onClick;return l.default.cloneElement(e,Object.assign({tabIndex:t+n},e.props,{onClick:e=>{r&&r(e),a(e)}}),e.props.children)})))}P.Item=function(e){const{onClick:t,title:a,subTitle:n,extra:r,tags:s=[],tabIndex:i}=e;return l.default.createElement("div",{className:"default-item",onClick:()=>{t(e)},tabIndex:i},l.default.createElement("div",{className:"text"},l.default.createElement("div",null,a),l.default.createElement("div",{className:"sub-text"},n),l.default.createElement("div",{className:"sub-tags"},s.map((e=>l.default.createElement("div",{className:"sub-tag-item"},e))))),l.default.createElement("div",{className:"extra"},r))};class O extends l.default.Component{constructor(e){super(e)}render(){const{style:e={},header:t,footer:a}=this.props;return l.default.createElement("div",{className:s({"baselayout-wrapper":!0}),style:e},t&&l.default.createElement("div",{className:s({"baselayout-header":!0})},t),l.default.createElement("div",{className:s({"baselayout-container":!0})},this.props.children),a&&l.default.createElement("div",{className:s({"baselayout-footer":!0})},a))}}const _=()=>{};class A extends l.default.Component{constructor(){super(...arguments),t(this,"state",{inputVisible:!1}),t(this,"_useInput",null)}render(){const{inputVisible:e}=this.state,{onWakeKeyboard:t=_,onClick:a=_}=this.props;return l.default.createElement("div",{className:"wakekeyborard"},e?l.default.createElement("div",{className:"wakekeyborard-overlay"},l.default.createElement("div",{className:"wakekeyborard-inputbox"},l.default.createElement("input",{ref:e=>{this._useInput=e},type:"tel"}),l.default.createElement(o,{type:"primary",onClick:t=>{a(this._useInput.value),this.setState({inputVisible:!e})}},"查询"))):null,e?null:l.default.createElement("div",{className:"wakekeyborard-icon",onClick:a=>{this.setState({inputVisible:!e}),requestAnimationFrame((()=>{this._useInput.focus(),t()}))}}))}}exports.BaseLayout=O,exports.Button=o,exports.Confirm=p,exports.InfoCard=d,exports.List=P,exports.ListItem=f,exports.Overlay=g,exports.PageFlowSystemPages=T,exports.Presentation=w,exports.Title=c,exports.Toast=v,exports.WakeKeyborard=A;
|
package/es/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,a
|
|
1
|
+
var e=Object.defineProperty,t=(t,n,a)=>(((t,n,a)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a})(t,"symbol"!=typeof n?n+"":n,a),a);import n from"react";var a,r={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
|
-
n=s,function(){var e={}.hasOwnProperty;function t(){for(var a=[],n=0;n<arguments.length;n++){var s=arguments[n];if(s){var l=typeof s;if("string"===l||"number"===l)a.push(s);else if(Array.isArray(s)){if(s.length){var r=t.apply(null,s);r&&a.push(r)}}else if("object"===l)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(" ")}n.exports?(t.default=t,n.exports=t):window.classNames=t}();var l=s.exports;const r=()=>{};class c extends a.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,goBackHandle:n=r,icon:s="scan",title:c="任务",more:i=!1}=this.props;return a.createElement("div",{className:l({[e]:!0,"pda-header":!0})},t&&a.createElement("div",{className:"pda-goback",onClick:n}),s&&a.createElement("div",{className:l({"pda-header-icon":!0,["pda-header-icon-"+s]:!0})}),a.createElement("p",{className:l({"pda-title-text":!0})},c),i&&a.createElement("div",{className:"pda-header-more"}))}}class i extends a.Component{render(){const{type:e="default",width:t,style:n={},onClick:s}=this.props;t&&(n.width=t);let r="pda-button-"+e;return a.createElement("button",{className:l({className:!0,"pda-button":!0,[r]:!0}),style:n,onClick:s},this.props.children)}}class o extends a.Component{render(){return a.createElement("div",{className:l({"button-group":!0})},this.props.children)}}i.Group=o;class m extends a.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:n,highlightInfoCN:s,highlightSubInfo:r,highlightSubInfoCN:c,boldInfo:i,infoList:o=[],style:m={},theme:p="light"}=this.props;return a.createElement("div",{className:l({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===p}),style:m},a.createElement("p",{className:"pda-info-card-title"},t),a.createElement("p",{className:"pda-info-card-highlight"},a.createElement("span",{className:"pda-info-card-highlight1"},n),a.createElement("span",{className:"pda-info-card-highlight1CN"},s),a.createElement("span",{className:"pda-info-card-highlight2"},r),a.createElement("span",{className:"pda-info-card-highlight2CN"},c)),a.createElement("p",{className:"pda-info-card-bold"},i),o.map(((e,t)=>a.createElement("p",{key:t,className:"pda-info-card-list"},a.createElement("span",null,e.label||"")," ",a.createElement("span",null,e.content||"")))))}}class p extends a.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:n,highlightSubText:s,stateTextList:r=[],stateList:c=[],subInfoList:i=[],style:o={},icon:m}=this.props;return a.createElement("div",{className:l({[e]:!0,"pda-list-item":!0}),style:o},a.createElement("p",{className:"pda-listitem-header"},t),a.createElement("p",{className:"pda-listitem-highlight"},a.createElement("span",null,n),a.createElement("span",null,s)),a.createElement("p",{className:"pda-listitem-state-text"},r.map(((e,t)=>a.createElement("span",{key:t},e.label||"","|")))),a.createElement("div",{className:"pda-listitem-state-block"},c.map(((e,t)=>{const n=(null==e?void 0:e.type)?e.type:"default";return a.createElement("div",{key:t,className:n},e.label||"")}))),i.map(((e,t)=>a.createElement("p",{key:t,className:"pda-listitem-subinfo"},a.createElement("span",null,e.label||"")," ",a.createElement("span",null,e.content||"")))),m?a.createElement("div",{className:"pda-listitem-icon"},a.createElement("div",{className:l({"listitem-icon-container":!0,["listitem-icon-"+m]:!0})})):null)}}function u(){}function d(e){const{title:t="title",message:n="message",okText:s="okText",cancelText:l="cancelText",onClick:r=u}=e;return a.createElement("div",{className:"confirm-wrap"},a.createElement("div",{className:"confirm-title"},t),a.createElement("div",{className:"confirm-message"},n),a.createElement("div",{className:"confirm-btns"},l?a.createElement(i,{onClick:()=>r(!1)},l):null,a.createElement(i,{type:"primary",onClick:()=>r(!0)},s)))}function f(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function h(e){const{title:t="title",message:n="message",type:s="success"}=e;return a.createElement("div",{className:f(s)},a.createElement("div",{className:"toast-title"},t),a.createElement("div",{className:"toast-message"},n))}function E(e){const{verticalPosition:t="center"}=e;return a.createElement("div",{className:(n=t,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[n]||"op-overlay")},e.children);var n}var g={Alert:function(e){const{service:t,data:n={}}=e,{title:s="title",message:l="message",okText:r="okText",cancelText:c=""}=n,i=a.useCallback((function(){t.onNext(!0)}),[t]);return a.createElement(E,{verticalPosition:"bottom"},a.createElement(d,{title:s,message:l,okText:r,cancelText:c,onClick:i}))},Start:function(e){const{action:t,appManager:n,service:s}=e,l=a.useCallback((function(){s.onStart(n.config.appId)}));return a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh"}},a.createElement(i,{type:"primary",onClick:l},"开始作业"),a.createElement("br",null),a.createElement("div",null,n.config.appId),a.createElement("div",null,n.config.groupId))},Toast:function(e){const{data:t={},service:n}=e,{title:s,level:l,message:r}=t;return a.useEffect((()=>{!1!==t.hasNext&&n.onNext("")}),[t,n]),a.createElement(E,{verticalPosition:"bottom"},a.createElement(h,{type:l,title:s,message:r}))},Confirm:function(e){const{service:t,data:n={}}=e,{title:s="title",message:l="message",okText:r="okText",cancelText:c=""}=n,i=a.useCallback((function(e){t.onNext(e)}),[t]);return a.createElement(E,{verticalPosition:"bottom"},a.createElement(d,{title:s,message:l,okText:r,cancelText:c,onClick:i}))},NotFound:function(e){return a.createElement("div",{style:{padding:"20%"}},a.createElement("h1",null,"404 ",a.createElement("small",{style:{fontSize:"60%"}},"Not found")),a.createElement("div",null,e.action.getPage()))},Debug:function(e){const{appManager:t}=e,n=Array.from(t.pageManager.keys()).reverse();return a.useEffect((function(){}),[]),a.createElement("div",{className:"local-debug-side"},a.createElement("ul",null,n.map((e=>a.createElement("li",{key:e},a.createElement("a",{href:`#${e}`},e))))))},Prompt:function(e){return a.createElement("div",null,"页面不存在")},Loading:function(e){const[t,n]=a.useState(!1),s=e.edgeService;return a.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 s.on("IO_STATUS",t),function(){s.off("IO_STATUS",t)}}),[s]),t?a.createElement("div",{style:{position:"absolute",left:0,top:0,zIndex:100}},"LOADING..."):null}};function v(e){const{image:t=v.IMAGE_1,text:n="",subText:s="",transparent:l}=e;return a.createElement("div",{className:l?"presentation-card transparent":"presentation-card"},a.createElement("img",{src:t}),n?a.createElement("div",{className:"text"},n):null,s?a.createElement("div",{className:"sub-text"},s):null)}v.IMAGE_1="https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png",v.IMAGE_2="https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png",v.IMAGE_3="https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";class N extends a.Component{constructor(e){super(e)}render(){const{style:e={},header:t,footer:n}=this.props;return a.createElement("div",{className:l({"baselayout-wrapper":!0}),style:e},t&&a.createElement("div",{className:l({"baselayout-header":!0})},t),a.createElement("div",{className:l({"baselayout-container":!0})},this.props.children),n&&a.createElement("div",{className:l({"baselayout-footer":!0})},n))}}const y=()=>{};class b extends a.Component{constructor(){super(...arguments),t(this,"state",{inputVisible:!1}),t(this,"_useInput",null)}render(){const{inputVisible:e}=this.state,{onWakeKeyboard:t=y,onClick:n=y}=this.props;return a.createElement("div",{className:"wakekeyborard"},e?a.createElement("div",{className:"wakekeyborard-overlay"},a.createElement("div",{className:"wakekeyborard-inputbox"},a.createElement("input",{ref:e=>{this._useInput=e},type:"tel"}),a.createElement(i,{type:"primary",onClick:t=>{n(this._useInput.value),this.setState({inputVisible:!e})}},"查询"))):null,e?null:a.createElement("div",{className:"wakekeyborard-icon",onClick:a=>{this.setState({inputVisible:!e}),requestAnimationFrame((()=>{this._useInput.focus(),t()}))}}))}}export{N as BaseLayout,i as Button,d as Confirm,m as InfoCard,p as ListItem,E as Overlay,g as PageFlowSystemPages,v as Presentation,c as Title,h as Toast,b as WakeKeyborard};
|
|
7
|
+
a=r,function(){var e={}.hasOwnProperty;function t(){for(var n=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var s=typeof r;if("string"===s||"number"===s)n.push(r);else if(Array.isArray(r)){if(r.length){var l=t.apply(null,r);l&&n.push(l)}}else if("object"===s)if(r.toString===Object.prototype.toString)for(var i in r)e.call(r,i)&&r[i]&&n.push(i);else n.push(r.toString())}}return n.join(" ")}a.exports?(t.default=t,a.exports=t):window.classNames=t}();var s=r.exports;const l=()=>{};class i extends n.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,goBackHandle:a=l,icon:r="scan",title:i="任务",more:c=!1}=this.props;return n.createElement("div",{className:s({[e]:!0,"pda-header":!0})},t&&n.createElement("div",{className:"pda-goback",onClick:a}),r&&n.createElement("div",{className:s({"pda-header-icon":!0,["pda-header-icon-"+r]:!0})}),n.createElement("p",{className:s({"pda-title-text":!0})},i),c&&n.createElement("div",{className:"pda-header-more"}))}}class c extends n.Component{render(){const{type:e="default",width:t,style:a={},onClick:r}=this.props;t&&(a.width=t);let l="pda-button-"+e;return n.createElement("button",{className:s({className:!0,"pda-button":!0,[l]:!0}),style:a,onClick:r},this.props.children)}}class o extends n.Component{render(){return n.createElement("div",{className:s({"button-group":!0})},this.props.children)}}c.Group=o;class u extends n.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:a,highlightInfoCN:r,highlightSubInfo:l,isProgress:i,percentage:c,highlightSubInfoCN:o,boldInfo:u,infoList:m=[],style:p={},theme:d="light"}=this.props;return n.createElement("div",{className:s({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===d}),style:p},n.createElement("p",{className:"pda-info-card-title"},t),n.createElement("p",{className:"pda-info-card-highlight"},n.createElement("span",{className:"pda-info-card-highlight1"},a),n.createElement("span",{className:"pda-info-card-highlight1CN"},r),n.createElement("span",{className:"pda-info-card-highlight2"},l),n.createElement("span",{className:"pda-info-card-highlight2CN"},o)),i?n.createElement("div",{className:"pda-info-card-progress"},n.createElement("div",{className:"pda-info-card-progress-inside",style:{width:100*c+"%"}})):null,n.createElement("p",{className:"pda-info-card-bold"},u),m.map(((e,t)=>n.createElement("p",{key:t,className:"pda-info-card-list"},n.createElement("span",null,e.label||"")," ",n.createElement("span",null,e.content||"")))))}}class m extends n.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:a,highlightSubText:r,stateTextList:l=[],stateList:i=[],subInfoList:c=[],style:o={},icon:u}=this.props;return n.createElement("div",{className:s({[e]:!0,"pda-list-item":!0}),style:o},n.createElement("p",{className:"pda-listitem-header"},t),n.createElement("p",{className:"pda-listitem-highlight"},n.createElement("span",null,a),n.createElement("span",null,r)),n.createElement("p",{className:"pda-listitem-state-text"},l.map(((e,t)=>n.createElement("span",{key:t},e.label||"","|")))),n.createElement("div",{className:"pda-listitem-state-block"},i.map(((e,t)=>{const a=(null==e?void 0:e.type)?e.type:"default";return n.createElement("div",{key:t,className:a},e.label||"")}))),c.map(((e,t)=>n.createElement("p",{key:t,className:"pda-listitem-subinfo"},n.createElement("span",null,e.label||"")," ",n.createElement("span",null,e.content||"")))),u?n.createElement("div",{className:"pda-listitem-icon"},n.createElement("div",{className:s({"listitem-icon-container":!0,["listitem-icon-"+u]:!0})})):null)}}function p(){}function d(e){const{title:t="title",message:a="message",okText:r="okText",cancelText:s="cancelText",onClick:l=p}=e;return n.createElement("div",{className:"confirm-wrap"},n.createElement("div",{className:"confirm-title"},t),n.createElement("div",{className:"confirm-message"},a),n.createElement("div",{className:"confirm-btns"},s?n.createElement(c,{onClick:()=>l(!1)},s):null,n.createElement(c,{type:"primary",onClick:()=>l(!0)},r)))}function f(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function h(e){const{title:t="title",message:a="message",type:r="success"}=e;return n.createElement("div",{className:f(r)},n.createElement("div",{className:"toast-title"},t),n.createElement("div",{className:"toast-message"},a))}function v(e){const{verticalPosition:t="center"}=e;return n.createElement("div",{className:(a=t,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[a]||"op-overlay")},e.children);var a}function g(e){var t=String(e).split("by Error:");return t[1]||t[0]}function E(){return(E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var b,y=b||(b={});y.Pop="POP",y.Push="PUSH",y.Replace="REPLACE";function N(e){e.preventDefault(),e.returnValue=""}function k(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function x(e){var t=e.pathname,n=e.search;return(void 0===t?"/":t)+(void 0===n?"":n)+(void 0===(e=e.hash)?"":e)}function C(e){var t={};if(e){var n=e.indexOf("#");0<=n&&(t.hash=e.substr(n),e=e.substr(0,n)),0<=(n=e.indexOf("?"))&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var I={Alert:function(e){const{service:t,data:a={}}=e,{title:r="title",message:s="message",okText:l="okText",cancelText:i=""}=a,c=n.useCallback((function(){t.onNext(!0)}),[t]);return n.createElement(v,{verticalPosition:"bottom"},n.createElement(d,{title:r,message:s,okText:l,cancelText:i,onClick:c}))},Start:function(e){const{action:t,appManager:a,service:r}=e,s=n.useCallback((function(){r.onStart(a.config.appId)}));return n.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh"}},n.createElement(c,{type:"primary",onClick:s},"开始作业"),n.createElement("br",null),n.createElement("div",null,a.config.appId),n.createElement("div",null,a.config.groupId))},Toast:function(e){const{data:t={},service:a}=e,{title:r,level:s,message:l}=t;return n.useEffect((()=>{!1!==t.hasNext&&a.onNext("")}),[t,a]),n.createElement(v,{verticalPosition:"bottom"},n.createElement(h,{type:s,title:r,message:g(l)}))},Confirm:function(e){const{service:t,data:a={}}=e,{title:r="title",message:s="message",okText:l="okText",cancelText:i=""}=a,c=n.useCallback((function(e){t.onNext(e)}),[t]);return n.createElement(v,{verticalPosition:"bottom"},n.createElement(d,{title:r,message:s,okText:l,cancelText:i,onClick:c}))},NotFound:function(e){return n.createElement("div",{style:{padding:"20%"}},n.createElement("h1",null,"404 ",n.createElement("small",{style:{fontSize:"60%"}},"Not found")),n.createElement("div",null,e.action.getPage()))},Debug:function(e){const{appManager:t}=e,a=Array.from(t.pageManager.keys()).reverse();return n.useEffect((function(){return function(e){function t(){var e=C(i.location.hash.substr(1)),t=e.pathname,n=e.search;e=e.hash;var a=c.state||{};return[a.idx,{pathname:void 0===t?"/":t,search:void 0===n?"":n,hash:void 0===e?"":e,state:a.usr||null,key:a.key||"default"}]}function n(){if(o)f.call(o),o=null;else{var e=b.Pop,n=t(),a=n[0];if(n=n[1],f.length){if(null!=a){var r=m-a;r&&(o={action:e,location:n,retry:function(){l(-1*r)}},l(r))}}else s(e)}}function a(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=-1===(n=(t=i.location.href).indexOf("#"))?t:t.slice(0,n)),n+"#"+("string"==typeof e?e:x(e))}function r(e,t){return void 0===t&&(t=null),E({},p,"string"==typeof e?C(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function s(e){u=e,e=t(),m=e[0],p=e[1],d.call({action:u,location:p})}function l(e){c.go(e)}void 0===e&&(e={});var i=void 0===(e=e.window)?document.defaultView:e,c=i.history,o=null;i.addEventListener("popstate",n),i.addEventListener("hashchange",(function(){x(t()[1])!==x(p)&&n()}));var u=b.Pop,m=(e=t())[0],p=e[1],d=k(),f=k();return null==m&&(m=0,c.replaceState(E({},c.state,{idx:m}),"")),{get action(){return u},get location(){return p},createHref:a,push:function e(t,n){var l=b.Push,o=r(t,n);if(!f.length||(f.call({action:l,location:o,retry:function(){e(t,n)}}),0)){var u=[{usr:o.state,key:o.key,idx:m+1},a(o)];o=u[0],u=u[1];try{c.pushState(o,"",u)}catch(p){i.location.assign(u)}s(l)}},replace:function e(t,n){var l=b.Replace,i=r(t,n);f.length&&(f.call({action:l,location:i,retry:function(){e(t,n)}}),1)||(i=[{usr:i.state,key:i.key,idx:m},a(i)],c.replaceState(i[0],"",i[1]),s(l))},go:l,back:function(){l(-1)},forward:function(){l(1)},listen:function(e){return d.push(e)},block:function(e){var t=f.push(e);return 1===f.length&&i.addEventListener("beforeunload",N),function(){t(),f.length||i.removeEventListener("beforeunload",N)}}}}().listen((({action:e,location:n})=>{const a=n.pathname;t.mockToPage(a,{})}))}),[]),n.createElement("div",{className:"local-debug-side"},n.createElement("ul",null,a.map((e=>n.createElement("li",{key:e},n.createElement("a",{href:`#${e}`},e))))))},Prompt:function(e){return n.createElement("div",null,"页面不存在")},Loading:function(e){const[t,a]=n.useState(!1),r=e.edgeService;return n.useEffect((function(){let e=!1;const t=function(t){e=t,t?setTimeout((function(){e===t&&a(!0)}),350):setTimeout((function(){e===t&&a(!1)}),100)};return r.on("IO_STATUS",t),function(){r.off("IO_STATUS",t)}}),[r]),t?n.createElement("div",{style:{position:"absolute",left:0,top:0,zIndex:100}},"LOADING..."):null}};function T(e){const{image:t=T.IMAGE_1,text:a="",subText:r="",transparent:s}=e;return n.createElement("div",{className:s?"presentation-card transparent":"presentation-card"},n.createElement("img",{src:t}),a?n.createElement("div",{className:"text"},a):null,r?n.createElement("div",{className:"sub-text"},r):null)}T.IMAGE_1="https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png",T.IMAGE_2="https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png",T.IMAGE_3="https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";function w(){}function S(e){const{tabIndex:t=1,onItemClick:a=w}=e;return n.createElement("div",{className:"android-pda-list"},n.Children.map(e.children,((e,r)=>{const s=e.props.onClick;return n.cloneElement(e,Object.assign({tabIndex:t+r},e.props,{onClick:e=>{s&&s(e),a(e)}}),e.props.children)})))}S.Item=function(e){const{onClick:t,title:a,subTitle:r,extra:s,tags:l=[],tabIndex:i}=e;return n.createElement("div",{className:"default-item",onClick:()=>{t(e)},tabIndex:i},n.createElement("div",{className:"text"},n.createElement("div",null,a),n.createElement("div",{className:"sub-text"},r),n.createElement("div",{className:"sub-tags"},l.map((e=>n.createElement("div",{className:"sub-tag-item"},e))))),n.createElement("div",{className:"extra"},s))};class P extends n.Component{constructor(e){super(e)}render(){const{style:e={},header:t,footer:a}=this.props;return n.createElement("div",{className:s({"baselayout-wrapper":!0}),style:e},t&&n.createElement("div",{className:s({"baselayout-header":!0})},t),n.createElement("div",{className:s({"baselayout-container":!0})},this.props.children),a&&n.createElement("div",{className:s({"baselayout-footer":!0})},a))}}const O=()=>{};class A extends n.Component{constructor(){super(...arguments),t(this,"state",{inputVisible:!1}),t(this,"_useInput",null)}render(){const{inputVisible:e}=this.state,{onWakeKeyboard:t=O,onClick:a=O}=this.props;return n.createElement("div",{className:"wakekeyborard"},e?n.createElement("div",{className:"wakekeyborard-overlay"},n.createElement("div",{className:"wakekeyborard-inputbox"},n.createElement("input",{ref:e=>{this._useInput=e},type:"tel"}),n.createElement(c,{type:"primary",onClick:t=>{a(this._useInput.value),this.setState({inputVisible:!e})}},"查询"))):null,e?null:n.createElement("div",{className:"wakekeyborard-icon",onClick:n=>{this.setState({inputVisible:!e}),requestAnimationFrame((()=>{this._useInput.focus(),t()}))}}))}}export{P as BaseLayout,c as Button,d as Confirm,u as InfoCard,S as List,m as ListItem,v as Overlay,I as PageFlowSystemPages,T as Presentation,i as Title,h as Toast,A as WakeKeyborard};
|
package/es/style.css
CHANGED
|
@@ -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-size:100%}.pda-header .pda-header-icon-scan{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png)}.pda-header .pda-header-icon-select{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN0170QXc91udWriUp19S_!!6000000006060-2-tps-74-72.png)}.pda-header .pda-header-icon-read{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN01EMphgH1ylYGXImCZn_!!6000000006619-2-tps-70-70.png)}.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}.button-group{display:flex;flex-direction:row;padding:20px 24px}.button-group .pda-button:not(:last-child){margin-right:16px}.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;display:flex;justify-content:center;align-items:center}.pda-list-item .listitem-icon-container{background-size:100%;background-repeat:no-repeat;width:16px;height:24px}.pda-list-item .listitem-icon-next{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01FkZisA1tCg1sj3b6U_!!6000000005866-2-tps-40-58.png)}.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}.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}.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}.presentation-card .sub-text{margin-top:6px;font-weight:700;font-size:12px}.baselayout-wrapper{height:100%;min-height:100%;display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}.baselayout-wrapper .baselayout-container{padding:0 24px;overflow-x:auto;flex:1}.wakekeyborard .wakekeyborard-icon{width:80px;height:80px;background-image:url(https://img.alicdn.com/imgextra/i3/O1CN01kxYh3U25Xzr9nAcYp_!!6000000007537-2-tps-240-240.png);background-size:100%;position:fixed;right:24px;bottom:24px}.wakekeyborard .wakekeyborard-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background-color:#dedede33}.wakekeyborard .wakekeyborard-inputbox{display:flex;flex-direction:row;height:85px;position:absolute;bottom:0;left:0;right:0}.wakekeyborard .wakekeyborard-inputbox input{flex:2}.wakekeyborard .wakekeyborard-inputbox button{flex: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-size:100%}.pda-header .pda-header-icon-scan{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png)}.pda-header .pda-header-icon-select{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN0170QXc91udWriUp19S_!!6000000006060-2-tps-74-72.png)}.pda-header .pda-header-icon-read{background-image:url(https://img.alicdn.com/imgextra/i2/O1CN01EMphgH1ylYGXImCZn_!!6000000006619-2-tps-70-70.png)}.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}.button-group{display:flex;flex-direction:row;padding:20px 24px}.button-group .pda-button:not(:last-child){margin-right:16px}.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-progress{background-color:#f3f4f8;height:12px;border-radius:6px;margin-top:17px}.pda-info-card-progress .pda-info-card-progress-inside{background-color:#0091ea;height:12px;border-radius:6px}.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;display:flex;justify-content:center;align-items:center}.pda-list-item .listitem-icon-container{background-size:100%;background-repeat:no-repeat;width:16px;height:24px}.pda-list-item .listitem-icon-next{background-image:url(https://img.alicdn.com/imgextra/i4/O1CN01FkZisA1tCg1sj3b6U_!!6000000005866-2-tps-40-58.png)}.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}.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}.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}.presentation-card .sub-text{margin-top:6px;font-weight:700;font-size:12px}.android-pda-list .default-item{background-color:#282828;font-size:23.76px;padding:10px;border-radius:6px;color:#fff;margin:5px 0;display:flex;justify-content:space-between;align-items:center}.android-pda-list .default-item:hover,.android-pda-list .default-item:active,.android-pda-list .default-item:focus{background-color:#686868}.android-pda-list .default-item .text{flex:1}.android-pda-list .default-item .sub-text{font-size:80%;opacity:.7}.android-pda-list .default-item .sub-tags{display:flex}.android-pda-list .default-item .sub-tags .sub-tag-item{background-color:#0f0;padding:2px;font-size:60%;margin-right:3px;border-radius:2px;color:#000;line-height:1em}.android-pda-list .default-item .sub-tags .sub-tag-item:first-child{margin-left:0}.android-pda-list .default-item .extra{font-size:80%;opacity:.7}.baselayout-wrapper{height:100%;min-height:100%;display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}.baselayout-wrapper .baselayout-container{padding:0 24px;overflow-x:auto;flex:1}.wakekeyborard .wakekeyborard-icon{width:80px;height:80px;background-image:url(https://img.alicdn.com/imgextra/i3/O1CN01kxYh3U25Xzr9nAcYp_!!6000000007537-2-tps-240-240.png);background-size:100%;position:fixed;right:24px;bottom:24px}.wakekeyborard .wakekeyborard-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background-color:#dedede33}.wakekeyborard .wakekeyborard-inputbox{display:flex;flex-direction:row;height:85px;position:absolute;bottom:0;left:0;right:0}.wakekeyborard .wakekeyborard-inputbox input{flex:2}.wakekeyborard .wakekeyborard-inputbox button{flex:1}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cniot/android-pda-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./es/index.cjs.js",
|
|
6
6
|
"module": "./es/index.es.js",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"classnames": "^2.3.1",
|
|
17
|
+
"history": "^5.0.1",
|
|
17
18
|
"less": "^4.1.1",
|
|
18
19
|
"react": "^17.0.2",
|
|
19
20
|
"react-dom": "^17.0.2"
|
|
@@ -25,4 +26,4 @@
|
|
|
25
26
|
"vite": "^2.4.2",
|
|
26
27
|
"vite-plugin-plain-text": "^1.1.4"
|
|
27
28
|
}
|
|
28
|
-
}
|
|
29
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
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}.button-group{display:flex;flex-direction:row;padding:20px 24px}.button-group .pda-button:not(:last-child){margin-right:16px}.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}.wakekeyborard .wakekeyborard-icon{width:80px;height:80px;background-image:url(https://img.alicdn.com/imgextra/i3/O1CN01kxYh3U25Xzr9nAcYp_!!6000000007537-2-tps-240-240.png);background-size:100%;position:fixed;right:24px;bottom:24px}.wakekeyborard .wakekeyborard-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background-color:#dedede33}.wakekeyborard .wakekeyborard-inputbox{display:flex;flex-direction:row;height:85px;position:absolute;bottom:0;left:0;right:0}.wakekeyborard .wakekeyborard-inputbox input{flex:2}.wakekeyborard .wakekeyborard-inputbox button{flex:1}.baselayout-wrapper{height:100%;min-height:100%;display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}.baselayout-wrapper .baselayout-container{padding:0 24px;overflow-x:auto;flex:1}.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%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,l,n)=>(((t,l,n)=>{l in t?e(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n})(t,"symbol"!=typeof l?l+"":l,n),n);import{R as l,c as n,a}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 r extends l.Component{constructor(e){super(e)}render(){const{className:e,goBack:t=!0,icon:a="scan",title:r="任务",more:c=!1}=this.props;return l.createElement("div",{className:n({[e]:!0,"pda-header":!0})},t&&l.createElement("div",{className:"pda-goback"}),a&&l.createElement("div",{className:"pda-header-icon"}),l.createElement("p",{className:n({"pda-title-text":!0})},r),c&&l.createElement("div",{className:"pda-header-more"}))}}class c extends l.Component{render(){const{type:e="default",width:t,style:a={},onClick:r}=this.props;t&&(a.width=t);let c="pda-button-"+e;return l.createElement("button",{className:n({className:!0,"pda-button":!0,[c]:!0}),style:a,onClick:r},this.props.children)}}class m extends l.Component{render(){return l.createElement("div",{className:n({"button-group":!0})},this.props.children)}}c.Group=m;class o extends l.Component{constructor(e){super(e)}render(){const{className:e,title:t,highlightInfo:a,highlightInfoCN:r,highlightSubInfo:c,highlightSubInfoCN:m,boldInfo:o,infoList:s=[],style:i={},theme:u="light"}=this.props;return l.createElement("div",{className:n({[e]:!0,"pda-info-card":!0,"pda-info-card-dark":"dark"===u}),style:i},l.createElement("p",{className:"pda-info-card-title"},t),l.createElement("p",{className:"pda-info-card-highlight"},l.createElement("span",{className:"pda-info-card-highlight1"},a),l.createElement("span",{className:"pda-info-card-highlight1CN"},r),l.createElement("span",{className:"pda-info-card-highlight2"},c),l.createElement("span",{className:"pda-info-card-highlight2CN"},m)),l.createElement("p",{className:"pda-info-card-bold"},o),s.map(((e,t)=>l.createElement("p",{key:t,className:"pda-info-card-list"},l.createElement("span",null,e.label||"")," ",l.createElement("span",null,e.content||"")))))}}class s extends l.Component{constructor(e){super(e)}render(){const{className:e,header:t,highlightText:a,highlightSubText:r,stateTextList:c=[],stateList:m=[],subInfoList:o=[],style:s={}}=this.props;return l.createElement("div",{className:n({[e]:!0,"pda-list-item":!0}),style:s},l.createElement("p",{className:"pda-listitem-header"},t),l.createElement("p",{className:"pda-listitem-highlight"},l.createElement("span",null,a),l.createElement("span",null,r)),l.createElement("p",{className:"pda-listitem-state-text"},c.map(((e,t)=>l.createElement("span",{key:t},e.label||"","|")))),l.createElement("div",{className:"pda-listitem-state-block"},m.map(((e,t)=>{const n=(null==e?void 0:e.type)?e.type:"default";return l.createElement("div",{key:t,className:n},e.label||"")}))),o.map(((e,t)=>l.createElement("p",{key:t,className:"pda-listitem-subinfo"},l.createElement("span",null,e.label||"")," ",l.createElement("span",null,e.content||"")))),l.createElement("div",{className:"pda-listitem-icon"}))}}function i(){}function u(e){const{title:t="title",message:n="message",okText:a="okText",cancelText:r="cancelText",onClick:m=i}=e;return l.createElement("div",{className:"confirm-wrap"},l.createElement("div",{className:"confirm-title"},t),l.createElement("div",{className:"confirm-message"},n),l.createElement("div",{className:"confirm-btns"},r?l.createElement(c,{onClick:()=>m(!1)},r):null,l.createElement(c,{type:"primary",onClick:()=>m(!0)},a)))}function E(e){return{success:"toast-wrap success",warning:"toast-wrap warning",error:"toast-wrap error"}[e]||"toast-wrap"}function d(e){const{title:t="title",message:n="message",type:a="success"}=e;return l.createElement("div",{className:E(a)},l.createElement("div",{className:"toast-title"},t),l.createElement("div",{className:"toast-message"},n))}function h(e){const{verticalPosition:t="center"}=e;return l.createElement("div",{className:(n=t,{center:"op-overlay center",top:"op-overlay top",bottom:"op-overlay bottom"}[n]||"op-overlay")},e.children);var n}function p(e){const{image:t=p.IMAGE_1,text:n="",transparent:a}=e;return l.createElement("div",{className:a?"presentation-card transparent":"presentation-card"},l.createElement("img",{src:t}),n?l.createElement("div",{className:"text"},n):null)}p.IMAGE_1="https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png",p.IMAGE_2="https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png",p.IMAGE_3="https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";const g=()=>{};class b extends l.Component{constructor(){super(...arguments),t(this,"state",{inputVisible:!1}),t(this,"_useInput",null)}render(){const{inputVisible:e}=this.state,{onWakeKeyboard:t=g,onClick:n=g}=this.props;return l.createElement("div",{className:"wakekeyborard"},e?l.createElement("div",{className:"wakekeyborard-overlay"},l.createElement("div",{className:"wakekeyborard-inputbox"},l.createElement("input",{ref:e=>{this._useInput=e},type:"tel"}),l.createElement(c,{type:"primary",onClick:t=>{n(this._useInput.value),this.setState({inputVisible:!e})}},"查询"))):null,e?null:l.createElement("div",{className:"wakekeyborard-icon",onClick:l=>{this.setState({inputVisible:!e}),requestAnimationFrame((()=>{this._useInput.focus(),t()}))}}))}}function y(e){const{service:t,data:n={}}=e,{title:a="title",message:r="message",okText:c="okText",cancelText:m=""}=n,o=l.useCallback((function(){t.onNext(!0)}),[t]);return l.createElement(h,{verticalPosition:"bottom"},l.createElement(u,{title:a,message:r,okText:c,cancelText:m,onClick:o}))}var f={onNext(e){console.log("onnext",e)}};function k(e){const{service:t,data:n={}}=e,{title:a="title",message:r="message",okText:c="okText",cancelText:m=""}=n,o=l.useCallback((function(e){t.onNext(e)}),[t]);return l.createElement(h,{verticalPosition:"bottom"},l.createElement(u,{title:a,message:r,okText:c,cancelText:m,onClick:o}))}function v(e){const{data:t={},service:n}=e,{title:a,level:r,message:c}=t;return l.useEffect((()=>{!1!==t.hasNext&&n.onNext("")}),[t,n]),l.createElement(h,{verticalPosition:"bottom"},l.createElement(d,{type:r,title:a,message:c}))}class N extends l.Component{constructor(e){super(e)}render(){const{style:e={},header:t,footer:a}=this.props;return l.createElement("div",{className:n({"baselayout-wrapper":!0}),style:e},t&&l.createElement("div",{className:n({"baselayout-header":!0})},t),l.createElement("div",{className:n({"baselayout-container":!0})},this.props.children),a&&l.createElement("div",{className:n({"baselayout-footer":!0})},a))}}const x=[{title:"组件列表",pages:[{key:"First",title:"快速开始",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"快速开始"),l.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 l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"dark-block"},l.createElement(r,{title:"hello world",more:!0})),l.createElement("code",{className:"code"},"\n <Title\n title='hello world'\n more={true}\n ></Title>\n "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"goBack"),l.createElement("td",null,"返回按钮"),l.createElement("td",null,"boolean"),l.createElement("td",null,"true")),l.createElement("tr",null,l.createElement("td",null,"icon"),l.createElement("td",null,"title 图标"),l.createElement("td",null,"string(类型待更新)"),l.createElement("td",null,"scan")),l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"more"),l.createElement("td",null,"更多"),l.createElement("td",null,"boolean"),l.createElement("td",null,"false")))))}},{key:"Button",title:"Button",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement(c,null,"按钮"),l.createElement(c,{width:"60%",type:"primary",onClick:e=>console.log(e)},"确认"),l.createElement(c,{width:"150px",type:"dark",style:{marginTop:"12px",marginBottom:"12px"}},"深色"),l.createElement(c.Group,null,l.createElement(c,{type:"cutout"},"镂空"),l.createElement(c,null,"按钮"))),l.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 // 按钮组:\n <Button.Group>\n <Button type=\"cutout\">镂空</Button>\n <Button>按钮</Button>\n </Button.Group>\n "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"type"),l.createElement("td",null,"类型"),l.createElement("td",null,"string: primary | dark | cutout"),l.createElement("td",null,"default")),l.createElement("tr",null,l.createElement("td",null,"width"),l.createElement("td",null,"按钮宽度"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"style"),l.createElement("td",null,"覆写样式"),l.createElement("td",null,"object"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"onClick"),l.createElement("td",null,"点击事件"),l.createElement("td",null,"function"),l.createElement("td",null)))))}},{key:"InfoCard",title:"InfoCard",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},l.createElement(o,{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"}]}),l.createElement(o,{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"}]})),l.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 "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightInfo"),l.createElement("td",null,"高亮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightInfoCN"),l.createElement("td",null,"高亮文本(中文)"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightSubInfo"),l.createElement("td",null,"高亮副文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightSubInfoCN"),l.createElement("td",null,"高亮副文本(中文)"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"boldInfo"),l.createElement("td",null,"加粗文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"theme"),l.createElement("td",null,"主题"),l.createElement("td",null,"string: light | dark"),l.createElement("td",null,"light")),l.createElement("tr",null,l.createElement("td",null,"infoList"),l.createElement("td",null,"更多信息"),l.createElement("td",null,"object[]"),l.createElement("td",null)))))}},{key:"ListItem",title:"ListItem",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block",style:{display:"flex",flexDirection:"row"}},l.createElement(s,{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"}})),l.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 "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"header"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightText"),l.createElement("td",null,"高亮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"highlightSubText"),l.createElement("td",null,"高亮副文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"stateTextList"),l.createElement("td",null,"状态列表"),l.createElement("td",null,"object[]"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"subInfoList"),l.createElement("td",null,"更多商品信息"),l.createElement("td",null,"object[]"),l.createElement("td",null)))))}},{key:"Confirm",title:"Confirm",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Confirm"),l.createElement("p",null,"确认组件, 如果要悬浮在页面上,请配合 Overlay 使用"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement(u,{title:"111111",message:"22222",okText:"确认",cancelText:"取消",onClick:e=>{console.log("isConfirm",e)}})),l.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 '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null,"标题文案")),l.createElement("tr",null,l.createElement("td",null,"message"),l.createElement("td",null,"消息内容"),l.createElement("td",null,"string"),l.createElement("td",null,"消息内容")),l.createElement("tr",null,l.createElement("td",null,"okText"),l.createElement("td",null,"确认按钮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"cancelText"),l.createElement("td",null,"取消按钮文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"onClick"),l.createElement("td",null,"按钮点击回调"),l.createElement("td",null,"(isConfirm)=>"),l.createElement("td",null)))))}},{key:"Toast",title:"Toast",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Toast"),l.createElement("p",null,"弹窗组件,如果要悬浮在页面上,请配合 Overlay 使用"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement(d,{title:"111111",message:"22222",type:"success"}),l.createElement("br",null),l.createElement(d,{title:"111111",message:"22222",type:"warning"}),l.createElement("br",null),l.createElement(d,{title:"111111",message:"22222",type:"error"}),l.createElement("br",null)),l.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 '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"title"),l.createElement("td",null,"标题"),l.createElement("td",null,"string"),l.createElement("td",null,"标题文案")),l.createElement("tr",null,l.createElement("td",null,"message"),l.createElement("td",null,"消息内容"),l.createElement("td",null,"string"),l.createElement("td",null,"消息内容")),l.createElement("tr",null,l.createElement("td",null,"type"),l.createElement("td",null,"消息类型"),l.createElement("td",null,"string"),l.createElement("td",null,"success|warning|error")))))}},{key:"Overlay",title:"Overlay",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Overlay"),l.createElement("p",null,"统一处理模态遮罩样式"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(h,{verticalPosition:"top"},l.createElement(d,{title:"111111",message:"22222",type:"success"}))),l.createElement("br",null),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(h,{verticalPosition:"center"},l.createElement(d,{title:"111111",message:"22222",type:"warning"}))),l.createElement("br",null),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(h,{verticalPosition:"bottom"},l.createElement(u,{title:"111111",message:"22222",type:"error"}))),l.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 '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"verticalPosition"),l.createElement("td",null,"垂直方向位置"),l.createElement("td",null,"string"),l.createElement("td",null,"top|center|bottom")))))}},{key:"Presentation",title:"Presentation",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Confirm"),l.createElement("p",null,"确认组件, 如果要悬浮在页面上,请配合 Overlay 使用"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block pda"},l.createElement(p,{text:"请靠近箱码进行识别"})),l.createElement("br",null),l.createElement("div",{className:"light-block pda",style:{backgroundColor:"#000000"}},l.createElement(p,{image:p.IMAGE_2,text:"请靠近箱码进行识别",transparent:!0})),l.createElement("br",null),l.createElement("div",{className:"light-block pda",style:{backgroundColor:"#000000"}},l.createElement(p,{image:p.IMAGE_3,text:"请靠近箱码进行识别"})),l.createElement("br",null),l.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 '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"image"),l.createElement("td",null,"图片地址"),l.createElement("td",null,"string"),l.createElement("td",null,"可以使用 Presentation.IMAGE_1, Presentation.IMAGE_2 2张内置图片")),l.createElement("tr",null,l.createElement("td",null,"text"),l.createElement("td",null,"文本"),l.createElement("td",null,"string"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"transparent"),l.createElement("td",null,"是否透明,不显示被色背景"),l.createElement("td",null,"boolean"),l.createElement("td",null,"默认false")))))}},{key:"WakeKeyborard",title:"WakeKeyborard",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block"},l.createElement("p",null,"点击右下角键盘"),l.createElement(b,{onWakeKeyboard:()=>{console.log("wake keyboard")},onClick:e=>{console.log("v is ",e)}})),l.createElement("code",{className:"code"},"\n<WakeKeyborard\nonWakeKeyboard={ () => {console.log('wake keyboard')}}\nonClick={v => {console.log('v is ', v);}}\n/>\n "),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"onWakeKeyboard"),l.createElement("td",null,"唤起键盘回调"),l.createElement("td",null,"function"),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"onClick"),l.createElement("td",null,"点击查询回调"),l.createElement("td",null,"function: (value) => "),l.createElement("td",null,"(value) => ")))))}}]},{title:"内置界面预览",pages:[{key:"/system/alert",title:"/system/alert",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"/system/alert"),l.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),l.createElement("h2",null,"示例"),l.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.alert({\n title: '111',\n message: '2222',\n okText: \"确认\"\n })\n "),l.createElement("h2",null,"页面效果"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(y,{service:f,data:{title:"111",message:"2222",okText:"确认"}})))}},{key:"/system/confirm",title:"/system/confirm",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"/system/alert"),l.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),l.createElement("h2",null,"示例"),l.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.confirm({\n title: '111',\n message: '2222',\n okText: \"确认\",\n cancelText:\"取消\"\n })\n "),l.createElement("h2",null,"页面效果"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(k,{service:f,data:{title:"111",message:"2222",okText:"确认",cancelText:"取消"}})))}},{key:"/system/toast",title:"/system/toast",doc:function(){return l.createElement("div",null,l.createElement("h1",null,"/system/toast"),l.createElement("p",null,"弹出一个警告窗,用户必须点击确认才能继续"),l.createElement("h2",null,"示例"),l.createElement("code",{className:"code"},"\n // gs 代码如下\n pageFlow.toast({\n level: \"success\", // success|warning|error\n title: '111',\n message: '2222'\n })\n "),l.createElement("h2",null,"页面效果"),l.createElement("div",{className:"light-block light-block-overlay"},l.createElement(v,{service:f,data:{level:"success",title:"111",message:"2222"}})))}}]},{title:"布局容器",pages:[{key:"BaseLayout",title:"BaseLayout",doc:function(){const e=l.createElement(r,null),t=l.createElement(c.Group,null,l.createElement(c,{type:"cutout",onClick:e=>console.log("cancle")},"取消"),l.createElement(c,{type:"primary"},"确认"));return l.createElement("div",null,l.createElement("h1",null,"Scan"),l.createElement("p",null,"扫码组件"),l.createElement("h2",null,"示例"),l.createElement("div",{className:"light-block",style:{display:"flex"}},l.createElement("div",{style:{width:480,height:800,position:"relative"}},l.createElement(N,{style:{backgroundColor:"black",marginRight:20},header:e,footer:t},l.createElement(p,{text:"请靠近箱码进行识别"}))),l.createElement("div",{style:{width:480,height:800,position:"relative"}},l.createElement(N,{style:{backgroundColor:"black"},header:e,footer:t},[{},{},{}].map(((e,t)=>l.createElement(o,{key:t,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"}]})))))),l.createElement("code",{className:"code"},'\n const header = <Title></Title>;\n const footer = (\n <Button.Group>\n <Button type="cutout" onClick={e => console.log(\'cancle\')}>取消</Button>\n <Button type="primary">确认</Button>\n </Button.Group>\n )\n\n <BaseLayout\n header={header}\n footer={footer}\n >\n <Presentation text="请靠近箱码进行识别" ></Presentation>\n </BaseLayout>\n '),l.createElement("h2",null,"参数"),l.createElement("table",{className:"pure-table pure-table-bordered"},l.createElement("thead",null,l.createElement("tr",null,l.createElement("th",null,"属性"),l.createElement("th",null,"说明"),l.createElement("th",null,"类型"),l.createElement("th",null,"默认值"))),l.createElement("tbody",null,l.createElement("tr",null,l.createElement("td",null,"header"),l.createElement("td",null,"吸顶组件"),l.createElement("td",null),l.createElement("td",null)),l.createElement("tr",null,l.createElement("td",null,"footer"),l.createElement("td",null,"吸底组件"),l.createElement("td",null),l.createElement("td",null)))))}}]}];function C(){const[e,t]=l.useState("First"),n=l.useCallback((function(e){t(e)})),a=(r=e,x.map((e=>e.pages.filter((function(e){return e.key===r}))[0])).filter((e=>e))[0]);var r;return l.createElement("div",{className:"components-container"},l.createElement("div",{className:"components-example"},l.createElement("h1",{title:"@cniot/android-pda-components"},"Components"),x.map((function(t,a){return l.createElement(l.Fragment,{key:a},l.createElement("h2",null,t.title),t.pages.map((function(t){return l.createElement("div",{className:e===t.key?"components-item active":"components-item",onClick:n.bind(null,t.key),"data-index":t.key,key:t.key},l.createElement("span",null,t.title))})))}))),l.createElement("div",{className:"show-case"},a?l.createElement(a.doc,{}):null))}a.render(l.createElement(C,null),document.getElementById("root"));
|