Files
wecom_it_smart_desk/frontend-h5/dist_d3/assets/index-Cf-KgPGN.js
T
2026-08-11 14:16:24 +08:00

2 lines
9.2 KiB
JavaScript

import{a8 as I,a9 as D,aa as t,aJ as Q,aI as R,af as T,aK as O,I as C,ag as B,au as P,aL as G,aA as Y,aM as p,aN as ee,aj as ne,aO as F,aq as L,aP as M,aQ as Z,aR as te,ac as q,aS as N,aT as z,ab as ae,an as ie,aU as re,aV as ce,aW as oe,aX as le,aY as se,aZ as de,av as ue,a_ as fe,at as ge,a$ as K,b0 as U,b1 as W,b2 as ve,aw as me,aC as he,b3 as be}from"./index-DyhzhPHB.js";const[Se,V]=T("tag"),ye={size:String,mark:Boolean,show:D,type:R("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean};var ke=I({name:Se,props:ye,emits:["close"],setup(e,{slots:n,emit:i}){const l=s=>{s.stopPropagation(),i("close",s)},r=()=>e.plain?{color:e.textColor||e.color,borderColor:e.color}:{color:e.textColor,background:e.color},c=()=>{var s;const{type:h,mark:o,plain:u,round:f,size:d,closeable:g}=e,S={mark:o,plain:u,round:f};d&&(S[d]=d);const b=g&&t(C,{name:"cross",class:[V("close"),O],onClick:l},null);return t("span",{style:r(),class:V([S,h])},[(s=n.default)==null?void 0:s.call(n),b])};return()=>t(Q,{name:e.closeable?"van-fade":void 0},{default:()=>[e.show?c():null]})}});const we=B(ke),[xe,$]=T("image"),Pe={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:P,height:P,radius:P,lazyLoad:Boolean,iconSize:P,showError:D,errorIcon:R("photo-fail"),iconPrefix:String,showLoading:D,loadingIcon:R("photo"),crossorigin:String,referrerpolicy:String,decoding:String};var Ce=I({name:xe,props:Pe,emits:["load","error"],setup(e,{emit:n,slots:i}){const l=L(!1),r=L(!0),c=L(),{$Lazyload:s}=G().proxy,h=M(()=>{const a={width:N(e.width),height:N(e.height)};return z(e.radius)&&(a.overflow="hidden",a.borderRadius=N(e.radius)),a});Y(()=>e.src,()=>{l.value=!1,r.value=!0});const o=a=>{r.value&&(r.value=!1,n("load",a))},u=()=>{const a=new Event("load");Object.defineProperty(a,"target",{value:c.value,enumerable:!0}),o(a)},f=a=>{l.value=!0,r.value=!1,n("error",a)},d=(a,y,k)=>k?k():t(C,{name:a,size:e.iconSize,class:y,classPrefix:e.iconPrefix},null),g=()=>{if(r.value&&e.showLoading)return t("div",{class:$("loading")},[d(e.loadingIcon,$("loading-icon"),i.loading)]);if(l.value&&e.showError)return t("div",{class:$("error")},[d(e.errorIcon,$("error-icon"),i.error)])},S=()=>{if(l.value||!e.src)return;const a={alt:e.alt,class:$("img"),decoding:e.decoding,style:{objectFit:e.fit,objectPosition:e.position},crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy};return e.lazyLoad?Z(t("img",q({ref:c},a),null),[[te("lazy"),e.src]]):t("img",q({ref:c,src:e.src,onLoad:o,onError:f},a),null)},b=({el:a})=>{const y=()=>{a===c.value&&r.value&&u()};c.value?y():F(y)},v=({el:a})=>{a===c.value&&!l.value&&f()};return s&&p&&(s.$on("loaded",b),s.$on("error",v),ee(()=>{s.$off("loaded",b),s.$off("error",v)})),ne(()=>{F(()=>{var a;(a=c.value)!=null&&a.complete&&!e.lazyLoad&&u()})}),()=>{var a;return t("div",{class:$({round:e.round,block:e.block}),style:h.value},[S(),g(),(a=i.default)==null?void 0:a.call(i)])}}});const Ie=B(Ce),[Te,m]=T("card"),Be={tag:String,num:P,desc:String,thumb:String,title:String,price:P,centered:Boolean,lazyLoad:Boolean,currency:R("¥"),thumbLink:String,originPrice:P};var $e=I({name:Te,props:Be,emits:["clickThumb"],setup(e,{slots:n,emit:i}){const l=()=>{if(n.title)return n.title();if(e.title)return t("div",{class:[m("title"),"van-multi-ellipsis--l2"]},[e.title])},r=()=>{if(n.tag||e.tag)return t("div",{class:m("tag")},[n.tag?n.tag():t(we,{mark:!0,type:"primary"},{default:()=>[e.tag]})])},c=()=>n.thumb?n.thumb():t(Ie,{src:e.thumb,fit:"cover",width:"100%",height:"100%",lazyLoad:e.lazyLoad},null),s=()=>{if(n.thumb||e.thumb)return t("a",{href:e.thumbLink,class:m("thumb"),onClick:u=>i("clickThumb",u)},[c(),r()])},h=()=>{if(n.desc)return n.desc();if(e.desc)return t("div",{class:[m("desc"),"van-ellipsis"]},[e.desc])},o=()=>{const u=e.price.toString().split(".");return t("div",null,[t("span",{class:m("price-currency")},[e.currency]),t("span",{class:m("price-integer")},[u[0]]),u.length>1&&t(ae,null,[ie("."),t("span",{class:m("price-decimal")},[u[1]])])])};return()=>{var u,f,d;const g=n.num||z(e.num),S=n.price||z(e.price),b=n["origin-price"]||z(e.originPrice),v=g||S||b||n.bottom,a=S&&t("div",{class:m("price")},[n.price?n.price():o()]),y=b&&t("div",{class:m("origin-price")},[n["origin-price"]?n["origin-price"]():`${e.currency} ${e.originPrice}`]),k=g&&t("div",{class:m("num")},[n.num?n.num():`x${e.num}`]),A=n.footer&&t("div",{class:m("footer")},[n.footer()]),E=v&&t("div",{class:m("bottom")},[(u=n["price-top"])==null?void 0:u.call(n),a,y,k,(f=n.bottom)==null?void 0:f.call(n)]);return t("div",{class:m()},[t("div",{class:m("header")},[s(),t("div",{class:m("content",{centered:e.centered})},[t("div",null,[l(),h(),(d=n.tags)==null?void 0:d.call(n)]),E])]),A])}}});const je=B($e),[Le,w]=T("nav-bar"),Re={title:String,fixed:Boolean,zIndex:P,border:D,leftText:String,rightText:String,leftDisabled:Boolean,rightDisabled:Boolean,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:D};var _e=I({name:Le,props:Re,emits:["clickLeft","clickRight"],setup(e,{emit:n,slots:i}){const l=L(),r=re(l,w),c=f=>{e.leftDisabled||n("clickLeft",f)},s=f=>{e.rightDisabled||n("clickRight",f)},h=()=>i.left?i.left():[e.leftArrow&&t(C,{class:w("arrow"),name:"arrow-left"},null),e.leftText&&t("span",{class:w("text")},[e.leftText])],o=()=>i.right?i.right():t("span",{class:w("text")},[e.rightText]),u=()=>{const{title:f,fixed:d,border:g,zIndex:S}=e,b=oe(S),v=e.leftArrow||e.leftText||i.left,a=e.rightText||i.right;return t("div",{ref:l,style:b,class:[w({fixed:d}),{[ce]:g,"van-safe-area-top":e.safeAreaInsetTop}]},[t("div",{class:w("content")},[v&&t("div",{class:[w("left",{disabled:e.leftDisabled}),e.clickable&&!e.leftDisabled?O:""],onClick:c},[h()]),t("div",{class:[w("title"),"van-ellipsis"]},[i.title?i.title():f]),a&&t("div",{class:[w("right",{disabled:e.rightDisabled}),e.clickable&&!e.rightDisabled?O:""],onClick:s},[o()])])])};return()=>e.fixed&&e.placeholder?r(u):u()}});const Fe=B(_e),[ze,_]=T("notice-bar"),De={text:String,mode:String,color:String,delay:W(1),speed:W(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var Ee=I({name:ze,props:De,emits:["close","replay"],setup(e,{emit:n,slots:i}){let l=0,r=0,c;const s=L(),h=L(),o=ge({show:!0,offset:0,duration:0}),u=()=>{if(i["left-icon"])return i["left-icon"]();if(e.leftIcon)return t(C,{class:_("left-icon"),name:e.leftIcon},null)},f=()=>{if(e.mode==="closeable")return"cross";if(e.mode==="link")return"arrow"},d=a=>{e.mode==="closeable"&&(o.show=!1,n("close",a))},g=()=>{if(i["right-icon"])return i["right-icon"]();const a=f();if(a)return t(C,{name:a,class:_("right-icon"),onClick:d},null)},S=()=>{o.offset=l,o.duration=0,ve(()=>{U(()=>{o.offset=-r,o.duration=(r+l)/+e.speed,n("replay")})})},b=()=>{const a=e.scrollable===!1&&!e.wrapable,y={transform:o.offset?`translateX(${o.offset}px)`:"",transitionDuration:`${o.duration}s`};return t("div",{ref:s,role:"marquee",class:_("wrap")},[t("div",{ref:h,style:y,class:[_("content"),{"van-ellipsis":a}],onTransitionend:S},[i.default?i.default():e.text])])},v=()=>{const{delay:a,speed:y,scrollable:k}=e,A=z(a)?+a*1e3:0;l=0,r=0,o.offset=0,o.duration=0,clearTimeout(c),c=setTimeout(()=>{if(!s.value||!h.value||k===!1)return;const E=K(s).width,j=K(h).width;(k||j>E)&&U(()=>{l=E,r=j,o.offset=-r,o.duration=r/+y})},A)};return le(v),se(v),de("pageshow",v),ue({reset:v}),Y(()=>[e.text,e.scrollable],v),()=>{const{color:a,wrapable:y,background:k}=e;return Z(t("div",{role:"alert",class:_({wrapable:y}),style:{color:a,background:k}},[u(),b(),g()]),[[fe,o.show]])}}});const qe=B(Ee),[H,X]=T("steps"),Ae={active:W(0),direction:R("horizontal"),activeIcon:R("checked"),iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String},J=Symbol(H);var Ne=I({name:H,props:Ae,emits:["clickStep"],setup(e,{emit:n,slots:i}){const{linkChildren:l}=me(J);return l({props:e,onClickStep:c=>n("clickStep",c)}),()=>{var c;return t("div",{class:X([e.direction])},[t("div",{class:X("items")},[(c=i.default)==null?void 0:c.call(i)])])}}});const[Oe,x]=T("step");var Me=I({name:Oe,setup(e,{slots:n}){const{parent:i,index:l}=he(J);if(!i)return;const r=i.props,c=()=>{const d=+r.active;return l.value<d?"finish":l.value===d?"process":"waiting"},s=()=>c()==="process",h=M(()=>({background:c()==="finish"?r.activeColor:r.inactiveColor})),o=M(()=>{if(s())return{color:r.activeColor};if(c()==="waiting")return{color:r.inactiveColor}}),u=()=>i.onClickStep(l.value),f=()=>{const{iconPrefix:d,finishIcon:g,activeIcon:S,activeColor:b,inactiveIcon:v}=r;return s()?n["active-icon"]?n["active-icon"]():t(C,{class:x("icon","active"),name:S,color:b,classPrefix:d},null):c()==="finish"&&(g||n["finish-icon"])?n["finish-icon"]?n["finish-icon"]():t(C,{class:x("icon","finish"),name:g,color:b,classPrefix:d},null):n["inactive-icon"]?n["inactive-icon"]():v?t(C,{class:x("icon"),name:v,classPrefix:d},null):t("i",{class:x("circle"),style:h.value},null)};return()=>{var d;const g=c();return t("div",{class:[be,x([r.direction,{[g]:g}])]},[t("div",{class:x("title",{active:s()}),style:o.value,onClick:u},[(d=n.default)==null?void 0:d.call(n)]),t("div",{class:x("circle-container"),onClick:u},[f()]),t("div",{class:x("line"),style:h.value},null)])}}});const Ke=B(Me),Ue=B(Ne);export{je as C,Ie as I,Fe as N,Ke as S,we as T,qe as a,Ue as b,Be as c,De as d,Pe as i,Re as n,Ae as s,ye as t};