index.AsuR1xI5.js 9.9 KB

1
  1. import{o as e,b as t,w as l,r as n,n as s,a as i,h as o,D as u,d as a,t as r,q as c,g as d,i as p,E as f,I as h}from"./index-C3Q1cdHf.js";import{_ as m,q as g}from"./Login.vue_vue_type_style_index_0_scoped_9f3de52b_lang.BX9TobLa.js";const y=m({name:"uniCol",props:{span:{type:Number,default:24},offset:{type:Number,default:-1},pull:{type:Number,default:-1},push:{type:Number,default:-1},xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},data:()=>({gutter:0,sizeClass:"",parentWidth:0,nvueWidth:0,marginLeft:0,right:0,left:0}),created(){let e=this.$parent;for(;e&&"uniRow"!==e.$options.componentName;)e=e.$parent;this.updateGutter(e.gutter),e.$watch("gutter",(e=>{this.updateGutter(e)}))},computed:{sizeList(){let{span:e,offset:t,pull:l,push:n}=this;return{span:e,offset:t,pull:l,push:n}},pointClassList(){let e=[];return["xs","sm","md","lg","xl"].forEach((t=>{const l=this[t];"number"==typeof l?e.push(`uni-col-${t}-${l}`):"object"==typeof l&&l&&Object.keys(l).forEach((n=>{e.push("span"===n?`uni-col-${t}-${l[n]}`:`uni-col-${t}-${n}-${l[n]}`)}))})),e.join(" ")}},methods:{updateGutter(e){e=Number(e),isNaN(e)||(this.gutter=e/2)}},watch:{sizeList:{immediate:!0,handler(e){let t=[];for(let l in e){const n=e[l];!n&&0!==n||-1===n||t.push("span"===l?`uni-col-${n}`:`uni-col-${l}-${n}`)}this.sizeClass=t.join(" ")}}}},[["render",function(u,a,r,c,d,p){const f=o;return e(),t(f,{class:s(["uni-col",d.sizeClass,p.pointClassList]),style:i({paddingLeft:`${Number(d.gutter)}rpx`,paddingRight:`${Number(d.gutter)}rpx`})},{default:l((()=>[n(u.$slots,"default",{},void 0,!0)])),_:3},8,["class","style"])}],["__scopeId","data-v-84ac5f6d"]]);const b=m({name:"uniRow",componentName:"uniRow",props:{type:String,gutter:Number,justify:{type:String,default:"start"},align:{type:String,default:"top"},width:{type:[String,Number],default:750}},created(){},computed:{marginValue(){return this.gutter?-this.gutter/2:0},typeClass(){return"flex"===this.type?"uni-row--flex":""},justifyClass(){return"start"!==this.justify?`uni-row--flex-justify-${this.justify}`:""},alignClass(){return"top"!==this.align?`uni-row--flex-align-${this.align}`:""}}},[["render",function(u,a,r,c,d,p){const f=o;return e(),t(f,{class:s(["uni-row",p.typeClass,p.justifyClass,p.alignClass]),style:i({marginLeft:`${Number(p.marginValue)}rpx`,marginRight:`${Number(p.marginValue)}rpx`})},{default:l((()=>[n(u.$slots,"default",{},void 0,!0)])),_:3},8,["class","style"])}],["__scopeId","data-v-9ff25b7f"]]);const _=m(u({name:"l-divider",props:{align:{type:String,default:"center",validator:e=>!e||["left","right","center"].includes(e)},content:{type:String},dashed:Boolean,vertical:Boolean,color:String,textColor:String},setup:e=>({})}),[["render",function(u,d,p,f,h,m){const g=o;return e(),t(g,{class:s(["l-divider",["l-divider--"+(u.vertical?"vertical":"horizontal"),"l-divider--"+u.align,u.dashed?"l-divider--dashed":""]]),style:i({"border-color":u.color,color:u.textColor})},{default:l((()=>[u.$slots.default||u.content?(e(),t(g,{key:0,class:"l-divider__content"},{default:l((()=>[n(u.$slots,"default",{},(()=>[a(r(u.content),1)]),!0)])),_:3})):c("",!0)])),_:3},8,["class","style"])}],["__scopeId","data-v-68acdd14"]]);const x=m({name:"UniSection",emits:["click"],props:{type:{type:String,default:""},title:{type:String,required:!0,default:""},titleFontSize:{type:String,default:"14px"},titleColor:{type:String,default:"#333"},subTitle:{type:String,default:""},subTitleFontSize:{type:String,default:"12px"},subTitleColor:{type:String,default:"#999"},padding:{type:[Boolean,String],default:!1}},computed:{_padding(){return"string"==typeof this.padding?this.padding:this.padding?"10px":""}},watch:{title(e){uni.report&&""!==e&&uni.report("title",e)}},methods:{onClick(){this.$emit("click")}}},[["render",function(u,f,h,m,g,y){const b=o,_=p;return e(),t(b,{class:"uni-section"},{default:l((()=>[d(b,{class:"uni-section-header",onClick:y.onClick},{default:l((()=>[h.type?(e(),t(b,{key:0,class:s(["uni-section-header__decoration",h.type])},null,8,["class"])):n(u.$slots,"decoration",{key:1},void 0,!0),d(b,{class:"uni-section-header__content"},{default:l((()=>[d(_,{style:i({"font-size":h.titleFontSize,color:h.titleColor}),class:s(["uni-section__content-title",{distraction:!h.subTitle}])},{default:l((()=>[a(r(h.title),1)])),_:1},8,["style","class"]),h.subTitle?(e(),t(_,{key:0,style:i({"font-size":h.subTitleFontSize,color:h.subTitleColor}),class:"uni-section-header__content-sub"},{default:l((()=>[a(r(h.subTitle),1)])),_:1},8,["style"])):c("",!0)])),_:1}),d(b,{class:"uni-section-header__slot-right"},{default:l((()=>[n(u.$slots,"right",{},void 0,!0)])),_:3})])),_:3},8,["onClick"]),d(b,{class:"uni-section-content",style:i({padding:y._padding})},{default:l((()=>[n(u.$slots,"default",{},void 0,!0)])),_:3},8,["style"])])),_:3})}],["__scopeId","data-v-0a8818d5"]]),S={en:{"uni-popup.cancel":"cancel","uni-popup.ok":"ok","uni-popup.placeholder":"pleace enter","uni-popup.title":"Hint","uni-popup.shareTitle":"Share to"},"zh-Hans":{"uni-popup.cancel":"取消","uni-popup.ok":"确定","uni-popup.placeholder":"请输入","uni-popup.title":"提示","uni-popup.shareTitle":"分享到"},"zh-Hant":{"uni-popup.cancel":"取消","uni-popup.ok":"確定","uni-popup.placeholder":"請輸入","uni-popup.title":"提示","uni-popup.shareTitle":"分享到"}},{t:k}=f(S);const v=m({name:"uniPopupDialog",mixins:[g],emits:["confirm","close","update:modelValue","input"],props:{inputType:{type:String,default:"text"},showClose:{type:Boolean,default:!0},modelValue:{type:[Number,String],default:""},placeholder:{type:[String,Number],default:""},type:{type:String,default:"error"},mode:{type:String,default:"base"},title:{type:String,default:""},content:{type:String,default:""},beforeClose:{type:Boolean,default:!1},cancelText:{type:String,default:""},confirmText:{type:String,default:""},maxlength:{type:Number,default:-1},focus:{type:Boolean,default:!0}},data:()=>({dialogType:"error",val:""}),computed:{okText(){return this.confirmText||k("uni-popup.ok")},closeText(){return this.cancelText||k("uni-popup.cancel")},placeholderText(){return this.placeholder||k("uni-popup.placeholder")},titleText(){return this.title||k("uni-popup.title")}},watch:{type(e){this.dialogType=e},mode(e){"input"===e&&(this.dialogType="info")},value(e){-1!=this.maxlength&&"input"===this.mode?this.val=e.slice(0,this.maxlength):this.val=e},val(e){this.$emit("update:modelValue",e)}},created(){this.popup.disableMask(),"input"===this.mode?(this.dialogType="info",this.val=this.value,this.val=this.modelValue):this.dialogType=this.type},methods:{onOk(){"input"===this.mode?this.$emit("confirm",this.val):this.$emit("confirm"),this.beforeClose||this.popup.close()},closeDialog(){this.$emit("close"),this.beforeClose||this.popup.close()},close(){this.popup.close()}}},[["render",function(i,u,f,m,g,y){const b=p,_=o,x=h;return e(),t(_,{class:"uni-popup-dialog"},{default:l((()=>[d(_,{class:"uni-dialog-title"},{default:l((()=>[d(b,{class:s(["uni-dialog-title-text",["uni-popup__"+g.dialogType]])},{default:l((()=>[a(r(y.titleText),1)])),_:1},8,["class"])])),_:1}),"base"===f.mode?(e(),t(_,{key:0,class:"uni-dialog-content"},{default:l((()=>[n(i.$slots,"default",{},(()=>[d(b,{class:"uni-dialog-content-text"},{default:l((()=>[a(r(f.content),1)])),_:1})]),!0)])),_:3})):(e(),t(_,{key:1,class:"uni-dialog-content"},{default:l((()=>[n(i.$slots,"default",{},(()=>[d(x,{class:"uni-dialog-input",maxlength:f.maxlength,modelValue:g.val,"onUpdate:modelValue":u[0]||(u[0]=e=>g.val=e),type:f.inputType,placeholder:y.placeholderText,focus:f.focus},null,8,["maxlength","modelValue","type","placeholder","focus"])]),!0)])),_:3})),d(_,{class:"uni-dialog-button-group"},{default:l((()=>[f.showClose?(e(),t(_,{key:0,class:"uni-dialog-button",onClick:y.closeDialog},{default:l((()=>[d(b,{class:"uni-dialog-button-text"},{default:l((()=>[a(r(y.closeText),1)])),_:1})])),_:1},8,["onClick"])):c("",!0),d(_,{class:s(["uni-dialog-button",f.showClose?"uni-border-left":""]),onClick:y.onOk},{default:l((()=>[d(b,{class:"uni-dialog-button-text uni-button-color"},{default:l((()=>[a(r(y.okText),1)])),_:1})])),_:1},8,["class","onClick"])])),_:1})])),_:3})}],["__scopeId","data-v-dc2a088f"]]),C=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],$=(()=>{if("undefined"==typeof document)return!1;const e=C[0],t={};for(const l of C){if((null==l?void 0:l[1])in document){for(const[n,s]of l.entries())t[e[n]]=s;return t}}return!1})(),w={change:$.fullscreenchange,error:$.fullscreenerror};let T={request:(e=document.documentElement,t)=>new Promise(((l,n)=>{const s=()=>{T.off("change",s),l()};T.on("change",s);const i=e[$.requestFullscreen](t);i instanceof Promise&&i.then(s).catch(n)})),exit:()=>new Promise(((e,t)=>{if(!T.isFullscreen)return void e();const l=()=>{T.off("change",l),e()};T.on("change",l);const n=document[$.exitFullscreen]();n instanceof Promise&&n.then(l).catch(t)})),toggle:(e,t)=>T.isFullscreen?T.exit():T.request(e,t),onchange(e){T.on("change",e)},onerror(e){T.on("error",e)},on(e,t){const l=w[e];l&&document.addEventListener(l,t,!1)},off(e,t){const l=w[e];l&&document.removeEventListener(l,t,!1)},raw:$};Object.defineProperties(T,{isFullscreen:{get:()=>Boolean(document[$.fullscreenElement])},element:{enumerable:!0,get:()=>document[$.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[$.fullscreenEnabled])}}),$||(T={isEnabled:!1});const F=T;export{y as _,b as a,_ as b,x as c,v as d,F as s};