vant/static/js/async/1363.20b945ff.js
2024-04-20 08:49:23 +00:00

2 lines
7.3 KiB
JavaScript

/*! For license information please see 1363.20b945ff.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["1363"],{87394:function(t,e,n){"use strict";n.r(e);let o=n("43879").Z;e.default=o},43879:function(t,e,n){"use strict";var o=n("80681"),i=n("11848"),l=n("57122"),r=n("99742"),a=n("96528"),u=n("32387"),s=n("22244"),c=n("54369");e.Z=(0,o.aZ)({__name:"index",setup(t){var e=(0,c.q)({"zh-CN":{primary:"\u4E3B\u8981\u901A\u77E5",success:"\u6210\u529F\u901A\u77E5",danger:"\u5371\u9669\u901A\u77E5",warning:"\u8B66\u544A\u901A\u77E5",content:"\u901A\u77E5\u5185\u5BB9",notifyType:"\u901A\u77E5\u7C7B\u578B",customColor:"\u81EA\u5B9A\u4E49\u989C\u8272",customNotify:"\u81EA\u5B9A\u4E49\u914D\u7F6E",useComponent:"\u4F7F\u7528 Notify \u7EC4\u4EF6",customDuration:"\u81EA\u5B9A\u4E49\u65F6\u957F",customPosition:"\u81EA\u5B9A\u4E49\u4F4D\u7F6E"},"en-US":{primary:"Primary",success:"Success",danger:"Danger",warning:"Warning",content:"Notify Message",notifyType:"Notify Type",customColor:"Custom Color",customNotify:"Custom Notify",useComponent:"Use Notify Component",customDuration:"Custom Duration",customPosition:"Custom Position"}}),n=(0,i.iH)(!1),d=()=>{(0,u.NU)(e("content"))},m=()=>{(0,u.NU)({color:"#ad0000",message:e("customColor"),background:"#ffe1e1"})},f=()=>{(0,u.NU)({message:e("customDuration"),duration:1e3})},p=()=>{(0,u.NU)({message:e("customPosition"),position:"bottom"})},g=t=>{(0,u.NU)({message:e("content"),type:t})},v=()=>{n.value=!0,setTimeout(()=>{n.value=!1},2e3)};return(t,u)=>{var c=(0,o.up)("demo-block");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.Wm)(c,{card:"",title:(0,i.SU)(e)("basicUsage")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("basicUsage"),onClick:d},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(c,{card:"",title:(0,i.SU)(e)("notifyType")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("primary"),onClick:u[0]||(u[0]=t=>g("primary"))},null,8,["title"]),(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("success"),onClick:u[1]||(u[1]=t=>g("success"))},null,8,["title"]),(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("danger"),onClick:u[2]||(u[2]=t=>g("danger"))},null,8,["title"]),(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("warning"),onClick:u[3]||(u[3]=t=>g("warning"))},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(c,{card:"",title:(0,i.SU)(e)("customNotify")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("customColor"),onClick:m},null,8,["title"]),(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("customPosition"),onClick:p},null,8,["title"]),(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("customDuration"),onClick:f},null,8,["title"])]),_:1},8,["title"]),(0,o.Wm)(c,{card:"",title:(0,i.SU)(e)("useComponent")},{default:(0,o.w5)(()=>[(0,o.Wm)((0,i.SU)(r.ZP),{"is-link":"",title:(0,i.SU)(e)("useComponent"),onClick:v},null,8,["title"]),(0,o.Wm)((0,i.SU)(s.gU),{show:n.value,"onUpdate:show":u[4]||(u[4]=t=>n.value=t),type:"success"},{default:(0,o.w5)(()=>[(0,o.Wm)((0,i.SU)(a.ZP),{name:"bell",style:{"margin-right":"4px"}}),(0,o._)("span",null,(0,l.zw)((0,i.SU)(e)("content")),1)]),_:1},8,["show"])]),_:1},8,["title"])],64)}}})},99742:function(t,e,n){"use strict";n.d(e,{bL:function(){return l}});var o=n("63112"),i=n("54499"),l=(0,o.n)(i.ZP);e.ZP=l},6149:function(t,e,n){"use strict";n.d(e,{BC:function(){return l},g2:function(){return i},yj:function(){return r}}),n("56115"),n("59644");var o=n("80681"),i={to:[String,Object],url:String,replace:Boolean};function l(t){var{to:e,url:n,replace:o,$router:i}=t;e&&i?i[o?"replace":"push"](e):n&&(o?location.replace(n):location.href=n)}function r(){var t=(0,o.FN)().proxy;return()=>l(t)}},22244:function(t,e,n){"use strict";n.d(e,{gU:function(){return l}});var o=n("63112"),i=n("21917"),l=(0,o.n)(i.Z)},84285:function(t,e,n){"use strict";n.d(e,{H:function(){return u},o:function(){return a}});var o=n("11848"),i=n("39594"),l=n("12308"),r=n("10023");function a(){var t=(0,o.qj)({show:!1}),e=e=>{t.show=e},n=n=>{(0,l.l7)(t,n,{transitionAppear:!0}),e(!0)},i=()=>e(!1);return(0,r.F)({open:n,close:i,toggle:e}),{open:n,close:i,state:t,toggle:e}}function u(t){var e=(0,i.ri)(t),n=document.createElement("div");return document.body.appendChild(n),{instance:e.mount(n),unmount(){e.unmount(),document.body.removeChild(n)}}}},54499:function(t,e,n){"use strict";n.d(e,{x_:function(){return d}}),n("82116"),n("17989");var o=n("80681"),i=n("62568"),l=n("78335"),r=n("12308"),a=n("6149"),u=n("96528"),[s,c]=(0,i.do)("cell"),d={tag:(0,l.SQ)("div"),icon:String,size:String,title:l.Or,value:l.Or,label:l.Or,center:Boolean,isLink:Boolean,border:l.J5,iconPrefix:String,valueClass:l.Vg,labelClass:l.Vg,titleClass:l.Vg,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}},m=(0,r.l7)({},d,a.g2);e.ZP=(0,o.aZ)({name:s,props:m,setup(t,e){var{slots:n}=e,i=(0,a.yj)(),l=()=>{if(n.label||(0,r.Xq)(t.label))return(0,o.Wm)("div",{class:[c("label"),t.labelClass]},[n.label?n.label():t.label])},s=()=>{if(n.title||(0,r.Xq)(t.title)){var e,i=null===(e=n.title)||void 0===e?void 0:e.call(n);if(!Array.isArray(i)||0!==i.length)return(0,o.Wm)("div",{class:[c("title"),t.titleClass],style:t.titleStyle},[i||(0,o.Wm)("span",null,[t.title]),l()])}},d=()=>{var e=n.value||n.default;if(e||(0,r.Xq)(t.value))return(0,o.Wm)("div",{class:[c("value"),t.valueClass]},[e?e():(0,o.Wm)("span",null,[t.value])])},m=()=>n.icon?n.icon():t.icon?(0,o.Wm)(u.JO,{name:t.icon,class:c("left-icon"),classPrefix:t.iconPrefix},null):void 0,f=()=>{if(n["right-icon"])return n["right-icon"]();if(t.isLink){var e=t.arrowDirection&&"right"!==t.arrowDirection?"arrow-".concat(t.arrowDirection):"arrow";return(0,o.Wm)(u.JO,{name:e,class:c("right-icon")},null)}};return()=>{var e,{tag:l,size:r,center:a,border:u,isLink:p,required:g}=t,v=null!==(e=t.clickable)&&void 0!==e?e:p,S={center:a,required:!!g,clickable:v,borderless:!u};return r&&(S[r]=!!r),(0,o.Wm)(l,{class:c(S),role:v?"button":void 0,tabindex:v?0:void 0,onClick:i},{default:()=>{var t;return[m(),s(),d(),f(),null===(t=n.extra)||void 0===t?void 0:t.call(n)]}})}}})},21917:function(t,e,n){"use strict";n("82116"),n("17989");var o=n("80681"),i=n("62568"),l=n("12308"),r=n("78335"),a=n("97760"),u=n("3558"),[s,c]=(0,i.do)("notify"),d=["lockScroll","position","show","teleport","zIndex"],m=(0,l.l7)({},u.W,{type:(0,r.SQ)("danger"),color:String,message:r.Or,position:(0,r.SQ)("top"),className:r.Vg,background:String,lockScroll:Boolean});e.Z=(0,o.aZ)({name:s,props:m,emits:["update:show"],setup(t,e){var{emit:n,slots:i}=e,r=t=>n("update:show",t);return()=>(0,o.Wm)(a.GI,(0,o.dG)({class:[c([t.type]),t.className],style:{color:t.color,background:t.background},overlay:!1,duration:.2,"onUpdate:show":r},(0,l.ei)(t,d)),{default:()=>[i.default?i.default():t.message]})}})},32387:function(t,e,n){"use strict";n.d(e,{NU:function(){return m}});var o,i,l=n("80681"),r=n("12308"),a=n("84285"),u=n("21917"),s=t=>(0,r.Kn)(t)?t:{message:t},c={type:"danger",color:void 0,message:"",onClose:void 0,onClick:void 0,onOpened:void 0,duration:3e3,position:void 0,className:"",lockScroll:!1,background:void 0},d=()=>{i&&i.toggle(!1)};function m(t){if(r._f)return!i&&({instance:i}=(0,a.H)({setup(){var{state:t,toggle:e}=(0,a.o)();return()=>(0,l.Wm)(u.Z,(0,l.dG)(t,{"onUpdate:show":e}),null)}})),t=(0,r.l7)({},c,s(t)),i.open(t),clearTimeout(o),t.duration>0&&(o=setTimeout(d,t.duration)),i}}}]);