first commit

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

View File

@@ -0,0 +1 @@
"use strict";const 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;

View 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);

View 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"
}
}

View 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>

View 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}