im/public/h5/assets/pages-message-detail.811c30...

2 lines
26 KiB
JavaScript
Raw Normal View History

2023-09-26 18:09:46 +08:00
import{a5 as t,_ as e,o as s,c as i,w as a,g as o,f as n,i as l,t as c,a3 as u,k as r,j as d,N as p,a6 as h,n as m,h as f,b as g,r as y,O as _,l as k,s as C,m as b,z as x,q as w,p as T,R as v,d as $,e as S,F as A,a4 as I,a7 as N,a8 as P,a9 as D,y as M,aa as L}from"./index-22d2df30.js";import{r as U}from"./uni-app.es.06715d18.js";const z={data:()=>({}),created(){this.popup=this.getParent()},methods:{getParent(t="uniPopup"){let e=this.$parent,s=e.$options.name;for(;s!==t;){if(e=e.$parent,!e)return!1;s=e.$options.name}return e}}},j={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:B}=t(j);const E=e({name:"uniPopupDialog",mixins:[z],emits:["confirm","close"],props:{value:{type:[String,Number],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:""}},data:()=>({dialogType:"error",focus:!1,val:""}),computed:{okText(){return this.confirmText||B("uni-popup.ok")},closeText(){return this.cancelText||B("uni-popup.cancel")},placeholderText(){return this.placeholder||B("uni-popup.placeholder")},titleText(){return this.title||B("uni-popup.title")}},watch:{type(t){this.dialogType=t},mode(t){"input"===t&&(this.dialogType="info")},value(t){this.val=t}},created(){this.popup.disableMask(),"input"===this.mode?(this.dialogType="info",this.val=this.value):this.dialogType=this.type},mounted(){this.focus=!0},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(t,e,h,m,f,g){const y=r,_=d,k=p;return s(),i(_,{class:"uni-popup-dialog"},{default:a((()=>[o(_,{class:"uni-dialog-title"},{default:a((()=>[o(y,{class:n(["uni-dialog-title-text",["uni-popup__"+f.dialogType]])},{default:a((()=>[l(c(g.titleText),1)])),_:1},8,["class"])])),_:1}),"base"===h.mode?(s(),i(_,{key:0,class:"uni-dialog-content"},{default:a((()=>[u(t.$slots,"default",{},(()=>[o(y,{class:"uni-dialog-content-text"},{default:a((()=>[l(c(h.content),1)])),_:1})]),!0)])),_:3})):(s(),i(_,{key:1,class:"uni-dialog-content"},{default:a((()=>[u(t.$slots,"default",{},(()=>[o(k,{class:"uni-dialog-input",modelValue:f.val,"onUpdate:modelValue":e[0]||(e[0]=t=>f.val=t),type:"text",placeholder:g.placeholderText,focus:f.focus},null,8,["modelValue","placeholder","focus"])]),!0)])),_:3})),o(_,{class:"uni-dialog-button-group"},{default:a((()=>[o(_,{class:"uni-dialog-button",onClick:g.closeDialog},{default:a((()=>[o(y,{class:"uni-dialog-button-text"},{default:a((()=>[l(c(g.closeText),1)])),_:1})])),_:1},8,["onClick"]),o(_,{class:"uni-dialog-button uni-border-left",onClick:g.onOk},{default:a((()=>[o(y,{class:"uni-dialog-button-text uni-button-color"},{default:a((()=>[l(c(g.okText),1)])),_:1})])),_:1},8,["onClick"])])),_:1})])),_:3})}],["__scopeId","data-v-d19f9ee6"]]);class O{constructor(t,e){this.options=t,this.animation=h(t),this.currentStepAnimates={},this.next=0,this.$=e}_nvuePushAnimates(t,e){let s=this.currentStepAnimates[this.next],i={};if(i=s||{styles:{},config:{}},H.includes(t)){i.styles.transform||(i.styles.transform="");let s="";"rotate"===t&&(s="deg"),i.styles.transform+=`${t}(${e+s}) `}else i.styles[t]=`${e}`;this.currentStepAnimates[this.next]=i}_animateRun(t={},e={}){let s=this.$.$refs.ani.ref;if(s)return new Promise(((i,a)=>{nvueAnimation.transition(s,{styles:t,...e},(t=>{i()}))}))}_nvueNextAnimate(t,e=0,s){let i=t[e];if(i){let{styles:a,c