first commit
This commit is contained in:
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/computed.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/computed.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const t={getPopupStyles:function({zIndex:t,distanceTop:p,placement:e,duration:o}){let n=t?`z-index:${t};`:"";return"top"!==e&&"left"!==e&&"right"!==e||!p||(n=`${n}top:${p}px;--td-popup-distance-top:${p}px;`),o&&(n=`${n}--td-popup-transition:all ${o}ms ease;`),n}};exports.popup=t;
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../common/src/instantiationDecorator.js"),o=require("../common/config.js"),s=require("./props.js"),r=require("../mixins/transition.js"),n=require("../mixins/using-custom-navbar.js"),l=require("../common/utils.wxs.js"),t=require("./computed.js"),i=require("../../../../common/vendor.js");delete s.props.visible;const a=`${o.prefix}-popup`,c=e.uniComponent({name:a,options:{styleIsolation:"shared"},externalClasses:[`${o.prefix}-class`,`${o.prefix}-class-content`],mixins:[r.transitionMixins,n.useCustomNavbarBehavior],components:{TOverlay:()=>"../overlay/overlay.js",TIcon:()=>"../icon/icon.js"},props:{...s.props},emits:["visible-change","leaved","update:visible"],data:()=>({prefix:o.prefix,classPrefix:a,popup:t.popup,tools:l.tools}),computed:{innerPreventScrollThrough(){const{preventScrollThrough:e,overlayProps:o}=this;return e||!!o&&!!o.preventScrollThrough}},methods:{noop(){},handleOverlayClick(){const{closeOnOverlayClick:e}=this;e&&(this.$emit("visible-change",{visible:!1,trigger:"overlay"}),this.$emit("update:visible",!1))},handleClose(){this.$emit("visible-change",{visible:!1,trigger:"close-btn"}),this.$emit("update:visible",!1)}}});if(!Array){(i.resolveComponent("t-icon")+i.resolveComponent("t-overlay"))()}Math||((()=>"../icon/icon.js")+(()=>"../overlay/overlay.js"))();const p=i._export_sfc(c,[["render",function(e,o,s,r,n,l){return i.e({a:e.realVisible},e.realVisible?i.e({b:e.innerPreventScrollThrough},e.innerPreventScrollThrough?i.e({c:e.closeBtn},e.closeBtn?{d:i.p({name:"close",size:"64rpx"})}:{},{e:i.r("close-btn",{class:e.classPrefix+"-slot"}),f:i.n(e.classPrefix+"__close"),g:i.o(((...o)=>e.handleClose&&e.handleClose(...o))),h:i.n(e.classPrefix+"__content "+e.tClassContent),i:i.o(((...o)=>e.noop&&e.noop(...o)))}):i.e({j:e.closeBtn},e.closeBtn?{k:i.p({name:"close",size:"64rpx"})}:{},{l:i.r("close-btn",{class:e.classPrefix+"-slot"}),m:i.n(e.classPrefix+"__close"),n:i.o(((...o)=>e.handleClose&&e.handleClose(...o))),o:i.n(e.classPrefix+"__content "+e.tClassContent)}),{p:i.s(e.tools._style([e.popup.getPopupStyles({zIndex:e.zIndex,distanceTop:e.distanceTop,placement:e.placement,duration:e.duration}),e.customStyle])),q:i.n(e.tools.cls(e.classPrefix,[e.placement])+" "+e.transitionClass+" "+e.tClass),r:i.o(((...o)=>e.onTransitionEnd&&e.onTransitionEnd(...o)))}):{},{s:e.showOverlay},e.showOverlay?{t:i.o((o=>e.handleOverlayClick(o,{tagId:"popup-overlay"}))),v:i.p({id:"popup-overlay",visible:e.visible,"using-custom-navbar":e.usingCustomNavbar,"custom-navbar-height":e.customNavbarHeight,"z-index":e.overlayProps&&e.overlayProps.zIndex||11e3,duration:e.overlayProps&&e.overlayProps.duration||300,"background-color":e.overlayProps&&e.overlayProps.backgroundColor||"","prevent-scroll-through":e.preventScrollThrough||!!e.overlayProps&&!!e.overlayProps.preventScrollThrough,"custom-style":e.overlayProps&&e.overlayProps.style||""})}:{})}],["__scopeId","data-v-cc2f844d"]]);wx.createComponent(p);
|
||||
7
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.json
vendored
Normal file
7
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-overlay": "../overlay/overlay",
|
||||
"t-icon": "../icon/icon"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="data-v-cc2f844d"><view wx:if="{{a}}" style="{{p}}" class="{{['data-v-cc2f844d', q]}}" bindtransitionend="{{r}}"><view wx:if="{{b}}" class="{{['data-v-cc2f844d', h]}}" catchtouchmove="{{i}}"><slot name="content"/><slot/><view class="{{['data-v-cc2f844d', f]}}" bindtap="{{g}}"><t-icon wx:if="{{c}}" class="data-v-cc2f844d" u-i="cc2f844d-0" bind:__l="__l" u-p="{{d}}"/><slot name="close-btn"/></view></view><view wx:else class="{{['data-v-cc2f844d', o]}}"><slot name="content"/><slot/><view class="{{['data-v-cc2f844d', m]}}" bindtap="{{n}}"><t-icon wx:if="{{j}}" class="data-v-cc2f844d" u-i="cc2f844d-1" bind:__l="__l" u-p="{{k}}"/><slot name="close-btn"/></view></view></view><t-overlay wx:if="{{s}}" class="data-v-cc2f844d" id="popup-overlay" bindclick="{{t}}" u-i="cc2f844d-2" bind:__l="__l" u-p="{{v}}"/></view>
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/popup.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.t-popup.data-v-cc2f844d{position:fixed;z-index:11500;max-height:calc(100vh - var(--td-popup-distance-top, 0));transition:var(--td-popup-transition, all .3s ease);background-color:var(--td-popup-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)))}.t-popup__content.data-v-cc2f844d{position:relative;height:100%;z-index:1}.t-popup__close.data-v-cc2f844d{position:absolute;top:0;right:0;padding:20rpx;line-height:1;color:var(--td-popup-close-btn-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, .9))))}.t-popup--top.data-v-cc2f844d{top:0;left:0;width:100%;border-bottom-left-radius:var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));border-bottom-right-radius:var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx))}.t-popup--bottom.data-v-cc2f844d{bottom:0;left:0;width:100%;border-top-left-radius:var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));border-top-right-radius:var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx));padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.t-popup--left.data-v-cc2f844d{top:0;left:0;height:100%}.t-popup--right.data-v-cc2f844d{top:0;right:0;height:100%}.t-popup--center.data-v-cc2f844d{top:50%;left:50%;transform:scale(1) translate3d(-50%,-50%,0);transform-origin:0% 0%;border-radius:var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx))}.t-popup.t-fade-enter.t-popup--top.data-v-cc2f844d,.t-popup.t-fade-leave-to.t-popup--top.data-v-cc2f844d{transform:translateY(-100%);transform-origin:0% 0%}.t-popup.t-fade-enter.t-popup--bottom.data-v-cc2f844d,.t-popup.t-fade-leave-to.t-popup--bottom.data-v-cc2f844d{transform:translateY(100%)}.t-popup.t-fade-enter.t-popup--left.data-v-cc2f844d,.t-popup.t-fade-leave-to.t-popup--left.data-v-cc2f844d{transform:translate(-100%)}.t-popup.t-fade-enter.t-popup--right.data-v-cc2f844d,.t-popup.t-fade-leave-to.t-popup--right.data-v-cc2f844d{transform:translate(100%)}.t-popup.t-fade-enter.t-popup--center.data-v-cc2f844d,.t-popup.t-fade-leave-to.t-popup--center.data-v-cc2f844d,.t-popup.t-dialog-enter.t-popup--center.data-v-cc2f844d,.t-popup.t-dialog-leave-to.t-popup--center.data-v-cc2f844d{transform:scale(.6) translate3d(-50%,-50%,0);opacity:0}
|
||||
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/props.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/uni_modules/tdesign-uniapp/components/popup/props.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e={closeBtn:{type:Boolean},closeOnOverlayClick:{type:Boolean,default:!0},content:{type:String},duration:{type:Number,default:240},overlayProps:{type:Object,default:()=>({})},placement:{type:String,default:"top",validator:e=>!e||["top","left","right","bottom","center"].includes(e)},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},usingCustomNavbar:Boolean,visible:Boolean,defaultVisible:Boolean,zIndex:{type:Number,default:11500},onVisibleChange:{type:Function,default:()=>({})}};exports.props=e;
|
||||
Reference in New Issue
Block a user