first commit

This commit is contained in:
PC-202306242200\Administrator
2026-03-28 23:10:55 +08:00
commit 1c24452b6c
1735 changed files with 150474 additions and 0 deletions

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),t=require("./parser.js"),n=[],i={name:"mp-html",data:()=>({nodes:[]}),props:{containerStyle:{type:String,default:""},content:{type:String,default:""},copyLink:{type:[Boolean,String],default:!0},domain:String,errorImg:{type:String,default:""},lazyLoad:{type:[Boolean,String],default:!1},loadingImg:{type:String,default:""},pauseVideo:{type:[Boolean,String],default:!0},previewImg:{type:[Boolean,String],default:!0},scrollTable:[Boolean,String],selectable:[Boolean,String],setTitle:{type:[Boolean,String],default:!0},showImgMenu:{type:[Boolean,String],default:!0},tagStyle:Object,useAnchor:[Boolean,Number]},emits:["load","ready","imgtap","linktap","play","error"],components:{node:()=>"./node/node.js"},watch:{content(e){this.setContent(e)}},created(){this.plugins=[];for(let e=n.length;e--;)this.plugins.push(new n[e](this))},mounted(){this.content&&!this.nodes.length&&this.setContent(this.content)},beforeDestroy(){this._hook("onDetached")},methods:{in(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo(t,n){return new Promise(((i,o)=>{if(!this.useAnchor)return void o(Error("Anchor is disabled"));n=n||parseInt(this.useAnchor)||0;let s=" ";s=">>>";const r=e.index.createSelectorQuery().in(this._in?this._in.page:this).select((this._in?this._in.selector:"._root")+(t?`>>>#${t}`:"")).boundingClientRect();this._in?r.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect():r.selectViewport().scrollOffset(),r.exec((t=>{if(!t[0])return void o(Error("Label not found"));const s=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+n;this._in?this._in.page[this._in.scrollTop]=s:e.index.pageScrollTo({scrollTop:s,duration:300}),i()}))}))},getText(e){let t="";return function e(n){for(let i=0;i<n.length;i++){const o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{const n="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";n&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),n&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.nodes),t},getRect(){return new Promise(((t,n)=>{e.index.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((e=>e[0]?t(e[0]):n(Error("Root label not found"))))}))},pauseMedia(){for(let e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate(e){this.playbackRate=e;for(let t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent(e,n){n&&this.imgList||(this.imgList=[]);const i=new t.Parser(this).parse(e);if(this.$set(this,"nodes",n?(this.nodes||[]).concat(i):i),this._videos=[],this.$nextTick((()=>{this._hook("onLoad"),this.$emit("load")})),this.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){let e=0;const t=n=>{n&&n.height||(n={}),n.height===e?this.$emit("ready",n):(e=n.height,setTimeout((()=>{this.getRect().then(t).catch(t)}),350))};this.getRect().then(t).catch(t)}else this.imgList._unloadimgs||this.getRect().then((e=>{this.$emit("ready",e)})).catch((()=>{this.$emit("ready",{})}))},_hook(e){for(let t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()}}};if(!Array){e.resolveComponent("node")()}const o=e._export_sfc(i,[["render",function(t,n,i,o,s,r){return e.e({a:!s.nodes[0]},s.nodes[0]?{b:e.p({childs:s.nodes,opts:[i.lazyLoad,i.loadingImg,i.errorImg,i.showImgMenu,i.selectable],name:"span"})}:{},{c:e.n((i.selectable?"_select ":"")+"_root"),d:e.s(i.containerStyle)})}]]);wx.createComponent(o);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"node": "./node/node"
}
}

View File

@@ -0,0 +1 @@
<view id="_root" class="{{c}}" style="{{d}}"><slot wx:if="{{a}}"/><node wx:else u-i="0ec86618-0" bind:__l="__l" u-p="{{b||''}}"/></view>

View File

@@ -0,0 +1 @@
._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"node": "./node"
}
}

View File

@@ -0,0 +1,31 @@
<wxs module="handler">
// 行内标签列表
var inlineTags = {
abbr: true,
b: true,
big: true,
code: true,
del: true,
em: true,
i: true,
ins: true,
label: true,
q: true,
small: true,
span: true,
strong: true,
sub: true,
sup: true
}
/**
* @description 判断是否为行内标签
*/
module.exports = {
isInline: function (tagName, style) {
return inlineTags[tagName] || (style || '').indexOf('display:inline') !== -1
}
}
</wxs>
<view id="{{b}}" class="{{c}}" style="{{d}}"><block wx:for="{{a}}" wx:for-item="n" wx:key="aI"><image wx:if="{{n.a}}" class="_img" style="{{n.b}}" src="{{n.c}}" mode="widthFix"/><rich-text wx:if="{{n.d}}" style="{{n.e}}" nodes="{{n.f}}" data-i="{{n.g}}" catchtap="{{n.h}}"/><image wx:elif="{{n.i}}" id="{{n.j}}" class="{{n.k}}" style="{{n.l}}" src="{{n.m}}" mode="{{n.n}}" lazy-load="{{n.o}}" webp="{{n.p}}" show-menu-by-longpress="{{n.q}}" image-menu-prevent="{{n.r}}" data-i="{{n.s}}" bindload="{{n.t}}" binderror="{{n.v}}" catchtap="{{n.w}}" bindlongpress="{{n.x}}"/><text wx:elif="{{n.y}}" user-select="{{n.A}}" decode>{{n.z}}</text><text wx:elif="{{n.B}}">\n</text><view wx:elif="{{n.C}}" id="{{n.F}}" class="{{n.G}}" hover-class="_hover" style="{{n.H}}" data-i="{{n.I}}" catchtap="{{n.J}}"><node wx:if="{{n.E}}" style="display:inherit" u-i="{{n.D}}" bind:__l="__l" u-p="{{n.E}}"/></view><video wx:elif="{{n.K}}" id="{{n.L}}" class="{{n.M}}" style="{{n.N}}" autoplay="{{n.O}}" controls="{{n.P}}" loop="{{n.Q}}" muted="{{n.R}}" object-fit="{{n.S}}" poster="{{n.T}}" src="{{n.U}}" data-i="{{n.V}}" bindplay="{{n.W}}" binderror="{{n.X}}"/><audio wx:elif="{{n.Y}}" id="{{n.Z}}" class="{{n.aa}}" style="{{n.ab}}" author="{{n.ac}}" controls="{{n.ad}}" loop="{{n.ae}}" name="{{n.af}}" poster="{{n.ag}}" src="{{n.ah}}" data-i="{{n.ai}}" bindplay="{{n.aj}}" binderror="{{n.ak}}"/><view wx:elif="{{n.al}}" id="{{n.aq}}" class="{{n.ar}}" style="{{n.as}}"><node wx:if="{{n.am}}" u-i="{{n.an}}" bind:__l="__l" u-p="{{n.ao}}"/><block wx:else><view wx:for="{{n.ap}}" wx:for-item="tbody" wx:key="e" class="{{tbody.f}}" style="{{tbody.g}}"><node wx:if="{{tbody.a}}" u-i="{{tbody.b}}" bind:__l="__l" u-p="{{tbody.c}}"/><block wx:else><block wx:for="{{tbody.d}}" wx:for-item="tr" wx:key="i"><view wx:if="{{tr.a}}" class="{{tr.d}}" style="{{tr.e}}"><node wx:if="{{tr.c}}" u-i="{{tr.b}}" bind:__l="__l" u-p="{{tr.c}}"/></view><view wx:else class="{{tr.g}}" style="{{tr.h}}"><view wx:for="{{tr.f}}" wx:for-item="td" wx:key="c" class="{{td.d}}" style="{{td.e}}"><node wx:if="{{td.b}}" u-i="{{td.a}}" bind:__l="__l" u-p="{{td.b}}"/></view></view></block></block></view></block></view><rich-text wx:elif="{{n.at}}" id="{{n.av}}" style="{{n.aw}}" preview="{{false}}" selectable="{{n.ax}}" user-select="{{n.ay}}" nodes="{{n.az}}"/><view wx:elif="{{n.aA}}" id="{{n.aC}}" class="{{n.aD}}" style="{{n.aE}}"><node wx:for="{{n.aB}}" wx:for-item="n2" wx:key="a" style="{{n2.b}}" u-i="{{n2.c}}" bind:__l="__l" u-p="{{n2.d}}"/></view><node wx:else style="{{n.aF}}" u-i="{{n.aG}}" bind:__l="__l" u-p="{{n.aH||''}}"/></block></view>

View File

@@ -0,0 +1 @@
._a{padding:1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._block{display:block}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._image{height:1px}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q:before{content:'"'}._q:after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._thead,._tbody,._tfoot{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";function e(e,t=2){for(e+="";e.length<t;)e="0"+e;return e.slice(-t)}const t={yyyy:t=>e(t.year,4),yy:t=>e(t.year),MM:t=>e(t.month),M:e=>e.month,dd:t=>e(t.day),d:e=>e.day,hh:t=>e(t.hour),h:e=>e.hour,mm:t=>e(t.minute),m:e=>e.minute,ss:t=>e(t.second),s:e=>e.second,SSS:t=>e(t.millisecond,3),S:e=>e.millisecond};function n(e){return e instanceof Date?e:"string"==typeof e?e.indexOf("T")>-1?new Date(e):new Date(e.replace(/-/g,"/")):new Date(e)}exports.friendlyDate=function(e,{locale:o="zh",threshold:r=[6e4,36e5],format:a="yyyy/MM/dd hh:mm:ss"}){if("-"===e)return e;if(!e&&0!==e)return"";const s={zh:{year:"年",month:"月",day:"天",hour:"小时",minute:"分钟",second:"秒",ago:"前",later:"后",justNow:"刚刚",soon:"马上",template:"{num}{unit}{suffix}"},en:{year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",ago:"ago",later:"later",justNow:"just now",soon:"soon",template:"{num} {unit} {suffix}"}},u=s[o]||s.zh;let i,h,l=n(e),c=l.getTime()-Date.now(),y=Math.abs(c);if(y<r[0])return c<0?u.justNow:u.soon;if(y>=r[1])return function(e,o="yyyy/MM/dd hh:mm:ss"){if(!e&&0!==e)return"";const r={year:(e=n(e)).getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()},a=/yyyy|yy|MM|M|dd|d|hh|h|mm|m|ss|s|SSS|SS|S/;let s=!0,u=o;for(;s;)s=!1,u=u.replace(a,(function(e){return s=!0,t[e](r)}));return u}(l,a);let m=u.later;c<0&&(m=u.ago,c=-c);const d=Math.floor(c/1e3),f=Math.floor(d/60),M=Math.floor(f/60),g=Math.floor(M/24),S=Math.floor(g/30),p=Math.floor(S/12);switch(!0){case p>0:i=p,h=u.year;break;case S>0:i=S,h=u.month;break;case g>0:i=g,h=u.day;break;case M>0:i=M,h=u.hour;break;case f>0:i=f,h=u.minute;break;default:i=d,h=u.second}return"en"===o&&(1===i?i="a":h+="s"),u.template.replace(/{\s*num\s*}/g,i+"").replace(/{\s*unit\s*}/g,h).replace(/{\s*suffix\s*}/g,m)};

View File

@@ -0,0 +1 @@
"use strict";const e=require("./date-format.js"),t=require("../../../../common/vendor.js"),r={name:"uniDateformat",props:{date:{type:[Object,String,Number],default:()=>"-"},locale:{type:String,default:"zh"},threshold:{type:Array,default:()=>[0,0]},format:{type:String,default:"yyyy/MM/dd hh:mm:ss"},refreshRate:{type:[Number,String],default:0}},data:()=>({refreshMark:0}),computed:{dateShow(){return this.refreshMark,e.friendlyDate(this.date,{locale:this.locale,threshold:this.threshold,format:this.format})}},watch:{refreshRate:{handler(){this.setAutoRefresh()},immediate:!0}},methods:{refresh(){this.refreshMark++},setAutoRefresh(){clearInterval(this.refreshInterval),this.refreshRate&&(this.refreshInterval=setInterval((()=>{this.refresh()}),parseInt(this.refreshRate)))}}};const s=t._export_sfc(r,[["render",function(e,r,s,a,h,o){return{a:t.t(o.dateShow)}}]]);wx.createComponent(s);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<text>{{a}}</text>

View File

@@ -0,0 +1 @@
"use strict";const t=require("../../../../common/vendor.js"),s={name:"uniPopup",components:{},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},borderRadius:{type:String}},watch:{type:{handler:function(t){this.config[t]&&this[this.config[t]](!0)},immediate:!0},isDesktop:{handler:function(t){this.config[t]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(t){this.mkclick=t},immediate:!0},isMaskClick:{handler:function(t){this.mkclick=t},immediate:!0},showPopup(t){}},data(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{backgroundColor:"transparent",borderRadius:this.borderRadius||"0",position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:"top"}},computed:{getStyles(){let t={backgroundColor:this.bg};return this.borderRadius,t=Object.assign(t,{borderRadius:this.borderRadius}),t},isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted(){(()=>{const{windowWidth:s,windowHeight:i,windowTop:o,safeArea:e,screenHeight:a,safeAreaInsets:r}=t.index.getSystemInfoSync();this.popupWidth=s,this.popupHeight=i+(o||0),e&&this.safeArea?this.safeAreaInsets=a-e.bottom:this.safeAreaInsets=0})()},unmounted(){this.setH5Visible()},activated(){this.setH5Visible(!this.showPopup)},deactivated(){this.setH5Visible(!0)},created(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible(t=!0){},closeMask(){this.maskShow=!1},disableMask(){this.mkclick=!1},clear(t){t.stopPropagation(),this.clearPropagation=!0},open(t){if(this.showPopup)return;t&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(t)||(t=this.type),this.config[t]?(this[this.config[t]](),this.$emit("change",{show:!0,type:t})):console.error("缺少类型:",t)},close(t){this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showPopup=!1}),300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top(t){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},t||(this.showPopup=!0,this.showTrans=!0,this.$nextTick((()=>{this.messageChild&&"message"===this.type&&this.messageChild.timerClose()})))},bottom(t){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},t||(this.showPopup=!0,this.showTrans=!0)},center(t){this.popupstyle="center",this.ani=["fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center",borderRadius:this.borderRadius||"0"},t||(this.showPopup=!0,this.showTrans=!0)},left(t){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},t||(this.showPopup=!0,this.showTrans=!0)},right(t){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},t||(this.showPopup=!0,this.showTrans=!0)}}};if(!Array){t.resolveComponent("uni-transition")()}Math;const i=t._export_sfc(s,[["render",function(s,i,o,e,a,r){return t.e({a:a.showPopup},a.showPopup?t.e({b:a.maskShow},a.maskShow?{c:t.o(r.onTap),d:t.p({name:"mask","mode-class":"fade",styles:a.maskClass,duration:a.duration,show:a.showTrans})}:{},{e:t.s(r.getStyles),f:t.n(a.popupstyle),g:t.o(((...t)=>r.clear&&r.clear(...t))),h:t.o(r.onTap),i:t.p({"mode-class":a.ani,name:"content",styles:a.transClass,duration:a.duration,show:a.showTrans}),j:t.o(((...t)=>r.touchstart&&r.touchstart(...t))),k:t.n(a.popupstyle),l:t.n(r.isDesktop?"fixforpc-z-index":"")}):{})}]]);wx.createComponent(i);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-transition": "../../../uni-transition/components/uni-transition/uni-transition"
}
}

View File

@@ -0,0 +1 @@
<view wx:if="{{a}}" class="{{['uni-popup', k, l]}}"><view bindtouchstart="{{j}}"><uni-transition wx:if="{{b}}" key="1" bindclick="{{c}}" u-i="363f6a2e-0" bind:__l="__l" u-p="{{d}}"/><uni-transition wx:if="{{i}}" u-s="{{['d']}}" key="2" bindclick="{{h}}" u-i="363f6a2e-1" bind:__l="__l" u-p="{{i}}"><view style="{{e}}" class="{{['uni-popup__wrapper', f]}}" bindtap="{{g}}"><slot/></view></uni-transition></view></view>

View File

@@ -0,0 +1 @@
.uni-popup{position:fixed;z-index:99}.uni-popup.top,.uni-popup.left,.uni-popup.right{top:0}.uni-popup .uni-popup__wrapper{display:block;position:relative}.uni-popup .uni-popup__wrapper.left,.uni-popup .uni-popup__wrapper.right{padding-top:0;flex:1}.fixforpc-z-index{z-index:999}.fixforpc-top{top:0}

View File

@@ -0,0 +1 @@
"use strict";const t=require("../../../../common/vendor.js");class e{constructor(e,i){this.options=e,this.animation=t.index.createAnimation({...e}),this.currentStepAnimates={},this.next=0,this.$=i}_nvuePushAnimates(t,e){let n=this.currentStepAnimates[this.next],s={};if(s=n||{styles:{},config:{}},i.includes(t)){s.styles.transform||(s.styles.transform="");let i="";"rotate"===t&&(i="deg"),s.styles.transform+=`${t}(${e+i}) `}else s.styles[t]=`${e}`;this.currentStepAnimates[this.next]=s}_animateRun(t={},e={}){let i=this.$.$refs.ani.ref;if(i)return new Promise(((n,s)=>{nvueAnimation.transition(i,{styles:t,...e},(t=>{n()}))}))}_nvueNextAnimate(t,e=0,i){let n=t[e];if(n){let{styles:s,config:a}=n;this._animateRun(s,a).then((()=>{e+=1,this._nvueNextAnimate(t,e,i)}))}else this.currentStepAnimates={},"function"==typeof i&&i(),this.isEnd=!0}step(t={}){return this.animation.step(t),this}run(t){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((()=>{"function"==typeof t&&t()}),this.$.durationTime)}}const i=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"];i.concat(["opacity","backgroundColor"],["width","height","left","right","top","bottom"]).forEach((t=>{e.prototype[t]=function(...e){return this.animation[t](...e),this}})),exports.createAnimation=function(t,i){if(i)return clearTimeout(i.timer),new e(t,i)};

View File

@@ -0,0 +1 @@
"use strict";const t=require("./createAnimation.js"),i=require("../../../../common/vendor.js"),s={name:"uniTransition",emits:["click","change"],props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:()=>"fade"},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})},customClass:{type:String,default:""},onceRender:{type:Boolean,default:!1}},data:()=>({isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}),watch:{show:{handler(t){t?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject(){let t={...this.styles,"transition-duration":this.duration/1e3+"s"},i="";for(let s in t){i+=this.toLine(s)+":"+t[s]+";"}return i},transformStyles(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init(i={}){i.duration&&(this.durationTime=i.duration),this.animation=t.createAnimation(Object.assign(this.config,i),this)},onClick(){this.$emit("click",{detail:this.isShow})},step(t,i={}){if(this.animation){for(let i in t)try{"object"==typeof t[i]?this.animation[i](...t[i]):this.animation[i](t[i])}catch(s){console.error(`方法 ${i} 不存在`)}return this.animation.step(i),this}},run(t){this.animation&&this.animation.run(t)},open(){clearTimeout(this.timer),this.transform="",this.isShow=!0;let{opacity:i,transform:s}=this.styleInit(!1);void 0!==i&&(this.opacity=i),this.transform=s,this.$nextTick((()=>{this.timer=setTimeout((()=>{this.animation=t.createAnimation(this.config,this),this.tranfromInit(!1).step(),this.animation.run(),this.$emit("change",{detail:this.isShow})}),20)}))},close(t){this.animation&&this.tranfromInit(!0).step().run((()=>{this.isShow=!1,this.animationData=null,this.animation=null;let{opacity:t,transform:i}=this.styleInit(!1);this.opacity=t||1,this.transform=i,this.$emit("change",{detail:this.isShow})}))},styleInit(t){let i={transform:""},s=(t,s)=>{"fade"===s?i.opacity=this.animationType(t)[s]:i.transform+=this.animationType(t)[s]+" "};return"string"==typeof this.modeClass?s(t,this.modeClass):this.modeClass.forEach((i=>{s(t,i)})),i},tranfromInit(t){let i=(t,i)=>{let s=null;"fade"===i?s=t?0:1:(s=t?"-100%":"0","zoom-in"===i&&(s=t?.8:1),"zoom-out"===i&&(s=t?1.2:1),"slide-right"===i&&(s=t?"100%":"0"),"slide-bottom"===i&&(s=t?"100%":"0")),this.animation[this.animationMode()[i]](s)};return"string"==typeof this.modeClass?i(t,this.modeClass):this.modeClass.forEach((s=>{i(t,s)})),this.animation},animationType:t=>({fade:t?0:1,"slide-top":`translateY(${t?"0":"-100%"})`,"slide-right":`translateX(${t?"0":"100%"})`,"slide-bottom":`translateY(${t?"0":"100%"})`,"slide-left":`translateX(${t?"0":"-100%"})`,"zoom-in":`scaleX(${t?1:.8}) scaleY(${t?1:.8})`,"zoom-out":`scaleX(${t?1:1.2}) scaleY(${t?1:1.2})`}),animationMode:()=>({fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}),toLine:t=>t.replace(/([A-Z])/g,"-$1").toLowerCase()}};const a=i._export_sfc(s,[["render",function(t,s,a,e,n,o){return{a:n.isShow,b:n.animationData,c:i.n(a.customClass),d:i.s(o.transformStyles),e:i.o(((...t)=>o.onClick&&o.onClick(...t)))}}]]);wx.createComponent(a);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view hidden="{{!a}}" ref="ani" animation="{{b}}" class="{{c}}" style="{{d}}" bindtap="{{e}}"><slot></slot></view>

View File

@@ -0,0 +1 @@
"use strict";exports.AbortablePromise=class{constructor(t){this._reject=null,this.promise=new Promise(((e,r)=>{t(e,r),this._reject=r}))}abort(t){this._reject&&this._reject(t)}then(t,e){return this.promise.then(t,e)}catch(t){return this.promise.catch(t)}};

View File

@@ -0,0 +1 @@
"use strict";const e=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],t=e=>e.replace(/[+/]/g,(e=>"+"===e?"-":"_")).replace(/=+\$/m,""),n="function"==typeof btoa?e=>btoa(e):n=>{if(n.charCodeAt(0)>255)throw new RangeError("The string contains invalid characters.");return((n,r=!1)=>{let o="";for(let t=0,c=n.length;t<c;t+=3){const[r,c,a]=[n[t],n[t+1],n[t+2]],i=r<<16|c<<8|a;o+=e[i>>>18],o+=e[i>>>12&63],o+=void 0!==c?e[i>>>6&63]:"=",o+=void 0!==a?e[63&i]:"="}return r?t(o):o})(Uint8Array.from(n,(e=>e.charCodeAt(0))))};exports.encode=function(e,r=!1){const o=n((e=>unescape(encodeURIComponent(e)))(e));return r?t(o):o};

View File

@@ -0,0 +1 @@
"use strict";

View File

@@ -0,0 +1 @@
"use strict";const e=require("./util.js");function t(){}exports.callInterceptor=function(c,{args:n=[],done:r,canceled:s,error:o}){if(c){const i=c.apply(null,n);e.isPromise(i)?i.then((e=>{e?r():s&&s()})).catch(o||t):i?r():s&&s()}else r()};

View File

@@ -0,0 +1 @@
"use strict";const e=[Number,String],r=e=>({type:String,default:e}),t={customStyle:r(""),customClass:r("")};exports.baseProps=t,exports.makeArrayProp=()=>({type:Array,default:()=>[]}),exports.makeBooleanProp=e=>({type:Boolean,default:e}),exports.makeNumberProp=e=>({type:Number,default:e}),exports.makeNumericProp=r=>({type:e,default:r}),exports.makeRequiredProp=e=>({type:e,required:!0}),exports.makeStringProp=r,exports.numericProp=e;

View File

@@ -0,0 +1 @@
"use strict";const t=require("../../../../common/vendor.js"),e=require("./AbortablePromise.js");function r(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function n(t){return"[object Object]"===Object.prototype.toString.call(t)||"object"==typeof t}function o(t){const e=Object.prototype.toString.call(t).match(/\[object (\w+)\]/);return e&&e.length?e[1].toLowerCase():""}const i=t=>null!=t;function s(t,e,r){const n=(t<<16|e<<8|r).toString(16);return"#"+"0".repeat(Math.max(0,6-n.length))+n}function u(t){const e=[];for(let r=1;r<7;r+=2)e.push(parseInt("0x"+t.slice(r,r+2),16));return e}function c(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function a(t){return"function"===o(t)||"asyncfunction"===o(t)}function p(t){return"string"===o(t)}function l(t,e=new Map){if(null===t||"object"!=typeof t)return t;if(f(t))return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(t instanceof Error){const e=new Error(t.message);return e.stack=t.stack,e}if(e.has(t))return e.get(t);const r=Array.isArray(t)?[]:{};e.set(t,r);for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=l(t[n],e));return r}const f=t=>"[object Date]"===Object.prototype.toString.call(t)&&!Number.isNaN(t.getTime());const g=(()=>!1)();exports.addUnit=function(t){return Number.isNaN(Number(t))?`${t}`:`${t}px`},exports.camelCase=function(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))},exports.context={id:1e3},exports.debounce=function(t,e,r={}){let n,o,s,u=null;const c=!!i(r.leading)&&r.leading,a=!i(r.trailing)||r.trailing;function p(){void 0!==n&&(s=t.apply(o,n),n=void 0)}function l(){u=setTimeout((()=>{u=null,a&&p()}),e)}return function(...t){return n=t,o=this,null===u?(c&&p(),l()):a&&(null!==u&&(clearTimeout(u),u=null),l()),s}},exports.deepAssign=function t(e,r){return Object.keys(r).forEach((o=>{const i=e[o],s=r[o];n(i)&&n(s)?t(i,s):e[o]=s})),e},exports.deepClone=l,exports.deepMerge=function(t,e){if("object"!=typeof(t=l(t))||"object"!=typeof e)throw new Error("Both target and source must be objects.");for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},exports.defaultDisplayFormat=function(t,e){const r=(null==e?void 0:e.labelKey)||"value";return Array.isArray(t)?t.map((t=>t[r])).join(", "):t[r]},exports.getPropByPath=(t,e)=>{const r=e.split(".");try{return r.reduce(((t,e)=>null!=t?t[e]:void 0),t)}catch(n){return}},exports.getRect=function(e,r,n,o){return new Promise(((i,s)=>{let u=null;u=n?t.index.createSelectorQuery().in(n):t.index.createSelectorQuery();const a=r?"selectAll":"select",p=t=>{r&&c(t)&&t.length>0||!r&&t?i(t):s(new Error("No nodes found"))};o?u[a](e).fields({size:!0,node:!0},p).exec():u[a](e).boundingClientRect(p).exec()}))},exports.getType=o,exports.gradient=(t,e,r=2)=>{const n=u(t),o=u(e),i=(o[0]-n[0])/r,c=(o[1]-n[1])/r,a=(o[2]-n[2])/r,p=[];for(let u=0;u<r;u++)p.push(s(parseInt(String(i*u+n[0])),parseInt(String(c*u+n[1])),parseInt(String(a*u+n[2]))));return p},exports.isArray=c,exports.isDef=i,exports.isEqual=(t,e)=>{if(t===e)return!0;if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0},exports.isFunction=a,exports.isH5=g,exports.isImageUrl=function(t){return/\.(xbm|tif|pjp|apng|svgz|jpeg|jpg|heif|ico|tiff|heic|pjpeg|avif|gif|png|svg|webp|jfif|bmp|dpg|image)(?=$|[?#])/i.test(t)},exports.isNumber=function(t){return"number"===o(t)},exports.isObj=n,exports.isPromise=function(t){return!(!n(t)||!i(t))&&(a(t.then)&&a(t.catch))},exports.isString=p,exports.isUndefined=function(t){return void 0===t},exports.isVideoUrl=function(t){return/\.(ogm|webm|ogv|asx|m4v|mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|video)(?=$|[?#])/i.test(t)},exports.objToStyle=function t(e){if(c(e)){const r=e.filter((function(t){return null!=t&&""!==t})).map((function(e){return t(e)})).join(";");return r?r.endsWith(";")?r:r+";":""}if(p(e))return e?e.endsWith(";")?e:e+";":"";if(n(e)){const t=Object.keys(e).filter((function(t){return null!=e[t]&&""!==e[t]})).map((function(t){return[(r=t,r.replace(/[A-Z]/g,(function(t){return"-"+t})).toLowerCase()),e[t]].join(":");var r})).join(";");return t?t.endsWith(";")?t:t+";":""}return""},exports.omitBy=function(t,e){const r=l(t);return Object.keys(r).forEach((t=>e(r[t],t)&&delete r[t])),r},exports.padZero=(t,e=2)=>{let r=t.toString();for(;r.length<e;)r="0"+r;return r},exports.pause=(t=1e3/30)=>new e.AbortablePromise((e=>{const r=setTimeout((()=>{clearTimeout(r),e(!0)}),t)})),exports.range=(t,e,r)=>Math.min(Math.max(t,e),r),exports.uuid=function(){return r()+r()+r()+r()+r()+r()+r()+r()};

View File

@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js"),require("../../locale/index.js");

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),r=require("./useParent.js"),s=require("../wd-cell-group/types.js");exports.useCell=function(){const{parent:o,index:t}=r.useParent(s.CELL_GROUP_KEY);return{border:e.computed((()=>o&&o.props.border&&t.value))}};

View File

@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js");

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),o=require("../common/util.js"),t=require("./useRaf.js");exports.useCountDown=function(n){let a,r;const{start:s,cancel:u}=t.useRaf((function(){n.millisecond?r&&(h(c()),l.value>0&&s()):(()=>{if(r){const t=c();e=t,o=l.value,(Math.floor(e/1e3)!==Math.floor(o/1e3)||0===t)&&h(t),l.value>0&&s()}var e,o})()})),l=e.ref(n.time),i=e.computed((()=>{return{total:e=l.value,days:Math.floor(e/864e5),hours:Math.floor(e%864e5/36e5),minutes:Math.floor(e%36e5/6e4),seconds:Math.floor(e%6e4/1e3),milliseconds:Math.floor(e%1e3)};var e})),f=()=>{r=!1,u()},c=()=>Math.max(a-Date.now(),0),h=e=>{l.value=e,o.isDef(n.onChange)&&n.onChange(i.value),0===e&&(f(),o.isDef(n.onFinish)&&n.onFinish())};return e.onBeforeUnmount(f),{start:()=>{r||(a=Date.now()+l.value,r=!0,s())},pause:f,reset:(e=n.time)=>{f(),l.value=e},current:i}};

View File

@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js");

View File

@@ -0,0 +1 @@
"use strict";const n=require("../../../../common/vendor.js");exports.useParent=function(e){const t=n.inject(e,null);if(t){const e=n.getCurrentInstance(),{link:r,unlink:i,internalChildren:u}=t;r(e),n.onUnmounted((()=>i(e)));return{parent:t,index:n.computed((()=>u.indexOf(e)))}}return{parent:null,index:n.ref(-1)}};

View File

@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js");

View File

@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js");

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),n=require("../common/util.js");exports.useRaf=function(t){const u=e.ref(null),o=()=>{n.isH5&&n.isNumber(u.value)?cancelAnimationFrame(u.value):n.isDef(u.value)&&clearTimeout(u.value)};return e.onUnmounted((()=>{o()})),{start:()=>{const e=e=>{t(e)};n.isH5?u.value=requestAnimationFrame(e):u.value=setTimeout((()=>e(Date.now())),1e3/30)},cancel:o}};

View File

@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js");

View File

@@ -0,0 +1 @@
"use strict";const e=require("../common/util.js"),s=require("../../locale/index.js");exports.useTranslate=t=>{const r=t?e.camelCase(t)+".":"";return{translate:(t,...n)=>{const a=s.Locale.messages(),o=e.getPropByPath(a,r+t);return e.isFunction(o)?o(...n):e.isDef(o)?o:`${r}${t}`}}};

View File

@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js");

View File

@@ -0,0 +1 @@
"use strict";const o=require("../common/props.js"),e={...o.baseProps,plain:o.makeBooleanProp(!1),round:o.makeBooleanProp(!0),disabled:o.makeBooleanProp(!1),hairline:o.makeBooleanProp(!1),block:o.makeBooleanProp(!1),type:o.makeStringProp("primary"),size:o.makeStringProp("medium"),icon:String,classPrefix:o.makeStringProp("wd-icon"),loading:o.makeBooleanProp(!1),loadingColor:String,openType:String,hoverStopPropagation:Boolean,lang:String,sessionFrom:String,sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,appParameter:String,showMessageCard:Boolean,buttonId:String,scope:String};exports.buttonProps=e;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),o=require("../common/base64.js"),n=require("./types.js");Math||a();const a=()=>"../wd-icon/wd-icon.js",t=e.defineComponent({name:"wd-button",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"},props:n.buttonProps,emits:["click","getuserinfo","contact","getphonenumber","getrealtimephonenumber","error","launchapp","opensetting","chooseavatar","agreeprivacyauthorization"],setup(n,{emit:a}){const t=n,i=a,s=e.ref(20),r=e.ref(70),c=e.ref(""),l=e.computed((()=>`background-image: url(${c.value});`));function d(e){t.disabled||t.loading||i("click",e)}function u(e){"phoneNumber"===t.scope?g(e):"userInfo"===t.scope&&p(e)}function p(e){i("getuserinfo",e.detail)}function f(e){i("contact",e.detail)}function g(e){i("getphonenumber",e.detail)}function m(e){i("getrealtimephonenumber",e.detail)}function b(e){i("error",e.detail)}function h(e){i("launchapp",e.detail)}function v(e){i("opensetting",e.detail)}function w(e){i("chooseavatar",e.detail)}function k(e){i("agreeprivacyauthorization",e.detail)}return e.watch((()=>t.loading),(()=>{!function(){const{loadingColor:e,type:n,plain:a}=t;let i=e;if(!i)switch(n){case"primary":i="#4D80F0";break;case"success":i="#34d19d";break;case"info":case"default":i="#333";break;case"warning":i="#f0883a";break;case"error":i="#fa4350"}const s=((e="#4D80F0",o=!0)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><defs><linearGradient x1="100%" y1="0%" x2="0%" y2="0%" id="a"><stop stop-color="${o?e:"#fff"}" offset="0%" stop-opacity="0"/><stop stop-color="${o?e:"#fff"}" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M21 1c11.046 0 20 8.954 20 20s-8.954 20-20 20S1 32.046 1 21 9.954 1 21 1zm0 7C13.82 8 8 13.82 8 21s5.82 13 13 13 13-5.82 13-13S28.18 8 21 8z" fill="${o?"#fff":e}"/><path d="M4.599 21c0 9.044 7.332 16.376 16.376 16.376 9.045 0 16.376-7.332 16.376-16.376" stroke="url(#a)" stroke-width="3.5" stroke-linecap="round"/></g></svg>`)(i,!a);c.value=`"data:image/svg+xml;base64,${o.encode(s)}"`}()}),{deep:!0,immediate:!0}),(o,n)=>e.e({a:o.loading},o.loading?{b:e.s(l.value)}:o.icon?{d:e.p({"custom-class":"wd-button__icon",name:o.icon,classPrefix:o.classPrefix})}:{},{c:o.icon,e:o.buttonId,f:""+(o.disabled||o.loading?"":"wd-button--active"),g:e.s(o.customStyle),h:e.n("is-"+o.type),i:e.n("is-"+o.size),j:e.n(o.round?"is-round":""),k:e.n(o.hairline?"is-hairline":""),l:e.n(o.plain?"is-plain":""),m:e.n(o.disabled?"is-disabled":""),n:e.n(o.block?"is-block":""),o:e.n(o.loading?"is-loading":""),p:e.n(o.customClass),q:s.value,r:r.value,s:o.disabled||o.loading?void 0:o.openType,t:o.sendMessageTitle,v:o.sendMessagePath,w:o.sendMessageImg,x:o.appParameter,y:o.showMessageCard,z:o.sessionFrom,A:o.lang,B:o.hoverStopPropagation,C:o.scope,D:e.o(d),E:e.o(u),F:e.o(p),G:e.o(f),H:e.o(g),I:e.o(m),J:e.o(b),K:e.o(h),L:e.o(v),M:e.o(w),N:e.o(k)})}}),i=e._export_sfc(t,[["__scopeId","data-v-0fd72f7b"]]);wx.createComponent(i);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@@ -0,0 +1 @@
<button id="{{e}}" hover-class="{{f}}" style="{{g}}" class="{{['data-v-0fd72f7b', 'wd-button', h, i, j, k, l, m, n, o, p]}}" hover-start-time="{{q}}" hover-stay-time="{{r}}" open-type="{{s}}" send-message-title="{{t}}" send-message-path="{{v}}" send-message-img="{{w}}" app-parameter="{{x}}" show-message-card="{{y}}" session-from="{{z}}" lang="{{A}}" hover-stop-propagation="{{B}}" scope="{{C}}" bindtap="{{D}}" bindgetAuthorize="{{E}}" bindgetuserinfo="{{F}}" bindcontact="{{G}}" bindgetphonenumber="{{H}}" bindgetrealtimephonenumber="{{I}}" binderror="{{J}}" bindlaunchapp="{{K}}" bindopensetting="{{L}}" bindchooseavatar="{{M}}" bindagreeprivacyauthorization="{{N}}"><view class="wd-button__content data-v-0fd72f7b"><view wx:if="{{a}}" class="wd-button__loading data-v-0fd72f7b"><view class="wd-button__loading-svg data-v-0fd72f7b" style="{{b}}"></view></view><wd-icon wx:elif="{{c}}" class="data-v-0fd72f7b" u-i="0fd72f7b-0" bind:__l="__l" u-p="{{d}}"></wd-icon><view class="wd-button__text data-v-0fd72f7b"><slot/></view></view></button>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";const o=Symbol("wd-cell-group");exports.CELL_GROUP_KEY=o;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../common/props.js"),o={...e.baseProps,title:String,value:e.makeNumericProp(""),icon:String,iconSize:e.numericProp,label:String,isLink:e.makeBooleanProp(!1),to:String,replace:e.makeBooleanProp(!1),clickable:e.makeBooleanProp(!1),size:String,border:e.makeBooleanProp(void 0),titleWidth:String,center:e.makeBooleanProp(!1),required:e.makeBooleanProp(!1),vertical:e.makeBooleanProp(!1),prop:String,rules:e.makeArrayProp(),customIconClass:e.makeStringProp(""),customLabelClass:e.makeStringProp(""),customValueClass:e.makeStringProp(""),customTitleClass:e.makeStringProp(""),valueAlign:e.makeStringProp("right"),ellipsis:e.makeBooleanProp(!1),useTitleSlot:e.makeBooleanProp(!0),markerSide:e.makeStringProp("before")};exports.cellProps=o;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),l=require("../composables/useCell.js"),s=require("../composables/useParent.js"),t=require("../wd-form/types.js"),r=require("./types.js"),i=require("../common/util.js");Math||o();const o=()=>"../wd-icon/wd-icon.js",a=e.defineComponent({name:"wd-cell",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"},props:r.cellProps,emits:["click"],setup(r,{emit:o}){const a=r,c=o,n=e.useSlots(),u=l.useCell(),d=e.computed((()=>Boolean(i.isDef(a.border)?a.border:u.border.value))),{parent:p}=s.useParent(t.FORM_KEY),m=e.computed((()=>p&&a.prop&&p.errorMessages&&p.errorMessages[a.prop]?p.errorMessages[a.prop]:"")),v=e.computed((()=>{let e=!1;if(p&&p.props.rules){const l=p.props.rules;for(const s in l)Object.prototype.hasOwnProperty.call(l,s)&&s===a.prop&&Array.isArray(l[s])&&(e=l[s].some((e=>e.required)))}return a.required||a.rules.some((e=>e.required))||e})),b=e.computed((()=>{const e=n.icon||a.icon,l=n.title&&a.useTitleSlot||a.title,s=n.label||a.label;return e||l||s}));function w(){const l=a.to;(a.clickable||a.isLink)&&c("click"),l&&a.isLink&&(a.replace?e.index.redirectTo({url:l}):e.index.navigateTo({url:l}))}return(l,s)=>e.e({a:b.value},b.value?e.e({b:v.value&&"before"===l.markerSide},(v.value&&l.markerSide,{}),{c:l.icon},l.icon?{d:e.p({name:l.icon,size:l.iconSize,"custom-class":`wd-cell__icon ${l.customIconClass}`})}:{},{e:l.useTitleSlot&&l.$slots.title},l.useTitleSlot&&l.$slots.title?{}:l.title?{g:e.t(l.title),h:e.n(l.customTitleClass)}:{},{f:l.title,i:l.label},l.label?{j:e.t(l.label),k:e.n(`wd-cell__label ${l.customLabelClass}`)}:{},{l:v.value&&"after"===l.markerSide},(v.value&&l.markerSide,{}),{m:e.s(l.titleWidth?"min-width:"+l.titleWidth+";max-width:"+l.titleWidth+";":"")}):{},{n:e.t(l.value),o:e.n(`wd-cell__value ${l.customValueClass} wd-cell__value--${l.valueAlign} ${l.ellipsis?"wd-cell__value--ellipsis":""}`),p:l.isLink},l.isLink?{q:e.p({"custom-class":"wd-cell__arrow-right",name:"arrow-right"})}:{},{r:m.value},m.value?{s:e.t(m.value)}:{},{t:e.n(l.vertical?"is-vertical":""),v:e.n(d.value?"is-border":""),w:e.n(l.size?"is-"+l.size:""),x:e.n(l.center?"is-center":""),y:e.n(l.customClass),z:e.s(l.customStyle),A:l.isLink||l.clickable?"is-hover":"none",B:e.o(w)})}}),c=e._export_sfc(a,[["__scopeId","data-v-7aeca375"]]);wx.createComponent(c);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-7aeca375', 'wd-cell', v, w, x, y]}}" style="{{z}}" hover-class="{{A}}" hover-stay-time="{{70}}" bindtap="{{B}}"><view class="{{['data-v-7aeca375', 'wd-cell__wrapper', t]}}"><view wx:if="{{a}}" class="wd-cell__left data-v-7aeca375" style="{{m}}"><text wx:if="{{b}}" class="wd-cell__required wd-cell__required--left data-v-7aeca375">*</text><block wx:if="{{$slots.icon}}"><slot name="icon"></slot></block><block wx:else><wd-icon wx:if="{{c}}" class="data-v-7aeca375" u-i="7aeca375-0" bind:__l="__l" u-p="{{d}}"></wd-icon></block><view class="wd-cell__title data-v-7aeca375"><slot wx:if="{{e}}" name="title"></slot><text wx:elif="{{f}}" class="{{['data-v-7aeca375', h]}}">{{g}}</text><block wx:if="{{$slots.label}}"><slot name="label"></slot></block><block wx:else><view wx:if="{{i}}" class="{{['data-v-7aeca375', k]}}">{{j}}</view></block></view><text wx:if="{{l}}" class="wd-cell__required data-v-7aeca375">*</text></view><view class="wd-cell__right data-v-7aeca375"><view class="wd-cell__body data-v-7aeca375"><view class="{{['data-v-7aeca375', o]}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else>{{n}}</block></view><wd-icon wx:if="{{p}}" class="data-v-7aeca375" u-i="7aeca375-1" bind:__l="__l" u-p="{{q}}"/><slot wx:else name="right-icon"/></view><view wx:if="{{r}}" class="wd-cell__error-message data-v-7aeca375">{{s}}</view></view></view></view>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";const e=require("../common/props.js"),r={...e.baseProps,modelValue:e.makeRequiredProp([String,Number]),loading:e.makeBooleanProp(!1),loadingColor:e.makeStringProp("#4D80F0"),columnsHeight:e.makeNumberProp(217),itemHeight:e.makeNumberProp(35),valueKey:e.makeStringProp("value"),labelKey:e.makeStringProp("label"),type:e.makeStringProp("datetime"),filter:Function,formatter:Function,columnFormatter:Function,minDate:e.makeNumberProp(new Date((new Date).getFullYear()-10,0,1).getTime()),maxDate:e.makeNumberProp(new Date((new Date).getFullYear()+10,11,31).getTime()),minHour:e.makeNumberProp(0),maxHour:e.makeNumberProp(23),minMinute:e.makeNumberProp(0),maxMinute:e.makeNumberProp(59),useSecond:e.makeBooleanProp(!1),minSecond:e.makeNumberProp(0),maxSecond:e.makeNumberProp(59),immediateChange:e.makeBooleanProp(!1)};exports.datetimePickerViewProps=r;

View File

@@ -0,0 +1 @@
"use strict";exports.getPickerValue=function(e,t,s=!1){const n=[],u=new Date(e);if("time"===t){const t=String(e).split(":");n.push(parseInt(t[0]),parseInt(t[1])),s&&t[2]&&n.push(parseInt(t[2]))}else n.push(u.getFullYear(),u.getMonth()+1),"date"===t?n.push(u.getDate()):"datetime"===t&&(n.push(u.getDate(),u.getHours(),u.getMinutes()),s&&n.push(u.getSeconds()));return n};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-picker-view": "../wd-picker-view/wd-picker-view"
}
}

View File

@@ -0,0 +1 @@
<wd-picker-view wx:if="{{f}}" class="r" u-r="datePickerview" bindchange="{{b}}" bindpickstart="{{c}}" bindpickend="{{d}}" u-i="a76d8a1e-0" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"></wd-picker-view>

View File

@@ -0,0 +1 @@
"use strict";const e=require("../common/props.js"),r={...e.baseProps,label:String,placeholder:String,disabled:e.makeBooleanProp(!1),readonly:e.makeBooleanProp(!1),loading:e.makeBooleanProp(!1),loadingColor:e.makeStringProp("#4D80F0"),title:String,cancelButtonText:String,confirmButtonText:String,required:e.makeBooleanProp(!1),size:String,labelWidth:e.makeStringProp("33%"),error:e.makeBooleanProp(!1),alignRight:e.makeBooleanProp(!1),closeOnClickModal:e.makeBooleanProp(!0),safeAreaInsetBottom:e.makeBooleanProp(!0),ellipsis:e.makeBooleanProp(!1),columnsHeight:e.makeNumberProp(217),valueKey:e.makeStringProp("value"),labelKey:e.makeStringProp("label"),modelValue:e.makeRequiredProp([String,Number,Array]),type:e.makeStringProp("datetime"),minDate:e.makeNumberProp(new Date((new Date).getFullYear()-10,0,1).getTime()),maxDate:e.makeNumberProp(new Date((new Date).getFullYear()+10,11,31,23,59,59).getTime()),minHour:e.makeNumberProp(0),maxHour:e.makeNumberProp(23),minMinute:e.makeNumberProp(0),maxMinute:e.makeNumberProp(59),useSecond:e.makeBooleanProp(!1),minSecond:e.makeNumberProp(0),maxSecond:e.makeNumberProp(59),filter:Function,formatter:Function,displayFormat:Function,beforeConfirm:Function,displayFormatTabLabel:Function,defaultValue:[String,Number,Array],zIndex:e.makeNumberProp(15),prop:String,rules:e.makeArrayProp(),customCellClass:e.makeStringProp(""),customViewClass:e.makeStringProp(""),customLabelClass:e.makeStringProp(""),customValueClass:e.makeStringProp(""),immediateChange:e.makeBooleanProp(!1),rootPortal:e.makeBooleanProp(!1),clearable:e.makeBooleanProp(!1),markerSide:e.makeStringProp("before")};exports.datetimePickerProps=r;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"wd-popup": "../wd-popup/wd-popup",
"wd-datetime-picker-view": "../wd-datetime-picker-view/wd-datetime-picker-view",
"wd-cell": "../wd-cell/wd-cell",
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-593b2a0d', ad]}}" style="{{ae}}"><wd-cell wx:if="{{a}}" class="data-v-593b2a0d" u-s="{{['title','d','right-icon']}}" bindclick="{{r}}" u-i="593b2a0d-0" bind:__l="__l" u-p="{{s}}"><view wx:if="{{b}}" slot="title"><slot name="label"></slot></view><view><block wx:if="{{c}}"><view wx:if="{{d}}" class="data-v-593b2a0d"><text class="{{['data-v-593b2a0d', f]}}">{{e}}</text> {{g}} <text class="{{['data-v-593b2a0d', i]}}">{{h}}</text></view><view wx:else class="wd-datetime-picker__cell-placeholder data-v-593b2a0d">{{j}}</view></block><view wx:else class="{{['data-v-593b2a0d', l]}}">{{k}}</view></view><view slot="right-icon"><wd-icon wx:if="{{m}}" class="data-v-593b2a0d" u-i="593b2a0d-1,593b2a0d-0" bind:__l="__l" u-p="{{n}}"/><view wx:elif="{{o}}" class="data-v-593b2a0d" catchtap="{{q}}"><wd-icon wx:if="{{p}}" class="data-v-593b2a0d" u-i="593b2a0d-2,593b2a0d-0" bind:__l="__l" u-p="{{p}}"/></view></view></wd-cell><view wx:else class="data-v-593b2a0d" bindtap="{{t}}"><slot></slot></view><wd-popup wx:if="{{ac}}" class="data-v-593b2a0d" u-s="{{['d']}}" bindclose="{{aa}}" u-i="593b2a0d-3" bind:__l="__l" bindupdateModelValue="{{ab}}" u-p="{{ac}}"><view class="wd-datetime-picker__wraper data-v-593b2a0d"><view class="wd-datetime-picker__toolbar data-v-593b2a0d" bindtouchmove="{{C}}"><view class="wd-datetime-picker__action wd-datetime-picker__action--cancel data-v-593b2a0d" bindtap="{{w}}">{{v}}</view><view wx:if="{{x}}" class="wd-datetime-picker__title data-v-593b2a0d">{{y}}</view><view class="{{['data-v-593b2a0d', A]}}" bindtap="{{B}}">{{z}}</view></view><view wx:if="{{D}}" class="wd-datetime-picker__region-tabs data-v-593b2a0d"><view class="{{['data-v-593b2a0d', G]}}" bindtap="{{H}}"><view class="data-v-593b2a0d">{{E}}</view><view class="wd-datetime-picker__region-time data-v-593b2a0d">{{F}}</view></view><view class="{{['data-v-593b2a0d', K]}}" bindtap="{{L}}"><view class="data-v-593b2a0d">{{I}}</view><view class="wd-datetime-picker__region-time data-v-593b2a0d">{{J}}</view></view></view><view class="{{['data-v-593b2a0d', S]}}"><wd-datetime-picker-view wx:if="{{R}}" class="r data-v-593b2a0d" u-r="datetimePickerView" bindchange="{{N}}" bindpickstart="{{O}}" bindpickend="{{P}}" u-i="593b2a0d-4,593b2a0d-3" bind:__l="__l" bindupdateModelValue="{{Q}}" u-p="{{R}}"/></view><view class="{{['data-v-593b2a0d', Z]}}"><wd-datetime-picker-view wx:if="{{Y}}" class="r data-v-593b2a0d" u-r="datetimePickerView1" bindchange="{{U}}" bindpickstart="{{V}}" bindpickend="{{W}}" u-i="593b2a0d-5,593b2a0d-3" bind:__l="__l" bindupdateModelValue="{{X}}" u-p="{{Y}}"/></view></view></wd-popup></view>

View File

@@ -0,0 +1 @@
.wot-theme-dark .wd-datetime-picker__placeholder.data-v-593b2a0d{color:var(--wot-dark-color-gray, var(--wot-color-secondary, #595959))}.wot-theme-dark .wd-datetime-picker.data-v-593b2a0d .wd-datetime-picker__arrow,.wot-theme-dark .wd-datetime-picker.data-v-593b2a0d .wd-datetime-picker__clear,.wot-theme-dark .wd-datetime-picker__action--cancel.data-v-593b2a0d,.wot-theme-dark .wd-datetime-picker__region.data-v-593b2a0d{color:var(--wot-dark-color, var(--wot-color-white, white))}.wot-theme-dark .wd-datetime-picker__region.is-active.data-v-593b2a0d{background:var(--wot-picker-region-bg-active-color, var(--wot-color-theme, #4d80f0));color:var(--wot-dark-color, var(--wot-color-white, white))}.data-v-593b2a0d .wd-datetime-picker__cell.is-disabled .wd-cell__value{color:var(--wot-input-disabled-color, #d9d9d9);cursor:not-allowed}.data-v-593b2a0d .wd-datetime-picker__cell.is-error .wd-cell__value,.data-v-593b2a0d .wd-datetime-picker__cell.is-error .wd-datetime-picker__arrow{color:var(--wot-input-error-color, var(--wot-color-danger, #fa4350))}.data-v-593b2a0d .wd-datetime-picker__cell.is-large .wd-datetime-picker__arrow{font-size:var(--wot-cell-icon-size-large, 18px)}.data-v-593b2a0d .wd-datetime-picker__cell .wd-cell__value--ellipsis view{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.data-v-593b2a0d .wd-datetime-picker__cell .wd-cell__value--ellipsis text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.wd-datetime-picker__placeholder.data-v-593b2a0d{color:var(--wot-input-placeholder-color, #bfbfbf)}.data-v-593b2a0d .wd-datetime-picker__arrow{display:block;font-size:var(--wot-cell-icon-size, 16px);color:var(--wot-cell-arrow-color, rgba(0, 0, 0, .25));line-height:var(--wot-cell-line-height, 24px)}.data-v-593b2a0d .wd-datetime-picker__clear{display:block;font-size:var(--wot-cell-icon-size, 16px);color:var(--wot-cell-clear-color, #585858);line-height:var(--wot-cell-line-height, 24px)}.data-v-593b2a0d .wd-datetime-picker__popup{border-radius:16px 16px 0 0}.wd-datetime-picker__wraper.data-v-593b2a0d{padding-bottom:var(--window-bottom)}.wd-datetime-picker__toolbar.data-v-593b2a0d{position:relative;display:flex;font-size:var(--wot-picker-toolbar-fs, var(--wot-fs-title, 16px));height:var(--wot-picker-toolbar-height, 54px);line-height:var(--wot-picker-action-height, 16px);justify-content:space-between;align-items:center;box-sizing:border-box}.wd-datetime-picker__action.data-v-593b2a0d{display:block;border:none;outline:none;font-size:var(--wot-picker-toolbar-fs, var(--wot-fs-title, 16px));color:var(--wot-picker-toolbar-finish-color, var(--wot-color-theme, #4d80f0));background:transparent;padding:24px 15px 14px}.wd-datetime-picker__action--cancel.data-v-593b2a0d{color:var(--wot-picker-toolbar-cancel-color, #666666)}.wd-datetime-picker__action.is-loading.data-v-593b2a0d{color:var(--wot-picker-loading-button-color, rgba(0, 0, 0, .25))}.wd-datetime-picker__title.data-v-593b2a0d{display:block;float:1;color:var(--wot-picker-toolbar-title-color, rgba(0, 0, 0, .85))}.wd-datetime-picker__region-tabs.data-v-593b2a0d{display:flex}.wd-datetime-picker__region.data-v-593b2a0d{width:50%;display:inline-block;color:var(--wot-picker-region-color, rgba(0, 0, 0, .45));text-align:center;padding:14px 0;font-size:var(--wot-picker-region-fs, 14px);line-height:16px;transition:all .15s ease-out}.wd-datetime-picker__region.is-active.data-v-593b2a0d{background:var(--wot-picker-region-bg-active-color, var(--wot-color-theme, #4d80f0));color:var(--wot-color-white, white)}.wd-datetime-picker__region-time.data-v-593b2a0d{font-size:16px;margin-top:2px}.wd-datetime-picker__hidden.data-v-593b2a0d{visibility:hidden;overflow:hidden;height:0}.wd-datetime-picker__show.data-v-593b2a0d{visibility:visible;height:auto}

View File

@@ -0,0 +1 @@
"use strict";const o=Symbol("wd-form");exports.FORM_KEY=o;

View File

@@ -0,0 +1 @@
"use strict";const r=require("../common/props.js"),o={...r.baseProps,name:r.makeRequiredProp(String),color:String,size:r.numericProp,classPrefix:r.makeStringProp("wd-icon")};exports.iconProps=o;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),o=require("../common/util.js"),s=require("./types.js"),t=e.defineComponent({name:"wd-icon",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:s.iconProps,emits:["click","touch"],setup(s,{emit:t}){const c=s,n=t,a=e.computed((()=>o.isDef(c.name)&&c.name.includes("/"))),i=e.computed((()=>{const e=c.classPrefix;return`${e} ${c.customClass} ${a.value?"wd-icon--image":e+"-"+c.name}`})),r=e.computed((()=>{const e={};return c.color&&(e.color=c.color),c.size&&(e["font-size"]=o.addUnit(c.size)),`${o.objToStyle(e)} ${c.customStyle}`}));function u(e){n("click",e)}return(o,s)=>e.e({a:a.value},a.value?{b:o.name}:{},{c:e.o(u),d:e.n(i.value),e:e.s(r.value)})}}),c=e._export_sfc(t,[["__scopeId","data-v-8d8eac46"]]);wx.createComponent(c);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view bindtap="{{c}}" class="{{['data-v-8d8eac46', d]}}" style="{{e}}"><image wx:if="{{a}}" class="wd-icon__image data-v-8d8eac46" src="{{b}}"></image></view>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";const e=require("../common/props.js"),o={...e.baseProps,modelValue:e.makeRequiredProp(e.numericProp),min:e.makeNumberProp(1),max:e.makeNumberProp(Number.MAX_SAFE_INTEGER),step:e.makeNumberProp(1),stepStrictly:e.makeBooleanProp(!1),precision:e.makeNumericProp(0),disabled:e.makeBooleanProp(!1),disableInput:e.makeBooleanProp(!1),disableMinus:e.makeBooleanProp(!1),disablePlus:e.makeBooleanProp(!1),withoutInput:e.makeBooleanProp(!1),inputWidth:e.makeNumericProp(36),allowNull:e.makeBooleanProp(!1),placeholder:e.makeStringProp(""),adjustPosition:e.makeBooleanProp(!0),beforeChange:Function,longPress:e.makeBooleanProp(!1),immediateChange:e.makeBooleanProp(!0),updateOnInit:e.makeBooleanProp(!0),inputType:e.makeStringProp("digit")};exports.inputNumberProps=o;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),t=require("../common/util.js"),n=require("./types.js"),i=require("../common/interceptor.js");Math||u();const u=()=>"../wd-icon/wd-icon.js",s=e.defineComponent({name:"wd-input-number",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:n.inputNumberProps,emits:["change","focus","blur","update:modelValue"],setup(n,{emit:u}){const s=n,r=u,o=e.ref(function(){if(!s.updateOnInit)return function(e){if(s.allowNull&&(!t.isDef(e)||""===e))return"";if(!t.isDef(e)||""===e)return s.min;let n=Number(e);if(isNaN(n))return s.min;const i=Number(s.precision);if(!t.isDef(s.precision))return n;return 0===i?Number(n.toFixed(0)):n.toFixed(i)}(s.modelValue);const e=h(s.modelValue);t.isEqual(String(e),String(s.modelValue))||r("update:modelValue",e);return e}());let a=null;const l=e.computed((()=>{const e=m(o.value);return s.disabled||e<=s.min||v(e,-s.step)<s.min})),c=e.computed((()=>{const e=m(o.value);return s.disabled||e>=s.max||v(e,s.step)>s.max}));function d(e){if(!t.isDef(e))return 0;const n=e.toString(),i=n.indexOf(".");return-1===i?0:n.length-i-1}function p(e){const t=Number(s.precision);return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}function m(e){if(s.allowNull&&(!t.isDef(e)||""===e))return NaN;if(!t.isDef(e)||""===e)return s.min;let n=String(e);if(n.endsWith(".")&&(n=n.slice(0,-1)),n.startsWith(".")&&(n="0"+n),n.startsWith("-.")&&(n="-0"+n.substring(1)),"-"===n||""===n)return s.min;let i=Number(n);return isNaN(i)&&(i=s.min),f(i)}function f(e){let n=e;if(s.stepStrictly){const e=d(s.step),t=Math.pow(10,e);n=Math.round(n/s.step)*t*s.step/t}return n=s.stepStrictly?function(e,t,n){if(e>=t&&e<=n)return e;const i=d(s.step),u=Math.pow(10,i);if(e<t){const e=p(Math.ceil(t*u/(s.step*u))*s.step*u/u);if(e>n){return p(Math.floor(n*u/(s.step*u))*s.step*u/u)}return e}if(e>n){const e=p(Math.floor(n*u/(s.step*u))*s.step*u/u);if(e<t){return p(Math.ceil(t*u/(s.step*u))*s.step*u/u)}return e}return e}(n,s.min,s.max):Math.min(Math.max(n,s.min),s.max),t.isDef(s.precision)&&(n=p(n)),n}function h(e){if(s.allowNull&&(!t.isDef(e)||""===e))return"";const n=m(e),i=Number(s.precision);return t.isDef(s.precision)?0===i?Number(n.toFixed(0)):n.toFixed(i):n}function b(e){if(s.allowNull&&(!t.isDef(e)||""===e)){if(t.isEqual("",String(s.modelValue)))return void(o.value="");const e=()=>{o.value="",r("update:modelValue",""),r("change",{value:""})};return void i.callInterceptor(s.beforeChange,{args:[""],done:e})}const n=m(e),u=h(e);if(t.isEqual(String(n),String(s.modelValue)))return void(o.value=u);i.callInterceptor(s.beforeChange,{args:[n],done:()=>{o.value=u,r("update:modelValue",n),r("change",{value:n})}})}function v(e,t){const n=Number(e);if(isNaN(n))return f(s.min);const i=Math.max(d(n),d(t)),u=Math.pow(10,i);return f((n*u+t*u)/u)}function g(e){const t="add"===e?s.step:-s.step;if(t<0&&(l.value||s.disableMinus)||t>0&&(c.value||s.disablePlus))return;b(v(o.value,t))}function w(t){const n=t.detail.value||"";o.value=n,e.nextTick$1((()=>{if(""===n)return o.value="",void(s.immediateChange&&s.allowNull&&b(""));const e=function(e){if(!e)return"";let t=e.replace(/[^\d.-]/g,"");const n=t.startsWith("-");if(t=t.replace(/-/g,""),n&&(t="-"+t),Number(s.precision)>0){const e=t.split(".");e.length>2&&(t=e[0]+"."+e.slice(1).join(""))}else t=t.split(".")[0];return t.startsWith(".")?"0"+t:t.startsWith("-.")?"-0"+t.substring(1):t}(n);Number(s.precision)>0&&function(e){if(!e)return!1;const t=String(e);return t.endsWith(".")||t.startsWith(".")||t.startsWith("-.")||"-"===t||Number(s.precision)>0&&-1===t.indexOf(".")}(e)?o.value=e:(o.value=e,s.immediateChange&&b(e))}))}function N(e){const t=e.detail.value||"";b(t),r("blur",{value:t})}function x(e){r("focus",e.detail)}function M(e){W(),a=setTimeout((()=>{g(e),M(e)}),250)}function S(e){s.longPress&&(W(),a=setTimeout((()=>{g(e),M(e)}),600))}function _(){s.longPress&&W()}function W(){a&&(clearTimeout(a),a=null)}return e.watch((()=>s.modelValue),(e=>{o.value=h(e)})),e.watch([()=>s.max,()=>s.min,()=>s.precision],(()=>{const e=m(o.value);o.value=h(e)})),(t,n)=>e.e({a:e.p({name:"decrease","custom-class":"wd-input-number__action-icon"}),b:e.n("wd-input-number__action "+(l.value||t.disableMinus?"is-disabled":"")),c:e.o((e=>g("sub"))),d:e.o((e=>S("sub"))),e:e.o(_),f:!t.withoutInput},t.withoutInput?{}:{g:e.s(""+(t.inputWidth?"width: "+t.inputWidth:"")),h:t.inputType,i:t.precision?"decimal":"numeric",j:t.disabled||t.disableInput,k:String(o.value),l:t.placeholder,m:t.adjustPosition,n:e.o(w),o:e.o(x),p:e.o(N),q:e.o((()=>{}))},{r:e.p({name:"add","custom-class":"wd-input-number__action-icon"}),s:e.n("wd-input-number__action "+(c.value||t.disablePlus?"is-disabled":"")),t:e.o((e=>g("add"))),v:e.o((e=>S("add"))),w:e.o(_),x:e.n(`wd-input-number ${t.customClass} ${t.disabled?"is-disabled":""} ${t.withoutInput?"is-without-input":""}`),y:e.s(t.customStyle)})}}),r=e._export_sfc(s,[["__scopeId","data-v-5a101a5e"]]);wx.createComponent(r);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-5a101a5e', x]}}" style="{{y}}"><view class="{{['data-v-5a101a5e', b]}}" bindtap="{{c}}" bindtouchstart="{{d}}" catchtouchend="{{e}}"><wd-icon wx:if="{{a}}" class="data-v-5a101a5e" u-i="5a101a5e-0" bind:__l="__l" u-p="{{a}}"></wd-icon></view><view wx:if="{{f}}" class="wd-input-number__inner data-v-5a101a5e" catchtap="{{q}}"><block wx:if="{{r0}}"><input class="wd-input-number__input data-v-5a101a5e" style="{{g}}" type="{{h}}" input-mode="{{i}}" disabled="{{j}}" value="{{k}}" placeholder="{{l}}" adjust-position="{{m}}" bindinput="{{n}}" bindfocus="{{o}}" bindblur="{{p}}"/></block><view class="wd-input-number__input-border data-v-5a101a5e"></view></view><view class="{{['data-v-5a101a5e', s]}}" bindtap="{{t}}" bindtouchstart="{{v}}" catchtouchend="{{w}}"><wd-icon wx:if="{{r}}" class="data-v-5a101a5e" u-i="5a101a5e-1" bind:__l="__l" u-p="{{r}}"></wd-icon></view></view>

View File

@@ -0,0 +1 @@
.wot-theme-dark .wd-input-number__action.data-v-5a101a5e{color:var(--wot-dark-color, var(--wot-color-white, white))}.wot-theme-dark .wd-input-number__action.is-disabled.data-v-5a101a5e{color:var(--wot-dark-color-gray, var(--wot-color-secondary, #595959))}.wot-theme-dark .wd-input-number__input.data-v-5a101a5e{color:var(--wot-dark-color, var(--wot-color-white, white))}.wot-theme-dark .wd-input-number.is-disabled .wd-input-number__input.data-v-5a101a5e,.wot-theme-dark .wd-input-number.is-disabled .wd-input-number__sub.data-v-5a101a5e,.wot-theme-dark .wd-input-number.is-disabled .wd-input-number__add.data-v-5a101a5e{color:var(--wot-dark-color-gray, var(--wot-color-secondary, #595959))}.wd-input-number.data-v-5a101a5e{display:inline-block;-webkit-user-select:none;user-select:none;line-height:1.15}.wd-input-number__action.data-v-5a101a5e{position:relative;display:inline-block;width:var(--wot-input-number-btn-width, 26px);height:var(--wot-input-number-height, 24px);vertical-align:middle;color:var(--wot-input-number-icon-color, rgba(0, 0, 0, .65));-webkit-tap-highlight-color:transparent;box-sizing:border-box}.wd-input-number__action.data-v-5a101a5e:after{position:absolute;content:"";width:calc(200% - 2px);height:calc(200% - 2px);left:0;top:0;border:1px solid var(--wot-input-number-border-color, #e8e8e8);border-top-left-radius:calc(var(--wot-input-number-radius, 4px) * 2);border-bottom-left-radius:calc(var(--wot-input-number-radius, 4px) * 2);transform:scale(.5);transform-origin:left top}.wd-input-number__action.data-v-5a101a5e:last-child:after{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:calc(var(--wot-input-number-radius, 4px) * 2);border-bottom-right-radius:calc(var(--wot-input-number-radius, 4px) * 2)}.wd-input-number__action.is-disabled.data-v-5a101a5e{color:var(--wot-input-number-disabled-color, rgba(0, 0, 0, .25))}.wd-input-number__inner.data-v-5a101a5e{position:relative;display:inline-block;vertical-align:middle}.wd-input-number__input.data-v-5a101a5e{position:relative;display:block;width:var(--wot-input-number-input-width, 36px);height:var(--wot-input-number-height, 24px);padding:0 2px;box-sizing:border-box;z-index:1;background:transparent;border:none;outline:none;text-align:center;color:var(--wot-input-number-color, #262626);font-size:var(--wot-input-number-fs, 12px);-webkit-appearance:none;-webkit-tap-highlight-color:transparent}.wd-input-number__input-border.data-v-5a101a5e{position:absolute;width:100%;height:calc(200% - 2px);left:0;top:0;border-top:1px solid var(--wot-input-number-border-color, #e8e8e8);border-bottom:1px solid var(--wot-input-number-border-color, #e8e8e8);transform:scaleY(.5);transform-origin:left top;z-index:0}.data-v-5a101a5e .wd-input-number__action-icon{position:absolute;display:inline-block;font-size:var(--wot-input-number-icon-size, 14px);width:var(--wot-input-number-icon-size, 14px);height:var(--wot-input-number-icon-size, 14px);left:50%;top:50%;transform:translate(-50%,-50%)}.wd-input-number.is-disabled .wd-input-number__input.data-v-5a101a5e{color:var(--wot-input-number-disabled-color, rgba(0, 0, 0, .25));z-index:inherit}.wd-input-number.is-disabled .wd-input-number__sub.data-v-5a101a5e,.wd-input-number.is-disabled .wd-input-number__add.data-v-5a101a5e{color:var(--wot-input-number-disabled-color, rgba(0, 0, 0, .25))}.wd-input-number.is-without-input .wd-input-number__action.data-v-5a101a5e:last-child:after{border-left:none}

View File

@@ -0,0 +1 @@
"use strict";const e=require("../common/props.js"),o={...e.baseProps,customInputClass:e.makeStringProp(""),customLabelClass:e.makeStringProp(""),placeholder:String,placeholderStyle:String,placeholderClass:e.makeStringProp(""),cursorSpacing:e.makeNumberProp(0),cursor:e.makeNumberProp(-1),selectionStart:e.makeNumberProp(-1),selectionEnd:e.makeNumberProp(-1),adjustPosition:e.makeBooleanProp(!0),holdKeyboard:e.makeBooleanProp(!1),confirmType:e.makeStringProp("done"),confirmHold:e.makeBooleanProp(!1),focus:e.makeBooleanProp(!1),type:e.makeStringProp("text"),maxlength:{type:Number,default:-1},disabled:e.makeBooleanProp(!1),alwaysEmbed:e.makeBooleanProp(!1),alignRight:e.makeBooleanProp(!1),modelValue:e.makeNumericProp(""),showPassword:e.makeBooleanProp(!1),clearable:e.makeBooleanProp(!1),readonly:e.makeBooleanProp(!1),prefixIcon:String,suffixIcon:String,showWordLimit:e.makeBooleanProp(!1),label:String,labelWidth:e.makeStringProp(""),size:String,error:e.makeBooleanProp(!1),center:e.makeBooleanProp(!1),noBorder:e.makeBooleanProp(!1),required:e.makeBooleanProp(!1),prop:String,rules:e.makeArrayProp(),clearTrigger:e.makeStringProp("always"),focusWhenClear:e.makeBooleanProp(!0),ignoreCompositionEvent:e.makeBooleanProp(!0),inputmode:e.makeStringProp("text"),markerSide:e.makeStringProp("before")};exports.inputProps=o;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-21702c63', am]}}" style="{{an}}" bindtap="{{ao}}"><view wx:if="{{a}}" class="{{['data-v-21702c63', k]}}" style="{{l}}"><text wx:if="{{b}}" class="wd-input__required wd-input__required--left data-v-21702c63">*</text><view wx:if="{{c}}" class="wd-input__prefix data-v-21702c63"><wd-icon wx:if="{{d}}" class="data-v-21702c63" bindclick="{{e}}" u-i="21702c63-0" bind:__l="__l" u-p="{{f}}"/><slot wx:else name="prefix"></slot></view><view class="wd-input__label-inner data-v-21702c63"><text wx:if="{{g}}" class="data-v-21702c63">{{h}}</text><slot wx:elif="{{i}}" name="label"></slot></view><text wx:if="{{j}}" class="wd-input__required data-v-21702c63">*</text></view><view class="wd-input__body data-v-21702c63"><view class="wd-input__value data-v-21702c63"><view wx:if="{{m}}" class="wd-input__prefix data-v-21702c63"><wd-icon wx:if="{{n}}" class="data-v-21702c63" bindclick="{{o}}" u-i="21702c63-1" bind:__l="__l" u-p="{{p}}"/><slot wx:else name="prefix"></slot></view><block wx:if="{{r0}}"><input class="{{['data-v-21702c63', 'wd-input__inner', q, r, s, t]}}" type="{{v}}" password="{{w}}" placeholder="{{x}}" disabled="{{y}}" maxlength="{{z}}" focus="{{A}}" confirm-type="{{B}}" confirm-hold="{{C}}" cursor="{{D}}" cursor-spacing="{{E}}" placeholder-style="{{F}}" selection-start="{{G}}" selection-end="{{H}}" adjust-position="{{I}}" hold-keyboard="{{J}}" always-embed="{{K}}" placeholder-class="{{L}}" ignoreCompositionEvent="{{M}}" inputmode="{{N}}" bindinput="{{O}}" bindfocus="{{P}}" bindblur="{{Q}}" bindconfirm="{{R}}" bindkeyboardheightchange="{{S}}" value="{{T}}"/></block><view wx:if="{{U}}" class="wd-input__readonly-mask data-v-21702c63"/><view wx:if="{{V}}" class="wd-input__suffix data-v-21702c63"><wd-icon wx:if="{{W}}" class="data-v-21702c63" bindclick="{{X}}" u-i="21702c63-2" bind:__l="__l" u-p="{{Y}}"/><wd-icon wx:if="{{Z}}" class="data-v-21702c63" bindclick="{{aa}}" u-i="21702c63-3" bind:__l="__l" u-p="{{ab}}"/><view wx:if="{{ac}}" class="wd-input__count data-v-21702c63"><text class="{{['data-v-21702c63', ae, af]}}">{{ad}}</text> /{{ag}}</view><wd-icon wx:if="{{ah}}" class="data-v-21702c63" bindclick="{{ai}}" u-i="21702c63-4" bind:__l="__l" u-p="{{aj}}"/><slot wx:else name="suffix"></slot></view></view><view wx:if="{{ak}}" class="wd-input__error-message data-v-21702c63">{{al}}</view></view></view>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";const r=require("../common/props.js"),o={...r.baseProps,type:r.makeStringProp("ring"),color:r.makeStringProp("#4D80F0"),size:r.makeNumericProp("")};exports.loadingProps=o;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),t=require("../common/base64.js"),o=require("../common/util.js"),s=require("./types.js"),i=e.defineComponent({name:"wd-loading",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:s.loadingProps,setup(s){const i=o.context.id++,n=o.context.id++,r=o.context.id++,a={outline:(e="#4D80F0")=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><defs><linearGradient x1="100%" y1="0%" x2="0%" y2="0%" id="${i}"><stop stop-color="#FFF" offset="0%" stop-opacity="0"/><stop stop-color="#FFF" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M21 1c11.046 0 20 8.954 20 20s-8.954 20-20 20S1 32.046 1 21 9.954 1 21 1zm0 7C13.82 8 8 13.82 8 21s5.82 13 13 13 13-5.82 13-13S28.18 8 21 8z" fill="${e}"/><path d="M4.599 21c0 9.044 7.332 16.376 16.376 16.376 9.045 0 16.376-7.332 16.376-16.376" stroke="url(#${i}) " stroke-width="3.5" stroke-linecap="round"/></g></svg>`,ring:(e="#4D80F0",t="#a6bff7")=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><linearGradient id="${n}" gradientUnits="userSpaceOnUse" x1="50" x2="50" y2="180"><stop offset="0" stop-color="${e}"></stop> <stop offset="1" stop-color="${t}"></stop></linearGradient> <path fill="url(#${n})" d="M20 100c0-44.1 35.9-80 80-80V0C44.8 0 0 44.8 0 100s44.8 100 100 100v-20c-44.1 0-80-35.9-80-80z"></path> <linearGradient id="${r}" gradientUnits="userSpaceOnUse" x1="150" y1="20" x2="150" y2="180"><stop offset="0" stop-color="#fff" stop-opacity="0"></stop> <stop offset="1" stop-color="${t}"></stop></linearGradient> <path fill="url(#${r})" d="M100 0v20c44.1 0 80 35.9 80 80s-35.9 80-80 80v20c55.2 0 100-44.8 100-100S155.2 0 100 0z"></path> <circle cx="100" cy="10" r="10" fill="${e}"></circle></svg>`},l=s,d=e.ref(""),c=e.ref(""),p=e.ref(null);e.watch((()=>l.size),(e=>{p.value=o.addUnit(e)}),{deep:!0,immediate:!0}),e.watch((()=>l.type),(()=>{u()}),{deep:!0,immediate:!0});const f=e.computed((()=>{const e={};return o.isDef(p.value)&&(e.height=o.addUnit(p.value),e.width=o.addUnit(p.value)),`${o.objToStyle(e)} ${l.customStyle}`}));function u(){const{type:e,color:s}=l;let i=o.isDef(e)?e:"ring";const n=`"data:image/svg+xml;base64,${t.encode("ring"===i?a[i](s,c.value):a[i](s))}"`;d.value=n}return e.onBeforeMount((()=>{c.value=o.gradient(l.color,"#ffffff",2)[1],u()})),(t,o)=>({a:e.s(`background-image: url(${d.value});`),b:e.n(`wd-loading ${l.customClass}`),c:e.s(f.value)})}}),n=e._export_sfc(i,[["__scopeId","data-v-6988bbf2"]]);wx.createComponent(n);

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="{{['data-v-6988bbf2', b]}}" style="{{c}}"><view class="wd-loading__body data-v-6988bbf2"><view class="wd-loading__svg data-v-6988bbf2" style="{{a}}"></view></view></view>

View File

@@ -0,0 +1 @@
.wd-loading.data-v-6988bbf2{font-size:0;line-height:0;vertical-align:middle;display:inline-block;width:var(--wot-loading-size, 32px);height:var(--wot-loading-size, 32px)}.wd-loading__body.data-v-6988bbf2{width:100%;height:100%;animation:wd-rotate-6988bbf2 .8s linear infinite;animation-duration:2s}.wd-loading__svg.data-v-6988bbf2{width:100%;height:100%;background-size:cover;background-repeat:no-repeat}@keyframes wd-rotate-6988bbf2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),t=require("../common/util.js"),o=Symbol("None"),r={title:"",showCancelButton:!1,show:!1,closeOnClickModal:!0,msg:"",type:"alert",inputType:"text",inputValue:"",showErr:!1,zIndex:99,lazyRender:!0,inputError:""};exports.defaultOptions=r,exports.getMessageDefaultOptionKey=e=>e?`__MESSAGE_OPTION__${e}`:"__MESSAGE_OPTION__",exports.useMessage=function(s=""){const n=s?"__MESSAGE_OPTION__"+s:"__MESSAGE_OPTION__",l=e.inject(n,e.ref(o));l.value===o&&(l.value=r,e.provide(n,l));const p=e=>o=>{const r=t.deepMerge({type:e},"string"==typeof o?{title:o}:o);return"confirm"===r.type||"prompt"===r.type?r.showCancelButton=!0:r.showCancelButton=!1,i(r)},i=e=>new Promise(((o,s)=>{const n=t.deepMerge(r,"string"==typeof e?{title:e}:e);l.value=t.deepMerge(n,{show:!0,success:e=>{a(),o(e)},fail:e=>{a(),s(e)}})})),u=p("alert"),c=p("confirm"),_=p("prompt"),a=()=>{l.value!==o&&(l.value.show=!1)};return{show:i,alert:u,confirm:c,prompt:_,close:a}};

View File

@@ -0,0 +1 @@
"use strict";const o=require("../common/props.js"),r={...o.baseProps,selector:o.makeStringProp(""),rootPortal:o.makeBooleanProp(!1)};exports.messageBoxProps=r;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),t=require("./types.js"),o=require("./index.js"),n=require("../common/util.js"),s=require("../composables/useTranslate.js");Math||(r+a+i)();const i=()=>"../wd-popup/wd-popup.js",a=()=>"../wd-button/wd-button.js",r=()=>"../wd-input/wd-input.js",u=e.defineComponent({name:"wd-message-box",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:t.messageBoxProps,setup(t){const i=t,{translate:a}=s.useTranslate("message-box"),r=e.computed((()=>`wd-message-box__container ${i.customClass}`)),u=e.computed((()=>`wd-message-box__body ${p.title?"":"is-no-title"} ${"prompt"===p.type?"is-prompt":""}`)),l=o.getMessageDefaultOptionKey(i.selector),c=e.inject(l,e.ref(o.defaultOptions)),p=e.reactive({msg:"",show:!1,title:"",showCancelButton:!1,closeOnClickModal:!0,confirmButtonText:"",cancelButtonText:"",type:"alert",inputType:"text",inputValue:"",inputPlaceholder:"",inputError:"",showErr:!1,zIndex:99,lazyRender:!0}),d=e.computed((()=>{const e=n.deepAssign({block:!0},n.isDef(p.confirmButtonProps)?n.omitBy(p.confirmButtonProps,n.isUndefined):{});return e.customClass=`${e.customClass||""} wd-message-box__actions-btn`,e})),m=e.computed((()=>{const e=n.deepAssign({block:!0,type:"info"},n.isDef(p.cancelButtonProps)?n.omitBy(p.cancelButtonProps,n.isUndefined):{});return e.customClass=`${e.customClass||""} wd-message-box__actions-btn`,e}));function f(e){if(("modal"!==e||p.closeOnClickModal)&&("prompt"!==p.type||"confirm"!==e||function(){if(p.inputPattern&&!p.inputPattern.test(String(p.inputValue)))return p.showErr=!0,!1;if("function"==typeof p.inputValidate){if(!p.inputValidate(p.inputValue))return p.showErr=!0,!1}return p.showErr=!1,!0}()))switch(e){case"confirm":p.beforeConfirm?p.beforeConfirm({resolve:t=>{t&&w({action:e,value:p.inputValue})}}):w({action:e,value:p.inputValue});break;case"cancel":h({action:e});break;default:h({action:"modal"})}}function w(e){p.show=!1,n.isFunction(p.success)&&p.success(e)}function h(e){p.show=!1,n.isFunction(p.fail)&&p.fail(e)}function x({value:e}){""!==e?p.inputValue=e:p.showErr=!1}return e.watch((()=>c.value),(e=>{var t;(t=e)&&(p.title=n.isDef(t.title)?t.title:"",p.showCancelButton=!!n.isDef(t.showCancelButton)&&t.showCancelButton,p.show=t.show,p.closeOnClickModal=t.closeOnClickModal,p.confirmButtonText=t.confirmButtonText,p.cancelButtonText=t.cancelButtonText,p.msg=t.msg,p.type=t.type,p.inputType=t.inputType,p.inputSize=t.inputSize,p.inputValue=t.inputValue,p.inputPlaceholder=t.inputPlaceholder,p.inputPattern=t.inputPattern,p.inputValidate=t.inputValidate,p.success=t.success,p.fail=t.fail,p.beforeConfirm=t.beforeConfirm,p.inputError=t.inputError,p.showErr=t.showErr,p.zIndex=t.zIndex,p.lazyRender=t.lazyRender,p.confirmButtonProps=t.confirmButtonProps,p.cancelButtonProps=t.cancelButtonProps)}),{deep:!0,immediate:!0}),e.watch((()=>p.show),(e=>{!1===!!e&&(p.showErr=!1)}),{deep:!0,immediate:!0}),(t,o)=>e.e({a:p.title},p.title?{b:e.t(p.title)}:{},{c:"prompt"===p.type},"prompt"===p.type?e.e({d:e.o(x),e:e.o((e=>p.inputValue=e)),f:e.p({type:p.inputType,size:p.inputSize,placeholder:p.inputPlaceholder,modelValue:p.inputValue}),g:p.showErr},p.showErr?{h:e.t(p.inputError||e.unref(a)("inputNoValidate"))}:{}):{},{i:e.t(p.msg),j:e.n(u.value),k:p.showCancelButton},p.showCancelButton?{l:e.t(p.cancelButtonText||e.unref(a)("cancel")),m:e.o((e=>f("cancel"))),n:e.p({...m.value})}:{},{o:e.t(p.confirmButtonText||e.unref(a)("confirm")),p:e.o((e=>f("confirm"))),q:e.p({...d.value}),r:e.n("wd-message-box__actions "+(p.showCancelButton?"wd-message-box__flex":"wd-message-box__block")),s:e.n(r.value),t:e.o((e=>f("modal"))),v:e.o((e=>p.show=e)),w:e.p({transition:"zoom-in","close-on-click-modal":p.closeOnClickModal,"lazy-render":p.lazyRender,"custom-class":"wd-message-box","z-index":p.zIndex,duration:200,"root-portal":t.rootPortal,modelValue:p.show})})}}),l=e._export_sfc(u,[["__scopeId","data-v-5484ff85"]]);wx.createComponent(l);

View File

@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"wd-popup": "../wd-popup/wd-popup",
"wd-button": "../wd-button/wd-button",
"wd-input": "../wd-input/wd-input"
}
}

View File

@@ -0,0 +1 @@
<view class="data-v-5484ff85"><wd-popup wx:if="{{w}}" class="data-v-5484ff85" u-s="{{['d']}}" bindclickModal="{{t}}" u-i="5484ff85-0" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"><view class="{{['data-v-5484ff85', s]}}"><view class="{{['data-v-5484ff85', j]}}"><view wx:if="{{a}}" class="wd-message-box__title data-v-5484ff85">{{b}}</view><view class="wd-message-box__content data-v-5484ff85"><block wx:if="{{c}}"><wd-input wx:if="{{f}}" class="data-v-5484ff85" bindinput="{{d}}" u-i="5484ff85-1,5484ff85-0" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"/><view wx:if="{{g}}" class="wd-message-box__input-error data-v-5484ff85">{{h}}</view></block><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else>{{i}}</block></view></view><view class="{{['data-v-5484ff85', r]}}"><wd-button wx:if="{{k}}" class="data-v-5484ff85" u-s="{{['d']}}" bindclick="{{m}}" u-i="5484ff85-2,5484ff85-0" bind:__l="__l" u-p="{{n}}">{{l}}</wd-button><wd-button wx:if="{{q}}" class="data-v-5484ff85" u-s="{{['d']}}" bindclick="{{p}}" u-i="5484ff85-3,5484ff85-0" bind:__l="__l" u-p="{{q}}">{{o}}</wd-button></view></view></wd-popup></view>

View File

@@ -0,0 +1 @@
.wot-theme-dark .wd-message-box__body.data-v-5484ff85{background-color:var(--wot-dark-background2, #1b1b1b)}.wot-theme-dark .wd-message-box__title.data-v-5484ff85{color:var(--wot-dark-color, var(--wot-color-white, white))}.wot-theme-dark .wd-message-box__content.data-v-5484ff85{color:var(--wot-dark-color3, rgba(232, 230, 227, .8))}.wot-theme-dark .wd-message-box__content.data-v-5484ff85::-webkit-scrollbar-thumb{background:var(--wot-dark-border-color, #3a3a3c)}.data-v-5484ff85 .wd-message-box,.wd-message-box.data-v-5484ff85{border-radius:var(--wot-message-box-radius, 16px);overflow:hidden}.wd-message-box__container.data-v-5484ff85{width:var(--wot-message-box-width, 300px);box-sizing:border-box}.wd-message-box__body.data-v-5484ff85{background-color:var(--wot-message-box-bg, var(--wot-color-white, white));padding:var(--wot-message-box-padding, 25px 24px 0)}.wd-message-box__body.is-no-title.data-v-5484ff85{padding:25px 24px 0}.wd-message-box__title.data-v-5484ff85{text-align:center;font-size:var(--wot-message-box-title-fs, 16px);color:var(--wot-message-box-title-color, rgba(0, 0, 0, .85));line-height:20px;font-weight:500;padding-top:5px;padding-bottom:10px}.wd-message-box__content.data-v-5484ff85{max-height:var(--wot-message-box-content-max-height, 264px);color:var(--wot-message-box-content-color, #666666);font-size:var(--wot-message-box-content-fs, 14px);text-align:center;overflow:auto;line-height:20px}.wd-message-box__content.data-v-5484ff85::-webkit-scrollbar{width:var(--wot-message-box-content-scrollbar-width, 4px)}.wd-message-box__content.data-v-5484ff85::-webkit-scrollbar-thumb{width:var(--wot-message-box-content-scrollbar-width, 4px);background:var(--wot-message-box-content-scrollbar-color, rgba(0, 0, 0, .1));border-radius:calc(var(--wot-message-box-content-scrollbar-width, 4px) / 2)}.wd-message-box__input-error.data-v-5484ff85{min-height:18px;margin-top:2px;color:var(--wot-message-box-input-error-color, var(--wot-input-error-color, var(--wot-color-danger, #fa4350)));text-align:left}.wd-message-box__input-error.is-hidden.data-v-5484ff85{visibility:hidden}.wd-message-box__actions.data-v-5484ff85{padding:24px}.data-v-5484ff85 .wd-message-box__actions-btn:not(:last-child){margin-right:16px}.wd-message-box__flex.data-v-5484ff85{display:flex}.wd-message-box__block.data-v-5484ff85{display:block}.wd-message-box__cancel.data-v-5484ff85{margin-right:16px}

View File

@@ -0,0 +1 @@
"use strict";const e=require("../common/props.js"),o={...e.baseProps,title:String,leftText:String,rightText:String,leftArrow:e.makeBooleanProp(!1),bordered:e.makeBooleanProp(!0),fixed:e.makeBooleanProp(!1),placeholder:e.makeBooleanProp(!1),zIndex:e.makeNumberProp(500),safeAreaInsetTop:e.makeBooleanProp(!1),leftDisabled:e.makeBooleanProp(!1),rightDisabled:e.makeBooleanProp(!1)};exports.navbarProps=o;

View File

@@ -0,0 +1 @@
"use strict";const t=require("../../../../common/vendor.js"),e=require("../common/util.js"),s=require("./types.js");Math||i();const i=()=>"../wd-icon/wd-icon.js",l=t.defineComponent({name:"wd-navbar",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:s.navbarProps,emits:["click-left","click-right"],setup(s,{emit:i}){const l=s,o=i,r=t.ref(""),{statusBarHeight:n}=t.index.getSystemInfoSync();t.watch([()=>l.fixed,()=>l.placeholder],(()=>{h()}),{deep:!0,immediate:!1});const a=t.computed((()=>{const t={};return l.fixed&&e.isDef(l.zIndex)&&(t["z-index"]=l.zIndex),l.safeAreaInsetTop&&(t["padding-top"]=e.addUnit(n||0)),`${e.objToStyle(t)}${l.customStyle}`}));function d(){l.leftDisabled||o("click-left")}function c(){l.rightDisabled||o("click-right")}t.onMounted((()=>{l.fixed&&l.placeholder&&t.nextTick$1((()=>{h()}))}));const{proxy:f}=t.getCurrentInstance();function h(){l.fixed&&l.placeholder&&e.getRect(".wd-navbar",!1,f).then((t=>{r.value=t.height}))}return(s,i)=>t.e({a:s.$slots.capsule},s.$slots.capsule?{}:s.$slots.left?{i:t.n("wd-navbar__left "+(s.leftDisabled?"is-disabled":"")),j:t.o(d)}:t.e({c:s.leftArrow},s.leftArrow?{d:t.p({name:"arrow-left","custom-class":"wd-navbar__arrow"})}:{},{e:s.leftText},s.leftText?{f:t.t(s.leftText)}:{},{g:t.n("wd-navbar__left "+(s.leftDisabled?"is-disabled":"")),h:t.o(d)}),{b:!s.$slots.left,k:!s.$slots.title&&s.title},!s.$slots.title&&s.title?{l:t.t(s.title)}:{},{m:s.$slots.right||s.rightText},s.$slots.right||s.rightText?t.e({n:!s.$slots.right&&s.rightText},!s.$slots.right&&s.rightText?{o:t.t(s.rightText)}:{},{p:t.n("wd-navbar__right "+(s.rightDisabled?"is-disabled":"")),q:t.o(c)}):{},{r:t.n(`wd-navbar ${s.customClass} ${s.fixed?"is-fixed":""} ${s.bordered?"is-border":""}`),s:t.s(a.value),t:t.unref(e.addUnit)(r.value)})}});wx.createComponent(l);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@@ -0,0 +1 @@
<view style="{{'height:' + t}}"><view class="{{r}}" style="{{s}}"><view class="wd-navbar__content"><view wx:if="{{a}}" class="wd-navbar__capsule"><slot name="capsule"/></view><view wx:elif="{{b}}" class="{{g}}" bindtap="{{h}}"><wd-icon wx:if="{{c}}" u-i="a56cc726-0" bind:__l="__l" u-p="{{d}}"/><view wx:if="{{e}}" class="wd-navbar__text">{{f}}</view></view><view wx:else class="{{i}}" bindtap="{{j}}"><slot name="left"/></view><view class="wd-navbar__title"><slot name="title"/><block wx:if="{{k}}">{{l}}</block></view><view wx:if="{{m}}" class="{{p}}" bindtap="{{q}}"><slot name="right"/><view wx:if="{{n}}" class="wd-navbar__text" hover-class="wd-navbar__text--hover" hover-stay-time="{{70}}">{{o}}</view></view></view></view></view>

View File

@@ -0,0 +1 @@
.wot-theme-dark .wd-navbar{background-color:var(--wot-dark-background, #131313)}.wot-theme-dark .wd-navbar__title,.wot-theme-dark .wd-navbar__text,.wot-theme-dark .wd-navbar .wd-navbar__arrow{color:var(--wot-dark-color, var(--wot-color-white, white))}.wd-navbar{position:relative;text-align:center;-webkit-user-select:none;user-select:none;height:var(--wot-navbar-height, 44px);line-height:var(--wot-navbar-height, 44px);background-color:var(--wot-navbar-background, var(--wot-color-white, white));box-sizing:content-box}.wd-navbar__content{position:relative;height:100%;width:100%}.wd-navbar__title{max-width:60%;height:100%;margin:0 auto;color:var(--wot-navbar-color, var(--wot-font-gray-1, rgba(0, 0, 0, .9)));font-weight:var(--wot-navbar-title-font-weight, 600);font-size:var(--wot-navbar-title-font-size, 18px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd-navbar__text{display:inline-block;vertical-align:middle;color:var(--wot-navbar-desc-font-color, var(--wot-font-gray-1, rgba(0, 0, 0, .9)))}.wd-navbar__left,.wd-navbar__right,.wd-navbar__capsule{position:absolute;top:0;bottom:0;font-size:var(--wot-navbar-desc-font-size, 16px);display:flex;align-items:center;padding:0 12px}.wd-navbar__left.is-disabled,.wd-navbar__right.is-disabled,.wd-navbar__capsule.is-disabled{opacity:var(--wot-navbar-disabled-opacity, .6)}.wd-navbar__left,.wd-navbar__capsule{left:0}.wd-navbar__right{right:0}.wd-navbar__arrow{font-size:var(--wot-navbar-arrow-size, 24px);color:var(--wot-navbar-color, var(--wot-font-gray-1, rgba(0, 0, 0, .9)))}.wd-navbar.is-border{position:relative}.wd-navbar.is-border:after{position:absolute;display:block;content:"";width:100%;height:1px;left:0;bottom:0;transform:scaleY(.5);background:var(--wot-color-border-light, #e8e8e8)}.wd-navbar.is-fixed{position:fixed;top:0;left:0;width:100%;z-index:500}

View File

@@ -0,0 +1 @@
"use strict";const r=require("../common/props.js"),o={...r.baseProps,text:{type:[String,Array],default:""},type:r.makeStringProp("warning"),scrollable:r.makeBooleanProp(!0),delay:r.makeNumberProp(1),speed:r.makeNumberProp(50),closable:r.makeBooleanProp(!1),wrapable:r.makeBooleanProp(!1),prefix:String,color:String,backgroundColor:String,direction:r.makeStringProp("horizontal")};exports.noticeBarProps=o;

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),t=require("../common/util.js"),a=require("./types.js");Math||n();const n=()=>"../wd-icon/wd-icon.js",o=e.defineComponent({name:"wd-notice-bar",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:a.noticeBarProps,emits:["close","next","click"],setup(a,{expose:n,emit:o}){const l=a,i=o,r=e.ref(0),u=e.ref(!0),s=e.ref(0),c=e.computed((()=>Array.isArray(l.text)?l.text:[l.text])),d=e.computed((()=>c.value[s.value])),v=e.ref(0),p=e.ref(null),h=e.ref(null),f=e.computed((()=>"horizontal"===l.direction)),m=e.computed((()=>"vertical"===l.direction)),y=e.reactive({transitionProperty:"unset",transitionDelay:"unset",transitionDuration:"unset",transform:"none",transitionTimingFunction:"linear"}),w=e.computed((()=>t.objToStyle(y))),x=e.computed((()=>{const e={};return t.isDef(l.color)&&(e.color=l.color),t.isDef(l.backgroundColor)&&(e.background=l.backgroundColor),`${t.objToStyle(e)}${l.customStyle}`})),b=e.computed((()=>{const{type:e,wrapable:t,scrollable:a}=l;let n=[];return e&&n.push(`is-${e}`),f.value?!t&&!a&&n.push("wd-notice-bar--ellipse"):n.push("wd-notice-bar--ellipse"),t&&!a&&n.push("wd-notice-bar--wrap"),n.join(" ")})),{proxy:g}=e.getCurrentInstance();function _(){D(),$()}function $(){e.nextTick$1((()=>async function(){const[e,t]=await k();if(!e.width||!t.width||!t.height)return;p.value=e,h.value=t,r.value=e.width,f.value?l.scrollable&&j({duration:t.width/l.speed,delay:l.delay,translate:-t.width}):c.value.length>1&&C(t.height)}()))}function D(){y.transitionProperty="unset",y.transitionDelay="unset",y.transitionDuration="unset",y.transform="none",y.transitionTimingFunction="linear",s.value=0,v.value=0}function T(){u.value=!1,i("close")}function j({duration:e,delay:t,translate:a}){y.transitionProperty="all",y.transitionDelay=`${t}s`,y.transitionDuration=`${e}s`,y.transform=`${"vertical"===l.direction?"translateY":"translateX"}(${a}px)`,y.transitionTimingFunction="linear"}function k(){return Promise.all([t.getRect(".wd-notice-bar__wrap",!1,g),t.getRect(".wd-notice-bar__content",!1,g)])}async function C(e){const t=-e/(c.value.length+1)*(s.value+1);j({duration:e/(c.value.length+1)/l.speed,delay:l.delay,translate:t})}function P(){f.value?j({duration:0,delay:0,translate:r.value+1}):++v.value>=c.value.length&&(v.value=0,j({duration:0,delay:0,translate:0}));const t=setTimeout((()=>{s.value>=c.value.length-1?s.value=0:s.value++,i("next",s.value),e.nextTick$1((async()=>{try{const[e,t]=await k();p.value=e,h.value=t,r.value=e.width||0}catch(e){}h.value&&h.value.width&&h.value.height&&(f.value?j({duration:(r.value+h.value.width)/l.speed,delay:l.delay,translate:-h.value.width}):C(h.value.height))})),clearTimeout(t)}),20)}function A(){const e=t.isArray(l.text)?{index:s.value,text:l.text[s.value]}:{index:0,text:l.text};i("click",e)}return e.watch((()=>l.text),(()=>{_()}),{deep:!0}),e.onMounted((()=>{$()})),e.onActivated((()=>{$()})),e.onDeactivated((()=>{D()})),n({reset:_}),(t,a)=>e.e({a:u.value},u.value?e.e({b:t.prefix},t.prefix?{c:e.p({"custom-class":"wd-notice-bar__prefix",name:t.prefix})}:{},{d:m.value},m.value?e.e({e:e.f(c.value,((t,a,n)=>({a:e.t(t),b:t}))),f:c.value.length>1},c.value.length>1?{g:e.t(c.value[0])}:{}):{h:e.t(d.value)},{i:e.s(w.value),j:e.o(P),k:e.o(A),l:t.closable},t.closable?{m:e.o(T),n:e.p({"custom-class":"wd-notice-bar__suffix",name:"close-bold"})}:{},{o:e.n(`wd-notice-bar ${t.customClass} ${b.value}`),p:e.s(x.value)}):{})}}),l=e._export_sfc(o,[["__scopeId","data-v-cd588750"]]);wx.createComponent(l);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@@ -0,0 +1 @@
<view wx:if="{{a}}" class="{{['data-v-cd588750', o]}}" style="{{p}}"><wd-icon wx:if="{{b}}" class="data-v-cd588750" u-i="cd588750-0" bind:__l="__l" u-p="{{c}}"></wd-icon><slot wx:else name="prefix"></slot><view class="wd-notice-bar__wrap data-v-cd588750"><view class="wd-notice-bar__content data-v-cd588750" style="{{i}}" bindtransitionend="{{j}}" bindtap="{{k}}"><block wx:if="{{d}}"><view wx:for="{{e}}" wx:for-item="item" wx:key="b" class="data-v-cd588750">{{item.a}}</view><view wx:if="{{f}}" class="data-v-cd588750">{{g}}</view></block><block wx:else><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else>{{h}}</block></block></view></view><wd-icon wx:if="{{l}}" class="data-v-cd588750" bindclick="{{m}}" u-i="cd588750-1" bind:__l="__l" u-p="{{n}}"></wd-icon><slot wx:else name="suffix"></slot></view>

View File

@@ -0,0 +1 @@
.wd-notice-bar.data-v-cd588750{display:flex;padding:var(--wot-notice-bar-padding, 9px 20px 9px 15px);align-items:center;font-size:var(--wot-notice-bar-fs, 12px);border-radius:var(--wot-notice-bar-border-radius, 8px);position:relative;box-sizing:border-box}.wd-notice-bar.is-warning.data-v-cd588750{background:var(--wot-notice-bar-warning-bg, #fff6c8);color:var(--wot-notice-bar-warning-color, var(--wot-color-warning, #f0883a))}.wd-notice-bar.is-info.data-v-cd588750{background:var(--wot-notice-bar-info-bg, #f4f9ff);color:var(--wot-notice-bar-info-color, var(--wot-color-theme, #4d80f0))}.wd-notice-bar.is-danger.data-v-cd588750{background:var(--wot-notice-bar-danger-bg, #feeced);color:var(--wot-notice-bar-danger-color, var(--wot-color-danger, #fa4350))}.data-v-cd588750 .wd-notice-bar__prefix{padding-right:4px;font-size:var(--wot-notice-bar-prefix-size, 18px)}.data-v-cd588750 .wd-notice-bar__suffix{text-align:center;font-size:var(--wot-notice-bar-close-size, 18px);display:inline-block;background-color:var(--wot-notice-bar-close-bg, rgba(0, 0, 0, .15));color:var(--wot-notice-bar-close-color, var(--wot-color-white, white));padding:0;border-radius:0 8px 0 4px;position:absolute;right:0;top:0}.wd-notice-bar__wrap.data-v-cd588750{position:relative;flex:1;height:var(--wot-notice-bar-line-height, 18px);overflow:hidden;line-height:var(--wot-notice-bar-line-height, 18px)}.wd-notice-bar__content.data-v-cd588750{position:absolute;white-space:nowrap}.wd-notice-bar--ellipse .wd-notice-bar__content.data-v-cd588750{position:static;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd-notice-bar--wrap .wd-notice-bar__wrap.data-v-cd588750{height:auto}.wd-notice-bar--wrap .wd-notice-bar__content.data-v-cd588750{position:static;white-space:normal}

Some files were not shown because too many files have changed in this diff Show More