first commit
This commit is contained in:
@@ -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)}};
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/base64.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/base64.js
vendored
Normal 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};
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/clickoutside.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/clickoutside.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/interceptor.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/interceptor.js
vendored
Normal 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()};
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/props.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/props.js
vendored
Normal 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;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/util.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/common/util.js
vendored
Normal 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()};
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/index.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js"),require("../../locale/index.js");
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useCell.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useCell.js
vendored
Normal 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))}};
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js");
|
||||
@@ -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}};
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js");
|
||||
@@ -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)}};
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js");
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useQueue.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useQueue.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js");
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useRaf.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useRaf.js
vendored
Normal 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}};
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useTouch.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/composables/useTouch.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js");
|
||||
@@ -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}`}}};
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js");
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-button/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-button/types.js
vendored
Normal 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;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-button/wd-button.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-button/wd-button.js
vendored
Normal 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);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
@@ -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
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell-group/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell-group/types.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const o=Symbol("wd-cell-group");exports.CELL_GROUP_KEY=o;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/types.js
vendored
Normal 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;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.js
vendored
Normal 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);
|
||||
6
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.json
vendored
Normal file
6
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.wxml
vendored
Normal 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>
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-cell/wd-cell.wxss
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
@@ -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
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-picker-view": "../wd-picker-view/wd-picker-view"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-form/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-form/types.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const o=Symbol("wd-form");exports.FORM_KEY=o;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/types.js
vendored
Normal 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;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.js
vendored
Normal 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);
|
||||
4
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.json
vendored
Normal file
4
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxml
vendored
Normal 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>
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxss
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
@@ -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);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/types.js
vendored
Normal 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;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.json
vendored
Normal file
6
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.wxml
vendored
Normal 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>
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-input/wd-input.wxss
vendored
Normal file
File diff suppressed because one or more lines are too long
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-loading/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-loading/types.js
vendored
Normal 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;
|
||||
@@ -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);
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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)}}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-message-box/index.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-message-box/index.js
vendored
Normal 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}};
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-message-box/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-message-box/types.js
vendored
Normal 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;
|
||||
@@ -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);
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-navbar/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-navbar/types.js
vendored
Normal 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;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js
vendored
Normal 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);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-notice-bar/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-notice-bar/types.js
vendored
Normal 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;
|
||||
@@ -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);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-notify/index.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-notify/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";require("../../../../common/vendor.js");
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-overlay/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-overlay/types.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const o=require("../common/props.js"),e={...o.baseProps,show:o.makeBooleanProp(!1),duration:{type:[Object,Number,Boolean],default:300},lockScroll:o.makeBooleanProp(!0),zIndex:o.makeNumberProp(10)};exports.overlayProps=e;
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";const o=require("../../../../common/vendor.js"),t=require("./types.js");Math||e();const e=()=>"../wd-transition/wd-transition.js",s=o.defineComponent({name:"wd-overlay",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:t.overlayProps,emits:["click"],setup(t,{emit:e}){const s=e;function n(){s("click")}return(t,e)=>({a:o.o(n),b:o.p({show:t.show,name:"fade","custom-class":"wd-overlay",duration:t.duration,"custom-style":`z-index: ${t.zIndex}; ${t.customStyle}`,"disable-touch-move":t.lockScroll})})}});wx.createComponent(s);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-transition": "../wd-transition/wd-transition"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<wd-transition wx:if="{{b}}" u-s="{{['d']}}" bindclick="{{a}}" u-i="7d2ead0b-0" bind:__l="__l" u-p="{{b}}"><slot></slot></wd-transition>
|
||||
@@ -0,0 +1 @@
|
||||
.wot-theme-dark .wd-overlay{background:var(--wot-overlay-bg-dark, rgba(0, 0, 0, .75))}.wd-overlay{position:fixed;left:0;top:0;right:0;bottom:0;background:var(--wot-overlay-bg, rgba(0, 0, 0, .65))}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-picker-view/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-picker-view/types.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const r=require("../common/props.js"),e=require("../common/util.js"),o={...r.baseProps,loading:r.makeBooleanProp(!1),loadingColor:r.makeStringProp("#4D80F0"),columnsHeight:r.makeNumberProp(217),itemHeight:r.makeNumberProp(35),valueKey:r.makeStringProp("value"),labelKey:r.makeStringProp("label"),immediateChange:r.makeBooleanProp(!1),modelValue:{type:[String,Number,Boolean,Array,Array,Array],default:"",required:!0},columns:r.makeArrayProp(),columnChange:Function};exports.formatArray=function(r,o,a){let n=e.isArray(r)?r:[r];const t=new Set(r.map(e.getType));if(1!==t.size&&t.has("object"))throw Error("The columns are correct");return e.isArray(r[0])||(n=[n]),n.map((r=>r.map((r=>{if(!e.isObj(r))return{[o]:r,[a]:r};if(!r.hasOwnProperty(o)&&!r.hasOwnProperty(a))throw Error("Can't find valueKey and labelKey in columns");return r.hasOwnProperty(a)||(r[a]=r[o]),r.hasOwnProperty(o)||(r[o]=r[a]),r}))))},exports.pickerViewProps=o;
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../../common/vendor.js"),n=require("../common/util.js"),t=require("./types.js");Math||l();const l=()=>"../wd-loading/wd-loading.js",a=e.defineComponent({name:"wd-picker-view",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:t.pickerViewProps,emits:["change","pickstart","pickend","update:modelValue"],setup(l,{expose:a,emit:o}){const u=l,i=o,r=e.ref([]),c=e.ref([]);e.watch([()=>u.modelValue,()=>u.columns],((e,l)=>{n.isEqual(l[1],e[1])||(n.isArray(e[1])&&e[1].length>0?r.value=t.formatArray(e[1],u.valueKey,u.labelKey):(r.value=[],c.value=[])),n.isDef(e[0])&&function(e){if(0===r.value.length)return void(c.value=[]);(""===e||!n.isDef(e)||n.isArray(e)&&0===e.length)&&(e=r.value.map((e=>e[0][u.valueKey])));const t=n.getType(e),l=["string","number","boolean","array"];-1===l.indexOf(t)&&console.error(`value must be one of ${l.toString()}`);e=(e=n.isArray(e)?e:[e]).slice(0,r.value.length);let a=n.deepClone(c.value);e.forEach(((e,n)=>{let t=r.value[n].findIndex((n=>n[u.valueKey].toString()===e.toString()));t=-1===t?0:t,a=d(n,t,a)})),c.value=a.slice(0,e.length)}(e[0])}),{deep:!0,immediate:!0});const{proxy:s}=e.getCurrentInstance();function d(e,t,l){const a=r.value[e];if(!a||!a[t])throw Error(`The value to select with Col:${e} Row:${t} is incorrect`);const o=n.deepClone(l);if(o[e]=t,a[t].disabled){const n=a.slice(0,t).reverse().findIndex((e=>!e.disabled)),l=a.slice(t+1).findIndex((e=>!e.disabled));-1!==n?o[e]=t-1-n:-1!==l?o[e]=t+1+l:void 0===o[e]&&(o[e]=0)}return o}function v({detail:{value:t}}){const l=function(e){e=e.slice(0,r.value.length);const t=n.deepClone(c.value);let l=n.deepClone(c.value);e.forEach(((e,a)=>{(e=n.range(e,0,r.value[a].length-1))!==t[a]&&(l=d(a,e,l))}));const a=function(e,n){if(!e||!n)return-1;return e.findIndex(((e,t)=>e!==n[t]))}(l,t);if(-1===a)return;const o=l[a];return 1===l.length?o:a}(t=t.map((e=>Number(e||0))));c.value=n.deepClone(t),e.nextTick$1((()=>{c.value=function(e){let t=n.deepClone(e);return e.forEach(((e,l)=>{e=n.range(e,0,r.value[l].length-1),t=d(l,e,t)})),t}(t),u.columnChange?u.columnChange.length<4?(u.columnChange(s.$.exposed,g(),l||0,(()=>{})),m(l||0)):u.columnChange(s.$.exposed,g(),l||0,(()=>{m(l||0)})):m(l||0)}))}function m(e){const t=p();n.isEqual(t,u.modelValue)||(i("update:modelValue",t),setTimeout((()=>{i("change",{picker:s.$.exposed,value:t,index:e})}),0))}function g(){const e=c.value.map(((e,n)=>r.value[n][e]));return 1===e.length?e[0]:e}function p(){const{valueKey:e}=u,n=c.value.map(((n,t)=>r.value[t][n][e]));return 1===n.length?n[0]:n}function f(){i("pickstart")}function h(){i("pickend")}return a({getSelects:g,getValues:p,setColumnData:function(e,n,l=0){r.value[e]=t.formatArray(n,u.valueKey,u.labelKey).reduce(((e,n)=>e.concat(n)),[]),c.value=d(e,l,c.value)},getColumnsData:function(){return n.deepClone(r.value)},getColumnData:function(e){return r.value[e]},getColumnIndex:function(e){return c.value[e]},getLabels:function(){const{labelKey:e}=u;return c.value.map(((n,t)=>r.value[t][n][e]))},getSelectedIndex:function(){return c.value},resetColumns:function(e){n.isArray(e)&&e.length&&(r.value=t.formatArray(e,u.valueKey,u.labelKey))}}),(n,t)=>e.e({a:n.loading},n.loading?{b:e.p({color:n.loadingColor})}:{},{c:e.f(r.value,((t,l,a)=>({a:e.f(t,((t,a,o)=>({a:e.t(t[n.labelKey]),b:a,c:e.n(`wd-picker-view-column__item ${t.disabled?"wd-picker-view-column__item--disabled":""} ${c.value[l]==a?"wd-picker-view-column__item--active":""}`)}))),b:l}))),d:e.s(`line-height: ${n.itemHeight}px;`),e:`height: ${n.itemHeight}px;`,f:e.s(`height: ${n.columnsHeight-20}px;`),g:c.value,h:n.immediateChange,i:e.o(v),j:e.o(f),k:e.o(h),l:e.s(`height: ${n.columnsHeight-20}px;`),m:e.n(`wd-picker-view ${n.customClass}`),n:e.s(n.customStyle)})}}),o=e._export_sfc(a,[["__scopeId","data-v-fb198451"]]);wx.createComponent(o);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-loading": "../wd-loading/wd-loading"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-fb198451', m]}}" style="{{n}}"><view wx:if="{{a}}" class="wd-picker-view__loading data-v-fb198451"><wd-loading wx:if="{{b}}" class="data-v-fb198451" u-i="fb198451-0" bind:__l="__l" u-p="{{b}}"/></view><view class="data-v-fb198451" style="{{l}}"><block wx:if="{{r0}}"><picker-view class="data-v-fb198451" mask-class="wd-picker-view__mask" indicator-class="wd-picker-view__roller" indicator-style="{{e}}" style="{{f}}" value="{{g}}" immediate-change="{{h}}" bindchange="{{i}}" bindpickstart="{{j}}" bindpickend="{{k}}"><picker-view-column wx:for="{{c}}" wx:for-item="col" wx:key="b" class="wd-picker-view-column data-v-fb198451"><view wx:for="{{col.a}}" wx:for-item="row" wx:key="b" class="{{['data-v-fb198451', row.c]}}" style="{{d}}">{{row.a}}</view></picker-view-column></picker-view></block></view></view>
|
||||
@@ -0,0 +1 @@
|
||||
.wot-theme-dark .wd-picker-view__columns.data-v-fb198451{background:var(--wot-dark-background2, #1b1b1b)}.wot-theme-dark .wd-picker-view.data-v-fb198451 .wd-picker-view__roller{background:var(--wot-dark-background4, #323233)}.wot-theme-dark .wd-picker-view-column.data-v-fb198451{color:var(--wot-dark-color, var(--wot-color-white, white))}.wot-theme-dark .wd-picker-view-column__item--disabled.data-v-fb198451{color:var(--wot-dark-color-gray, var(--wot-color-secondary, #595959))}.wd-picker-view.data-v-fb198451{position:relative;padding:10px 0}.wd-picker-view__columns.data-v-fb198451{position:relative;display:flex;background:var(--wot-picker-bg, var(--wot-color-white, white));overflow:hidden;align-items:center}.data-v-fb198451 .wd-picker-view__mask{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--wot-picker-mask, linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .25))) linear-gradient(0deg,rgba(255,255,255,.9),rgba(255,255,255,.25));background-position:top,bottom;background-repeat:no-repeat;z-index:2;pointer-events:none;filter:blur(4px)}.wd-picker-view__loading.data-v-fb198451{position:absolute;display:flex;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;z-index:3;background:var(--wot-picker-loading-bg, rgba(var(--wot-color-white, white), .8))}.data-v-fb198451 .wd-picker-view__roller{background:#f5f5f5;z-index:0}.data-v-fb198451 .wd-picker-view__roller:before,.data-v-fb198451 .wd-picker-view__roller:after{display:none}.wd-picker-view-column.data-v-fb198451{flex:1;font-size:var(--wot-picker-column-fs, 16px);color:var(--wot-picker-column-color, rgba(0, 0, 0, .85));text-align:center;transition-timing-function:cubic-bezier(.28,.8,.63,1)}.wd-picker-view-column__item.data-v-fb198451{padding:var(--wot-picker-column-padding, 0 var(--wot-size-side-padding-small, 6px));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd-picker-view-column__item--disabled.data-v-fb198451{color:var(--wot-picker-column-disabled-color, rgba(0, 0, 0, .25))}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-picker/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-picker/types.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../common/props.js"),o={...e.baseProps,customLabelClass:e.makeStringProp(""),customValueClass:e.makeStringProp(""),customViewClass:e.makeStringProp(""),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%"),useDefaultSlot:e.makeBooleanProp(!1),useLabelSlot:e.makeBooleanProp(!1),error:e.makeBooleanProp(!1),alignRight:e.makeBooleanProp(!1),beforeConfirm:Function,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:{type:[String,Number,Array],default:""},columns:{type:Array,default:()=>[]},columnChange:Function,displayFormat:Function,zIndex:e.makeNumberProp(15),prop:String,rules:e.makeArrayProp(),immediateChange:e.makeBooleanProp(!1),rootPortal:e.makeBooleanProp(!1),clearable:e.makeBooleanProp(!1),markerSide:e.makeStringProp("before")};exports.pickerProps=o;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-picker/wd-picker.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-picker/wd-picker.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon",
|
||||
"wd-popup": "../wd-popup/wd-popup",
|
||||
"wd-picker-view": "../wd-picker-view/wd-picker-view",
|
||||
"wd-cell": "../wd-cell/wd-cell"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-6a4e7584', C]}}" style="{{D}}"><wd-cell wx:if="{{a}}" class="data-v-6a4e7584" u-s="{{['title','right-icon']}}" bindclick="{{h}}" u-i="6a4e7584-0" bind:__l="__l" u-p="{{i}}"><view wx:if="{{b}}" slot="title"><slot name="label"></slot></view><view slot="right-icon"><wd-icon wx:if="{{c}}" class="data-v-6a4e7584" u-i="6a4e7584-1,6a4e7584-0" bind:__l="__l" u-p="{{d}}"/><view wx:elif="{{e}}" class="data-v-6a4e7584" catchtap="{{g}}"><wd-icon wx:if="{{f}}" class="data-v-6a4e7584" u-i="6a4e7584-2,6a4e7584-0" bind:__l="__l" u-p="{{f}}"/></view></view></wd-cell><view wx:else class="data-v-6a4e7584" bindtap="{{j}}"><slot></slot></view><wd-popup wx:if="{{B}}" class="data-v-6a4e7584" u-s="{{['d']}}" bindclose="{{z}}" u-i="6a4e7584-3" bind:__l="__l" bindupdateModelValue="{{A}}" u-p="{{B}}"><view class="wd-picker__wraper data-v-6a4e7584"><view class="wd-picker__toolbar data-v-6a4e7584" bindtouchmove="{{r}}"><view class="wd-picker__action wd-picker__action--cancel data-v-6a4e7584" bindtap="{{l}}">{{k}}</view><view wx:if="{{m}}" class="wd-picker__title data-v-6a4e7584">{{n}}</view><view class="{{['data-v-6a4e7584', p]}}" bindtap="{{q}}">{{o}}</view></view><wd-picker-view wx:if="{{y}}" class="r data-v-6a4e7584" u-r="pickerViewWd" bindchange="{{t}}" bindpickstart="{{v}}" bindpickend="{{w}}" u-i="6a4e7584-4,6a4e7584-3" bind:__l="__l" bindupdateModelValue="{{x}}" u-p="{{y}}"/></view></wd-popup></view>
|
||||
@@ -0,0 +1 @@
|
||||
.wot-theme-dark .wd-picker__action--cancel.data-v-6a4e7584{color:var(--wot-dark-color, var(--wot-color-white, white))}.wot-theme-dark .wd-picker__action.is-loading.data-v-6a4e7584{color:var(--wot-dark-color3, rgba(232, 230, 227, .8))}.wot-theme-dark .wd-picker.data-v-6a4e7584 .wd-picker__arrow,.wot-theme-dark .wd-picker.data-v-6a4e7584 .wd-picker__clear{color:var(--wot-dark-color, var(--wot-color-white, white))}.wot-theme-dark .wd-picker.data-v-6a4e7584 .wd-picker__cell--placeholder .wd-cell__value{color:var(--wot-dark-color-gray, var(--wot-color-secondary, #595959))}.data-v-6a4e7584 .wd-picker__popup{border-radius:16px 16px 0 0}.data-v-6a4e7584 .wd-picker__cell.is-disabled .wd-cell__value{color:var(--wot-input-disabled-color, #d9d9d9);cursor:not-allowed}.data-v-6a4e7584 .wd-picker__cell.is-error .wd-cell__value,.data-v-6a4e7584 .wd-picker__cell.is-error .wd-picker__arrow{color:var(--wot-input-error-color, var(--wot-color-danger, #fa4350))}.data-v-6a4e7584 .wd-picker__cell.is-large .wd-picker__arrow,.data-v-6a4e7584 .wd-picker__cell.is-large .wd-picker__clear{font-size:var(--wot-cell-icon-size-large, 18px)}.data-v-6a4e7584 .wd-picker__cell--placeholder .wd-cell__value{color:var(--wot-input-placeholder-color, #bfbfbf)}.data-v-6a4e7584 .wd-picker__arrow,.data-v-6a4e7584 .wd-picker__clear{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-6a4e7584 .wd-picker__clear{color:var(--wot-cell-clear-color, #585858)}.wd-picker__wraper.data-v-6a4e7584{padding-bottom:var(--window-bottom)}.wd-picker__toolbar.data-v-6a4e7584{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-picker__action.data-v-6a4e7584{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-picker__action--cancel.data-v-6a4e7584{color:var(--wot-picker-toolbar-cancel-color, #666666)}.wd-picker__action.is-loading.data-v-6a4e7584{color:var(--wot-picker-loading-button-color, rgba(0, 0, 0, .25))}.wd-picker__title.data-v-6a4e7584{display:block;float:1;color:var(--wot-picker-toolbar-title-color, rgba(0, 0, 0, .85))}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/types.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/types.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const o=require("../common/props.js"),e={...o.baseProps,transition:String,closable:o.makeBooleanProp(!1),position:o.makeStringProp("center"),closeOnClickModal:o.makeBooleanProp(!0),duration:{type:[Number,Boolean],default:300},modal:o.makeBooleanProp(!0),zIndex:o.makeNumberProp(10),hideWhenClose:o.makeBooleanProp(!0),modalStyle:o.makeStringProp(""),safeAreaInsetBottom:o.makeBooleanProp(!1),modelValue:o.makeBooleanProp(!1),lazyRender:o.makeBooleanProp(!0),lockScroll:o.makeBooleanProp(!0),rootPortal:o.makeBooleanProp(!1)};exports.popupProps=e;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../../common/vendor.js"),o=require("./types.js");Math||(l+t+a+s)();const t=()=>"../wd-icon/wd-icon.js",l=()=>"../wd-overlay/wd-overlay.js",a=()=>"../wd-transition/wd-transition.js",s=()=>"../wd-root-portal/wd-root-portal.js",n=e.defineComponent({name:"wd-popup",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"},props:o.popupProps,emits:["update:modelValue","before-enter","enter","before-leave","leave","after-leave","after-enter","click-modal","close"],setup(o,{emit:t}){const l=o,a=t,s=e.computed((()=>l.transition?l.transition:"center"===l.position?["zoom-in","fade"]:"left"===l.position?"slide-left":"right"===l.position?"slide-right":"bottom"===l.position?"slide-up":"top"===l.position?"slide-down":"slide-up")),n=e.ref(0),r=e.computed((()=>`z-index:${l.zIndex}; padding-bottom: ${n.value}px;${l.customStyle}`)),d=e.computed((()=>`wd-popup wd-popup--${l.position} ${l.transition||"center"!==l.position?"":"is-deep"} ${l.customClass||""}`));function i(){a("click-modal"),l.closeOnClickModal&&c()}function c(){a("close"),a("update:modelValue",!1)}function p(){}return e.onBeforeMount((()=>{if(l.safeAreaInsetBottom){const{safeArea:o,screenHeight:t,safeAreaInsets:l}=e.index.getSystemInfoSync();n.value=o?t-(o.bottom||0):0}})),(o,t)=>e.e({a:o.rootPortal},o.rootPortal?e.e({b:o.modal},o.modal?{c:e.o(i),d:e.o(p),e:e.p({show:o.modelValue,"z-index":o.zIndex,"lock-scroll":o.lockScroll,duration:o.duration,"custom-style":o.modalStyle})}:{},{f:o.closable},o.closable?{g:e.o(c),h:e.p({"custom-class":"wd-popup__close",name:"add"})}:{},{i:e.o((e=>a("before-enter"))),j:e.o((e=>a("enter"))),k:e.o((e=>a("after-enter"))),l:e.o((e=>a("before-leave"))),m:e.o((e=>a("leave"))),n:e.o((e=>a("after-leave"))),o:e.p({"lazy-render":o.lazyRender,"custom-class":d.value,"custom-style":r.value,duration:o.duration,show:o.modelValue,name:s.value,destroy:o.hideWhenClose})}):e.e({p:o.modal},o.modal?{q:e.o(i),r:e.o(p),s:e.p({show:o.modelValue,"z-index":o.zIndex,"lock-scroll":o.lockScroll,duration:o.duration,"custom-style":o.modalStyle})}:{},{t:o.closable},o.closable?{v:e.o(c),w:e.p({"custom-class":"wd-popup__close",name:"add"})}:{},{x:e.o((e=>a("before-enter"))),y:e.o((e=>a("enter"))),z:e.o((e=>a("after-enter"))),A:e.o((e=>a("before-leave"))),B:e.o((e=>a("leave"))),C:e.o((e=>a("after-leave"))),D:e.p({"lazy-render":o.lazyRender,"custom-class":d.value,"custom-style":r.value,duration:o.duration,show:o.modelValue,name:s.value,destroy:o.hideWhenClose})}))}}),r=e._export_sfc(n,[["__scopeId","data-v-161bc30f"]]);wx.createComponent(r);
|
||||
9
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.json
vendored
Normal file
9
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon",
|
||||
"wd-overlay": "../wd-overlay/wd-overlay",
|
||||
"wd-transition": "../wd-transition/wd-transition",
|
||||
"wd-root-portal": "../wd-root-portal/wd-root-portal"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<wd-root-portal wx:if="{{a}}" class="data-v-161bc30f" u-s="{{['d']}}" u-i="161bc30f-0" bind:__l="__l"><view class="wd-popup-wrapper data-v-161bc30f"><wd-overlay wx:if="{{b}}" class="data-v-161bc30f" bindclick="{{c}}" bindtouchmove="{{d}}" u-i="161bc30f-1,161bc30f-0" bind:__l="__l" u-p="{{e}}"/><wd-transition wx:if="{{o}}" class="data-v-161bc30f" u-s="{{['d']}}" bindbeforeEnter="{{i}}" bindenter="{{j}}" bindafterEnter="{{k}}" bindbeforeLeave="{{l}}" bindleave="{{m}}" bindafterLeave="{{n}}" u-i="161bc30f-2,161bc30f-0" bind:__l="__l" u-p="{{o}}"><slot/><wd-icon wx:if="{{f}}" class="data-v-161bc30f" bindclick="{{g}}" u-i="161bc30f-3,161bc30f-2" bind:__l="__l" u-p="{{h}}"/></wd-transition></view></wd-root-portal><view wx:else class="wd-popup-wrapper data-v-161bc30f"><wd-overlay wx:if="{{p}}" class="data-v-161bc30f" bindclick="{{q}}" bindtouchmove="{{r}}" u-i="161bc30f-4" bind:__l="__l" u-p="{{s}}"/><wd-transition wx:if="{{D}}" class="data-v-161bc30f" u-s="{{['d']}}" bindbeforeEnter="{{x}}" bindenter="{{y}}" bindafterEnter="{{z}}" bindbeforeLeave="{{A}}" bindleave="{{B}}" bindafterLeave="{{C}}" u-i="161bc30f-5" bind:__l="__l" u-p="{{D}}"><slot/><wd-icon wx:if="{{t}}" class="data-v-161bc30f" bindclick="{{v}}" u-i="161bc30f-6,161bc30f-5" bind:__l="__l" u-p="{{w}}"/></wd-transition></view>
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/wot-design-uni/components/wd-popup/wd-popup.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.wot-theme-dark .wd-popup-wrapper.data-v-161bc30f .wd-popup{background:var(--wot-dark-background2, #1b1b1b)}.wot-theme-dark .wd-popup-wrapper.data-v-161bc30f .wd-popup__close{color:var(--wot-dark-color, var(--wot-color-white, white))}.wd-popup-wrapper.data-v-161bc30f .wd-popup{position:fixed;max-height:100%;overflow-y:auto;background:#fff}.data-v-161bc30f .wd-popup__close{position:absolute;top:10px;right:10px;color:var(--wot-popup-close-color, #666);font-size:var(--wot-popup-close-size, 24px);transform:rotate(-45deg)}.data-v-161bc30f .wd-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0);transform-origin:0% 0%}.data-v-161bc30f .wd-popup--center.wd-zoom-in-enter,.data-v-161bc30f .wd-popup--center.wd-zoom-in-leave-to{transform:scale(.8) translate3d(-50%,-50%,0)!important}.data-v-161bc30f .wd-popup--center.is-deep.wd-zoom-in-enter,.data-v-161bc30f .wd-popup--center.is-deep.wd-zoom-in-leave-to{transform:scale(.1) translate3d(-50%,-50%,0)!important}.data-v-161bc30f .wd-popup--left{top:0;bottom:0;left:0}.data-v-161bc30f .wd-popup--right{top:0;right:0;bottom:0}.data-v-161bc30f .wd-popup--top{top:0;left:0;right:0}.data-v-161bc30f .wd-popup--bottom{right:0;bottom:0;left:0}
|
||||
@@ -0,0 +1 @@
|
||||
"use strict";const o={name:"wd-root-portal",options:{virtualHost:!0,addGlobalClass:!0,styleIsolation:"shared"}};const t=require("../../../../common/vendor.js")._export_sfc(o,[["render",function(o,t,e,r,n,s){return{}}]]);wx.createComponent(t);
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user