ui-process-h5 0.1.20 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.Design={},d.Vue))})(this,function(d,e){"use strict";const y=e.defineComponent({name:"TopTab",props:{tapList:{type:Array,default:()=>[]},selfTapList:{type:Array,default:()=>[]}},setup(t){const i=e.ref(""),c=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),n=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),a=e.ref(),u=(l,r)=>{l!==i.value&&(i.value=l,o(r))},o=l=>{if(a.value.length){let r=document.getElementsByClassName("bottom-line")[0],s;if(r.offsetWidth<a.value[l].offsetWidth-10){let p=(a.value[l].offsetWidth-r.offsetWidth-10)/2;s=`${a.value[l].offsetLeft+p}px`}else if(r.offsetWidth>a.value[l].offsetWidth-10){let p=(r.offsetWidth-a.value[l].offsetWidth+10)/2;s=`${a.value[l].offsetLeft-p}px`}else s=`${a.value[l].offsetLeft}px`;r.style.transition=".3s",r.style.transform=`translateX(${s})`}};return e.watch(()=>t.selfTapList,(l,r)=>{l.length&&(n.value=[].concat(l),i.value=n.value[0].key)},{immediate:!0,deep:!0}),e.watch(()=>t.tapList,(l,r)=>{t.selfTapList.length||(n.value=[].concat(c.value),l.length>0&&l.forEach((s,p)=>{s.sort&&s.sort>1?n.value.splice(s.sort-1,0,s):s.sort==1?n.value.unshift(s):n.value.push(s)}),i.value=n.value[0].key)},{immediate:!0,deep:!0}),e.onMounted(()=>{o(0)}),{isTapList:n,active:i,handleActive:u,label:a}}}),$="",h=(t,i)=>{const c=t.__vccOpts||t;for(const[n,a]of i)c[n]=a;return c},k={class:"tops-tab"},m={class:"tops-tab-header"},b=["onClick"],_={key:0,class:"bottom-line"},T={class:"tops-tab-body"};function L(t,i,c,n,a,u){return e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tops-tab-header-items",[o.key===t.active?"active":""]]),onClick:r=>t.handleActive(o.key,l),ref_for:!0,ref:"label"},e.toDisplayString(o.label),11,b))),256)),t.isTapList.length?(e.openBlock(),e.createElementBlock("div",_)):e.createCommentVNode("",!0)]),e.createElementVNode("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,o=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:o.key,style:{height:"100%"}},[o.key==="a"&&o.type==="default"?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("",!0),o.key==="tab2"&&o.type==="default"?e.renderSlot(t.$slots,"default",{key:1},void 0,!0):e.createCommentVNode("",!0),o.key==="tab3"&&o.type==="default"?e.renderSlot(t.$slots,"default",{key:2},void 0,!0):e.createCommentVNode("",!0),o.type=="slot"?e.renderSlot(t.$slots,o.slot,{key:3},void 0,!0):e.createCommentVNode("",!0)])),[[e.vShow,t.active===o.key]])),128))])])}const f=h(y,[["render",L],["__scopeId","data-v-a3457e59"]]);f.install=function(t){return t.component(f.name,f),t};const g=[f],B={install:function(t){g.forEach(i=>{t.use(i)})}};d.TopTab=f,d.default=B,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.Design={},_.Vue))})(this,function(_,e){"use strict";const V=e.defineComponent({name:"TopTab",props:{tapList:{type:Array,default:()=>[]},selfTapList:{type:Array,default:()=>[]}},setup(t){const o=e.ref("http://59.53.91.231:8088/portal/r/w?sid=6f714ec1-7570-4525-ac51-b092402d8295&cmd=CLIENT_BPM_FORM_TRACK_OPEN&processInstId=1f6e7196-e1ea-428e-b295-aa23a54a2402&supportCanvas=true&formInfo="),p=e.ref([{actionName:"提交",activityName:"部门负责人",createDate:"2023-04-20 14:47:35",createUser:"18ccbf63229f0c79f39940ae284c111e",createUserName:"朱鸿飞",customUniqueId:"",departmentName:"测试部",id:"88df38c8-9756-4b4a-a9b0-dcb0ec1b57d5",metaAnnexList:null,msg:"同意",positionName:"测试部119147",processInstId:"1f6e7196-e1ea-428e-b295-aa23a54a2402",taskInstId:"38bbef1c-efbb-456d-bd79-08ed9d96b4b3"}]),r=e.ref(""),c=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),i=e.ref([{label:"基本信息",key:"a",type:"default",slot:"default"},{label:"流程图",key:"b",type:"default",slot:"tab2"},{label:"审批记录",key:"c",type:"default",slot:"tab3"}]),s=e.ref(),f=(a,m)=>{a!==r.value&&(r.value=a,d(m))},d=a=>{if(s.value.length){let m=document.getElementsByClassName("bottom-line")[0],l;if(m.offsetWidth<s.value[a].offsetWidth-10){let u=(s.value[a].offsetWidth-m.offsetWidth-10)/2;l=`${s.value[a].offsetLeft+u}px`}else if(m.offsetWidth>s.value[a].offsetWidth-10){let u=(m.offsetWidth-s.value[a].offsetWidth+10)/2;l=`${s.value[a].offsetLeft-u}px`}else l=`${s.value[a].offsetLeft}px`;m.style.transition=".3s",m.style.transform=`translateX(${l})`}};return e.watch(()=>t.selfTapList,(a,m)=>{a.length&&(i.value=[].concat(a),r.value=i.value[0].key)},{immediate:!0,deep:!0}),e.watch(()=>t.tapList,(a,m)=>{t.selfTapList.length||(i.value=[].concat(c.value),a.length>0&&a.forEach((l,u)=>{l.sort&&l.sort>1?i.value.splice(l.sort-1,0,l):l.sort==1?i.value.unshift(l):i.value.push(l)}),r.value=i.value[0].key)},{immediate:!0,deep:!0}),e.onMounted(()=>{d(0)}),{isTapList:i,active:r,handleActive:f,label:s,taskCommentList:p,trackUrl:o}}}),Ee="",B=(t,o)=>{const p=t.__vccOpts||t;for(const[r,c]of o)p[r]=c;return p},h=t=>(e.pushScopeId("data-v-baad7ff1"),t=t(),e.popScopeId(),t),$={class:"tops-tab"},T={class:"tops-tab-header"},L=["onClick"],I={key:0,class:"bottom-line"},A={class:"tops-tab-body"},D=["src"],F={key:1,class:"textnone"},w={class:"seal-list__item--option"},P=h(()=>e.createElementVNode("span",null,"节点名称",-1)),U={class:"seal-list__item--option"},j=h(()=>e.createElementVNode("span",null,"审批人",-1)),M={class:"seal-list__item--option"},q=h(()=>e.createElementVNode("span",null,"审批操作",-1)),z={class:"seal-list__item--option"},O=h(()=>e.createElementVNode("span",null,"审批意见",-1)),W=["innerHTML"],H={class:"seal-list__item--option"},R=h(()=>e.createElementVNode("span",null,"审批时间",-1)),Y={key:0,class:"seal-list__item--attch"},G=[h(()=>e.createElementVNode("span",null,"查看附件",-1))],K={key:1,class:"textnone"};function X(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,(s,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tops-tab-header-items",[s.key===t.active?"active":""]]),onClick:d=>t.handleActive(s.key,f),ref_for:!0,ref:"label"},e.toDisplayString(s.label),11,L))),256)),t.isTapList.length?(e.openBlock(),e.createElementBlock("div",I)):e.createCommentVNode("",!0)]),e.createElementVNode("div",A,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.isTapList,s=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:s.key,style:{height:"calc(100% - 45px)"}},[s.key==="a"&&s.type==="default"?e.renderSlot(t.$slots,"default",{key:0},void 0,!0):e.createCommentVNode("",!0),s.key==="b"&&s.type==="default"?e.renderSlot(t.$slots,s.slot,{key:1},()=>[t.trackUrl?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:t.trackUrl,style:{width:"100%","min-height":"500px",border:"none"},scrolling:"no",frameborder:"0"},null,8,D)):(e.openBlock(),e.createElementBlock("div",F," 暂无流程图 "))],!0):e.createCommentVNode("",!0),s.key==="c"&&s.type==="default"?e.renderSlot(t.$slots,s.slot,{key:2},()=>{var f;return[((f=t.taskCommentList)==null?void 0:f.length)>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taskCommentList,(d,a)=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:"seal-list__item"},[e.createElementVNode("div",null,[e.createElementVNode("div",w,[P,e.createElementVNode("span",null,e.toDisplayString(d.activityName),1)]),e.createElementVNode("div",U,[j,e.createElementVNode("span",null,e.toDisplayString(d.createUserName),1)]),e.createElementVNode("div",M,[q,e.createElementVNode("span",null,e.toDisplayString(d.actionName),1)]),e.createElementVNode("div",z,[O,e.createElementVNode("span",{innerHTML:d.msg},null,8,W)]),e.createElementVNode("div",H,[R,e.createElementVNode("span",null,e.toDisplayString(d.createDate),1)]),d.metaAnnexList&&d.metaAnnexList.length?(e.openBlock(),e.createElementBlock("div",Y,G)):e.createCommentVNode("",!0)])]))),128)):(e.openBlock(),e.createElementBlock("div",K,"暂无数据"))]},!0):e.createCommentVNode("",!0),s.type=="slot"?e.renderSlot(t.$slots,s.slot,{key:3},void 0,!0):e.createCommentVNode("",!0)])),[[e.vShow,t.active===s.key]])),128))])])}const b=B(V,[["render",X],["__scopeId","data-v-baad7ff1"]]);b.install=function(t){return t.component(b.name,b),t};const J=e.defineComponent({name:"TopPopup",props:{titleText:{default:"top-popup",type:String},cancelText:{default:"取消",type:String},comfigText:{default:"确定",type:String},comfig:{default:null,type:Function},cancel:{default:null,type:Function},isMask:{require:!1,default:!0,type:Boolean},isMaskClose:{require:!1,default:!0,type:Boolean}},setup(t){const o=e.ref(!1),p=()=>{o.value=!0},r=()=>{typeof t.cancel=="function"&&t.cancel(),i()},c=()=>{typeof t.comfig=="function"&&t.comfig()},i=()=>{o.value=!1};return e.onMounted(()=>{document.querySelector("body")}),{handleOpen:p,handleCancel:r,handleComfig:c,handleClose:i,show:o}}}),Se="",Q={class:"top-popup-header"},Z={class:"header-title"},x={class:"top-popup-body"};function v(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"top-popup",style:e.normalizeStyle(t.show?"transform: translateY(0)":"transform: translateY(100%)")},[e.createElementVNode("div",Q,[e.createElementVNode("div",{class:"header-cancel",onClick:o[0]||(o[0]=(...s)=>t.handleCancel&&t.handleCancel(...s))},e.toDisplayString(t.cancelText),1),e.createElementVNode("div",Z,e.toDisplayString(t.titleText),1),e.createElementVNode("div",{class:"header-comfig",onClick:o[1]||(o[1]=(...s)=>t.handleComfig&&t.handleComfig(...s))},e.toDisplayString(t.comfigText),1)]),e.createElementVNode("div",x,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4),t.show&&t.isMask?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-popup-mask",onClick:o[2]||(o[2]=s=>t.isMaskClose&&t.handleClose())})):e.createCommentVNode("",!0)],64)}const k=B(J,[["render",v],["__scopeId","data-v-474e328a"]]);k.install=function(t){return console.log("TopPopup.install",t),t.mount(k),t.component(k.name,k),t};const Ve="",ee=e.defineComponent({name:"TopButton",props:{type:{default:"default",type:String}},setup(t){const o=e.ref({textColor:"#fff",bckColor:"3c9cff"});switch(t.type){case"primary":o.value.textColor="#fff",o.value.bckColor="#3c9cff";break;case"danger":o.value.textColor="rgb(255, 96, 96)",o.value.bckColor="rgb(255, 230, 230)";break;case"default":o.value.textColor="rgb(51, 51, 51)",o.value.bckColor="rgb(241, 241, 241)";break}return{style:o}}});function te(t,o,p,r,c,i){return e.openBlock(),e.createElementBlock("div",{class:"top-button",style:e.normalizeStyle(`background-color:${t.style.bckColor};color:${t.style.textColor}`)},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}const N=B(ee,[["render",te],["__scopeId","data-v-156a54e6"]]);N.install=function(t){return t.component(N.name,N),t};const oe=e.defineComponent({name:"TopProcess",components:{TopTab:b,TopPopup:k,TopButton:N},props:{tapList:{require:!1,default:()=>[],type:Array},processId:{require:!0,default:"",type:String},processDefId:{require:!0,default:"",type:String},taskId:{require:!0,default:"",type:String},isAdditional:{require:!1,default:!1,type:Boolean},isView:{default:!1,type:Boolean}},setup(t){const o=e.ref({}),p=e.ref(),r=e.ref([{taskId:"ecd82a93-4a62-42a7-b7bd-df38d2f1609a",taskState:1,nodeId:"obj_026aac284c1a4303854f978b674be4b9",customUniqueId:"",nodeName:"部门负责人"}]),c=e.ref({id:"obj_026aac284c1a4303854f978b674be4b9",name:"部门负责人",no:"1",buttons:[],ccTaskButtonLabel:"",ccTaskButtonAnnex:null,completeButtonLabel:"同意",completeButtonAnnex:null,delegateTaskButtonLabel:"转办",delegateTaskButtonAnnex:null,printFormButtonLabel:"",supplyUnusualTransferButtonLabel:"",readingOfficeLabel:"",readingOfficeButtonAnnex:null,jointlySignLabel:"",jointlySignButtonAnnex:null,counterSignLabel:"加签",counterSignButtonAnnex:null,coordinationLabel:"",coordinationButtonAnnex:null,otherButtonAnnexList:null,humanPerformer:{id:"obj_2bd3494ae5c54309b7f2ea452921790b",name:"任意指定",resourceAssignmentExpressionModel:{formalExpression:""}},commentModels:[{actionName:"提交",isDefault:!0},{actionName:"作废",isDefault:!1}],routeTxt:{departmentIds:null,companyIds:null,teamList:null,routeType:"DynamicUsers"},loopCardinality:1,isHistoryRoute:!1,participantList:null,historyRoute:!1});e.watch(()=>t.processId,(l,u)=>{l&&(o.value={status:"审批中",createUid:"18ccbf63229f0c79f39940ae284c111e",createTopUserId:"128ec9c9b7f26135272596fe01c57690",createTime:"2023-04-20 15:01:48",currUserName:"朱鸿飞",allUserNames:["朱鸿飞"],userNodeGroup:{分管领导:["朱鸿飞"]},appId:"com.awspaas.user.apps.top.study.project",statusCode:"1",statusName:"审批中",bizStatusName:"审批中",taskState:1})},{immediate:!0,deep:!0}),console.log("asd",r.value[0].taskState);const i=e.computed(()=>{var C,S;let l=[],u=r.value&&r.value[0]&&r.value[0].taskState!=4;if(u&&!t.isView&&c.value.completeButtonLabel){let n={};n.name=c.value.completeButtonLabel,n.btnProps={type:"primary"},l.push(n)}if(u&&!t.isView&&o.value.currUserName){let n={};n.name="拒绝",n.btnProps={type:"danger"},l.push(n)}if(u&&!t.isView&&c.value.buttons&&c.value.buttons.length&&c.value.buttons.forEach(n=>{if(n.label==="退回"){let E={};E.name=n.label,E.btnProps={type:"danger"},l.push(E)}}),u&&!t.isView&&c.value.delegateTaskButtonLabel){let n={};n.name=c.value.delegateTaskButtonLabel,n.btnProps={type:"default"},l.push(n)}if(t.processId&&o.value.createTopUserId==t.userId&&((C=r.value[0])==null?void 0:C.taskState)!=2&&o.value.status!=="已驳回"&&o.value.status!=="已撤销"){let n={};n.name="催办",n.btnProps={type:"default"},l.push(n)}if(t.processId&&o.value.createTopUserId==t.userId&&((S=r.value[0])==null?void 0:S.taskState)!=2&&o.value.status!=="已驳回"&&o.value.status!=="已撤销"){let n={};n.name="撤销",n.btnProps={type:"default"},l.push(n)}if(u&&!t.isView&&c.value.counterSignLabel){let n={};n.name=c.value.counterSignLabel,n.btnProps={type:"primary"},l.push(n)}return l}),s=e.computed(()=>i.value.length>3?i.value.slice(3):[]),f=()=>{console.log("handleCancel")},d=()=>{console.log("handleComfig","确定按钮"),p.value.handleClose()},a=e.computed(()=>"calc(100vh - 205px)");return{processStatus:o,processCardHeight:a,handleTest:()=>{p.value.handleOpen()},TopPopup1:p,handleCancel:f,handleComfig:d,operBtn:i,actionBtn:s}},methods:{getColor(t){return t=="审核中"?"#FFA52D":t=="已驳回"?"#F14B4C":t=="已撤销"?"#CECECE":t=="已完成"?"#6DC743":"#1389FF"}}}),$e="",y=t=>(e.pushScopeId("data-v-41bcbb23"),t=t(),e.popScopeId(),t),se={class:"process-warp"},ne={key:0,class:"process-main"},ae={class:"process-ml-item border"},le=y(()=>e.createElementVNode("div",{class:"process-mli-name"},"流程状态",-1)),re={class:"process-mli-value"},ce={class:"process-ml-item border"},ie=y(()=>e.createElementVNode("div",{class:"process-mli-name"},"流程发起时间",-1)),de={class:"process-mli-value"},pe={key:0,class:"process-ml-item"},me=y(()=>e.createElementVNode("div",{class:"process-mli-name"},"审批节点",-1)),ue={class:"process-mli-value"},fe={class:"process-mliv-jd"},_e={key:1,class:"process-foot"},he={class:"footBtnRow"},be={class:"process-btn"},ye={key:1,class:"elips"},ke=[y(()=>e.createElementVNode("div",{class:"circle"},null,-1)),y(()=>e.createElementVNode("div",{class:"circle"},null,-1)),y(()=>e.createElementVNode("div",{class:"circle"},null,-1))];function ge(t,o,p,r,c,i){const s=e.resolveComponent("TopTab"),f=e.resolveComponent("TopButton"),d=e.resolveComponent("TopPopup");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",se,[t.processStatus.status?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ae,[le,e.createElementVNode("div",re,[t.processStatus.status||t.processStatus.bizStatusName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"process-mliv-dd",style:e.normalizeStyle({background:t.getColor(t.processStatus.status)})},e.toDisplayString(t.processStatus.bizStatusName?t.processStatus.bizStatusName:t.processStatus.status),5)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",ce,[ie,e.createElementVNode("div",de,[e.createElementVNode("span",null,e.toDisplayString(t.processStatus.createTime),1)])]),t.processStatus.allUserNames&&t.processStatus.allUserNames.length?(e.openBlock(),e.createElementBlock("div",pe,[me,e.createElementVNode("div",ue,[e.createElementVNode("span",fe,e.toDisplayString(`${t.processStatus.taskState==4?t.processStatus.currUserName:t.processStatus.allUserNames.toString()}审批中`),1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"process-card",style:e.normalizeStyle({height:t.processCardHeight})},[e.createVNode(s,{tapList:t.tapList},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["tapList"])],4),t.isAdditional?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("div",he,[e.renderSlot(t.$slots,"btn",{},void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",be,[t.processStatus.status!="已完成"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.operBtn,(a,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.name},[m<3?(e.openBlock(),e.createBlock(f,{key:0,onClick:t.handleTest,type:a.btnProps.type},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.name),1)]),_:2},1032,["onClick","type"])):e.createCommentVNode("",!0)],64))),128)):e.createCommentVNode("",!0),t.operBtn.length>3?(e.openBlock(),e.createElementBlock("div",ye,ke)):e.createCommentVNode("",!0)])]),e.createVNode(d,{ref:"TopPopup1",cancel:t.handleCancel,comfig:t.handleComfig},{default:e.withCtx(()=>[e.createTextVNode(" csaasd1 ")]),_:1},8,["cancel","comfig"])],64)}const g=B(oe,[["render",ge],["__scopeId","data-v-41bcbb23"]]);g.install=function(t){return t.component(g.name,g),t};const Be=[b,g],Ne={install:function(t){Be.forEach(o=>{t.use(o)})}};_.TopProcess=g,_.TopTab=b,_.default=Ne,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- .tops-tab[data-v-a3457e59]{height:100%}.tops-tab-header[data-v-a3457e59]{display:flex;width:100%;height:45px;justify-content:space-between;font-size:14px;color:#333;padding:0 10px;font-weight:500;box-sizing:border-box;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;flex-shrink:0;-ms-overflow-style:none;position:relative}.tops-tab-header[data-v-a3457e59]:after{content:"";position:absolute;width:100%;height:1px;background-color:#f2f2f2;left:0;bottom:0}.tops-tab-header[data-v-a3457e59]::-webkit-scrollbar{display:none}.tops-tab-header-items[data-v-a3457e59]{white-space:nowrap;padding-right:10px;box-sizing:border-box;display:inline-block;height:100%;text-align:center;margin-right:32px;font-weight:400;font-size:15px;text-align:left;color:#333;display:flex;align-items:center}.tops-tab-header-items[data-v-a3457e59] :last-child{padding-right:0;margin-right:0}.tops-tab-header-items[data-v-a3457e59] :last-child:after{left:calc(50% - 17px)}.tops-tab-header .active[data-v-a3457e59]{position:relative;color:#1389ff;font-family:PingFang SC Bold;font-weight:700;font-size:15px;text-align:left}.tops-tab-header .bottom-line[data-v-a3457e59]{width:30px;height:3px;border-radius:1.5px;background-color:#1389ff;position:absolute;bottom:0;left:0}.tops-tab-body[data-v-a3457e59]{height:100%;padding:0 10px}
1
+ .tops-tab[data-v-baad7ff1]{height:100%}.tops-tab-header[data-v-baad7ff1]{display:flex;width:100%;height:45px;font-size:14px;color:#333;padding:10px 17px;font-weight:500;box-sizing:border-box;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;flex-shrink:0;-ms-overflow-style:none;position:relative;background-color:#fff}.tops-tab-header[data-v-baad7ff1]:after{content:"";position:absolute;width:100%;height:1px;background-color:#f2f2f2;left:0;bottom:0;z-index:10}.tops-tab-header[data-v-baad7ff1]::-webkit-scrollbar{display:none}.tops-tab-header-items[data-v-baad7ff1]{white-space:nowrap;padding-right:10px;box-sizing:border-box;display:inline-block;height:100%;text-align:center;margin-right:32px;font-weight:400;font-size:15px;text-align:left;color:#333;display:flex;align-items:center}.tops-tab-header-items[data-v-baad7ff1]:last-child{padding-right:0;margin-right:0}.tops-tab-header .active[data-v-baad7ff1]{position:relative;color:#1389ff;font-family:PingFang SC Bold;font-weight:700;font-size:15px;text-align:left}.tops-tab-header .bottom-line[data-v-baad7ff1]{width:30px;height:3px;border-radius:1.5px;background-color:#1389ff;position:absolute;bottom:1px;left:0;z-index:12}.tops-tab-body[data-v-baad7ff1]{height:100%}.seal-list__item[data-v-baad7ff1]{padding:6px 10px 0;margin:10px 10px 0;background-color:#fff;border-radius:10px;box-sizing:border-box}.seal-list__item[data-v-baad7ff1]:last-child{margin-bottom:70px}.seal-list__item .seal-list__item--header[data-v-baad7ff1]{margin-bottom:6px;display:flex;align-items:center}.seal-list__item .seal-list__item--header span[data-v-baad7ff1]:first-of-type{font-size:15px;margin-right:6px;font-weight:700}.seal-list__item .seal-list__item--option[data-v-baad7ff1]{display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:10px 0;color:#333}.seal-list__item .seal-list__item--option span[data-v-baad7ff1]:last-child{max-width:144px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#888}.seal-list__item .seal-list__item--attch[data-v-baad7ff1]{font-size:14px;padding:10px 0;color:#333;text-align:right;color:#1389ff}.seal-list__item .seal-list__item--actions[data-v-baad7ff1]{margin-top:12px;position:relative;display:flex;justify-content:space-around;align-items:center}.seal-list__item .seal-list__item--actions[data-v-baad7ff1] :before{content:"";top:0;width:100%;transform:scaleY(.5);transform-origin:top;border-top:1px #e8e8e8 solid;position:absolute}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1]{width:50%}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1] :after{content:"";height:60%;border-left:1px #e8e8e8 solid;position:absolute;left:100%;top:50%;transform:translate(-50%,-50%) scaleX(.5);transform-origin:left}.seal-list__item .seal-list__item--actions .van-button[data-v-baad7ff1]:last-child :after{content:none}.top-popup[data-v-474e328a]{width:100%;height:80vh;position:fixed;left:0;background-color:#fff;z-index:199;border-radius:20px 20px 0 0;padding:0 10px;box-sizing:border-box;transition:all .5s ease;bottom:0}.top-popup-mask[data-v-474e328a]{position:fixed;width:100vw;height:100vh;background-color:#000;opacity:.7;top:0;left:0;z-index:99}.top-popup-header[data-v-474e328a]{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.top-popup-header .header-cancel[data-v-474e328a],.top-popup-header .header-comfig[data-v-474e328a]{color:#1389ff}.fade-enter-active[data-v-474e328a],.fade-leave-active[data-v-474e328a]{transition:all .5s ease}.fade-enter[data-v-474e328a],.fade-leave-to[data-v-474e328a]{bottom:-100%}.fade-enter-to[data-v-474e328a],.fade-leave[data-v-474e328a]{bottom:0d}.top-button[data-v-156a54e6]{width:100%;border-radius:20px;height:36px;background-color:#3c9cff;color:#fff;font-size:14px;justify-content:center;display:flex;align-items:center}.process-warp[data-v-41bcbb23]{overflow:hidden;height:100vh;width:100%;position:relative;background-color:#f3f3f7}.process-main[data-v-41bcbb23]{display:flex;justify-content:space-between;flex-direction:column;align-items:center;padding:0 17px;background:#fff;margin:0 0 10px}.process-main .border[data-v-41bcbb23]{border-bottom:#e8e8e8 1px solid}.process-main .process-ml-item[data-v-41bcbb23]{display:flex;align-items:center;font-size:15px;font-weight:400;width:100%;justify-content:space-between;height:44px}.process-main .process-ml-item .process-mli-name[data-v-41bcbb23]{color:#333}.process-main .process-ml-item .process-mli-value[data-v-41bcbb23]{color:#888}.process-main .process-ml-item .process-mli-value .process-mliv-dd[data-v-41bcbb23]{height:26px;min-width:30px;padding:0 12px;border-radius:20px;background:#1389ff;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px}.process-main .process-ml-item .process-mli-value .process-mliv-jd[data-v-41bcbb23]{color:#1389ff}.process-btn[data-v-41bcbb23]{display:flex;min-height:60px;padding-top:5px;background:#fff;border-top:1px solid #dddddf9e;box-sizing:border-box;justify-content:center;align-items:center;flex-direction:row-reverse}.process-btn .top-button[data-v-41bcbb23],.process-btn .elips[data-v-41bcbb23]{margin:0 5px}.elips[data-v-41bcbb23]{min-width:60px;height:100%;background-color:#fff;display:flex;justify-content:center;align-items:center}.elips .circle[data-v-41bcbb23]{width:6px;height:6px;margin:0 2px;background-color:#333;border-radius:50%}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ui-process-h5",
3
3
  "private": false,
4
4
  "description": "流程组件",
5
- "version": "0.1.20",
5
+ "version": "0.1.22",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "dev": "vite",
@@ -28,22 +28,23 @@
28
28
  "./lib/style.css": "./lib/style.css"
29
29
  },
30
30
  "dependencies": {
31
+ "axios": "^1.3.6",
32
+ "dayjs": "^1.11.7",
33
+ "less-loader": "^11.1.0",
31
34
  "sass": "^1.62.0",
32
35
  "vue": "^3.2.47",
33
- "dayjs": "^1.11.7"
36
+ "vue-demi": "^0.14.0"
34
37
  },
35
38
  "devDependencies": {
36
- "@types/node": "^18.15.12",
37
- "@vitejs/plugin-vue": "^4.1.0",
38
- "typescript": "^4.9.3",
39
- "vite": "^4.2.0",
40
- "vue-tsc": "^1.2.0",
41
39
  "@commitlint/cli": "^17.0.0",
42
40
  "@commitlint/config-conventional": "^17.0.0",
41
+ "@types/node": "^18.15.12",
43
42
  "@types/sass": "^1.43.1",
44
43
  "@typescript-eslint/eslint-plugin": "^5.27.0",
45
44
  "@typescript-eslint/parser": "^5.27.0",
45
+ "@vitejs/plugin-vue": "^4.1.0",
46
46
  "@vitejs/plugin-vue-jsx": "^2.0.0",
47
+ "axios": "^1.3.5",
47
48
  "chalk": "^4.1.2",
48
49
  "commitizen": "^4.2.4",
49
50
  "cross-env": "^7.0.3",
@@ -53,16 +54,21 @@
53
54
  "eslint-define-config": "^1.5.0",
54
55
  "eslint-plugin-prettier": "^4.0.0",
55
56
  "eslint-plugin-vue": "^9.1.0",
57
+ "good-storage": "^1.1.1",
56
58
  "husky": "^8.0.1",
59
+ "js-cookie": "^3.0.1",
57
60
  "prettier": "^2.6.2",
58
61
  "rimraf": "^3.0.2",
59
62
  "sass": "^1.49.7",
60
63
  "standard-version": "^9.5.0",
64
+ "typescript": "^4.9.3",
65
+ "vite": "^4.2.0",
61
66
  "vite-plugin-dts": "^1.2.0",
62
67
  "vite-plugin-md": "^0.15.0",
63
- "vue": "^3.2.47"
68
+ "vue": "^3.2.47",
69
+ "vue-tsc": "^1.2.0"
64
70
  },
65
71
  "engines": {
66
72
  "node": ">=16.0.0"
67
73
  }
68
- }
74
+ }
@@ -1,5 +1,5 @@
1
1
  import TopTab from "./components/tab";
2
+ import TopProcess from "./components/process";
2
3
 
3
- export default [TopTab];
4
- export { TopTab };
5
-
4
+ export default [TopTab, TopProcess];
5
+ export { TopTab, TopProcess };
@@ -0,0 +1,9 @@
1
+ import { App, createApp } from "vue";
2
+ import TopButton from "./src/index.vue";
3
+
4
+ TopButton.install = function (app: App) {
5
+ // 组件注册,按需引入
6
+ app.component(TopButton.name, TopButton);
7
+ return app;
8
+ };
9
+ export default TopButton;
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <div
3
+ class="top-button"
4
+ :style="`background-color:${style.bckColor};color:${style.textColor}`"
5
+ >
6
+ <slot></slot>
7
+ </div>
8
+ </template>
9
+ <script>
10
+ import { defineComponent, ref, watch, computed, onMounted } from "vue-demi";
11
+ export default defineComponent({
12
+ name: "TopButton",
13
+ props: {
14
+ type: { default: "default", type: String },
15
+ },
16
+ setup(props) {
17
+ const style = ref({
18
+ textColor: "#fff",
19
+ bckColor: "3c9cff",
20
+ });
21
+
22
+ switch (props.type) {
23
+ case "primary":
24
+ style.value.textColor = "#fff";
25
+ style.value.bckColor = "#3c9cff";
26
+ break;
27
+ case "danger":
28
+ style.value.textColor = "rgb(255, 96, 96)";
29
+ style.value.bckColor = "rgb(255, 230, 230)";
30
+ break;
31
+ case "default":
32
+ style.value.textColor = "rgb(51, 51, 51)";
33
+ style.value.bckColor = "rgb(241, 241, 241)";
34
+ break;
35
+ }
36
+
37
+ return {
38
+ style,
39
+ };
40
+ },
41
+ });
42
+ </script>
43
+ <style scoped>
44
+ .top-button {
45
+ width: 100%;
46
+ border-radius: 20px;
47
+ height: 36px;
48
+ background-color: #3c9cff;
49
+ color: #fff;
50
+ font-size: 14px;
51
+ justify-content: center;
52
+ display: flex;
53
+ align-items: center;
54
+ }
55
+ </style>
@@ -0,0 +1,11 @@
1
+ import { App, createApp } from "vue";
2
+ import TopPopup from "./src/index.vue";
3
+
4
+ TopPopup.install = function (app: App) {
5
+ // 组件注册,按需引入
6
+ console.log("TopPopup.install",app)
7
+ app.mount(TopPopup)
8
+ app.component(TopPopup.name, TopPopup);
9
+ return app;
10
+ };
11
+ export default TopPopup;
@@ -0,0 +1,128 @@
1
+ <template>
2
+ <div
3
+ class="top-popup"
4
+ :style="
5
+ show ? 'transform: translateY(0)' : 'transform: translateY(100%)'
6
+ "
7
+ >
8
+ <div class="top-popup-header">
9
+ <div class="header-cancel" @click="handleCancel">
10
+ {{ cancelText }}
11
+ </div>
12
+ <div class="header-title">{{ titleText }}</div>
13
+ <div class="header-comfig" @click="handleComfig">
14
+ {{ comfigText }}
15
+ </div>
16
+ </div>
17
+ <div class="top-popup-body">
18
+ <slot name="default"></slot>
19
+ </div>
20
+ </div>
21
+ <div
22
+ class="top-popup-mask"
23
+ v-if="show && isMask"
24
+ @click="isMaskClose && handleClose()"
25
+ ></div>
26
+ </template>
27
+ <script lang="ts">
28
+ import { defineComponent, ref, watch, computed, onMounted } from "vue-demi";
29
+
30
+ export default defineComponent({
31
+ name: "TopPopup",
32
+ props: {
33
+ titleText: { default: "top-popup", type: String },
34
+ cancelText: { default: "取消", type: String },
35
+ comfigText: { default: "确定", type: String },
36
+ comfig: { default: null, type: Function },
37
+ cancel: { default: null, type: Function },
38
+ isMask: { require: false, default: true, type: Boolean },
39
+ isMaskClose: { require: false, default: true, type: Boolean },
40
+ },
41
+ setup(props) {
42
+ const show = ref<boolean>(false);
43
+
44
+ const handleOpen = () => {
45
+ show.value = true;
46
+ };
47
+
48
+ const handleCancel = () => {
49
+ typeof props.cancel === "function" && props.cancel();
50
+ handleClose();
51
+ };
52
+
53
+ const handleComfig = () => {
54
+ typeof props.comfig === "function" && props.comfig();
55
+ };
56
+
57
+ const handleClose = () => {
58
+ show.value = false;
59
+ };
60
+
61
+ onMounted(() => {
62
+ const body = document.querySelector("body");
63
+ });
64
+
65
+ return {
66
+ handleOpen,
67
+ handleCancel,
68
+ handleComfig,
69
+ handleClose,
70
+ show,
71
+ };
72
+ },
73
+ });
74
+ </script>
75
+ <style scoped>
76
+ .top-popup {
77
+ width: 100%;
78
+ height: 80vh;
79
+ position: fixed;
80
+ left: 0;
81
+ background-color: #fff;
82
+ z-index: 199;
83
+ border-radius: 20px 20px 0 0;
84
+ padding: 0 10px;
85
+ box-sizing: border-box;
86
+ transition: all 0.5s ease;
87
+ bottom: 0;
88
+ }
89
+ .top-popup-mask {
90
+ position: fixed;
91
+ width: 100vw;
92
+ height: 100vh;
93
+ background-color: #000;
94
+ opacity: 0.7;
95
+ top: 0;
96
+ left: 0;
97
+ z-index: 99;
98
+ }
99
+ .top-popup-header {
100
+ display: flex;
101
+ justify-content: space-between;
102
+ align-items: center;
103
+ padding: 10px 0;
104
+ }
105
+
106
+ .top-popup-header .header-cancel {
107
+ color: #1389ff;
108
+ }
109
+ .top-popup-header .header-comfig {
110
+ color: #1389ff;
111
+ }
112
+
113
+ .fade-enter-active,
114
+ .fade-leave-active {
115
+ transition: all 0.5s ease;
116
+ }
117
+
118
+ .fade-enter,
119
+ .fade-leave-to {
120
+ /* transform: translateY(100%); */
121
+ bottom: -100%;
122
+ }
123
+ .fade-enter-to,
124
+ .fade-leave {
125
+ /* transform: translateY(0%); */
126
+ bottom: 0d;
127
+ }
128
+ </style>
@@ -0,0 +1,9 @@
1
+ import { App } from "vue";
2
+ import TopProcess from "./src/index.vue";
3
+
4
+ TopProcess.install = function (app: App) {
5
+ // 组件注册,按需引入
6
+ app.component(TopProcess.name, TopProcess);
7
+ return app;
8
+ };
9
+ export default TopProcess;