打包地址
This commit is contained in:
+221
@@ -0,0 +1,221 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-popup",
|
||||
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$4],
|
||||
data() {
|
||||
return {
|
||||
overlayDuration: this.duration + 50
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
show(newValue, oldValue) {
|
||||
if (newValue === true) {
|
||||
const children = this.$children;
|
||||
this.retryComputedComponentRect(children);
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
transitionStyle() {
|
||||
const style = {
|
||||
zIndex: this.zIndex,
|
||||
position: "fixed",
|
||||
display: "flex"
|
||||
};
|
||||
style[this.mode] = 0;
|
||||
if (this.mode === "left") {
|
||||
return common_vendor.deepMerge(style, {
|
||||
bottom: 0,
|
||||
top: 0
|
||||
});
|
||||
} else if (this.mode === "right") {
|
||||
return common_vendor.deepMerge(style, {
|
||||
bottom: 0,
|
||||
top: 0
|
||||
});
|
||||
} else if (this.mode === "top") {
|
||||
return common_vendor.deepMerge(style, {
|
||||
left: 0,
|
||||
right: 0
|
||||
});
|
||||
} else if (this.mode === "bottom") {
|
||||
return common_vendor.deepMerge(style, {
|
||||
left: 0,
|
||||
right: 0
|
||||
});
|
||||
} else if (this.mode === "center") {
|
||||
return common_vendor.deepMerge(style, {
|
||||
alignItems: "center",
|
||||
"justify-content": "center",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0
|
||||
});
|
||||
}
|
||||
},
|
||||
contentStyle() {
|
||||
const style = {};
|
||||
common_vendor.getWindowInfo();
|
||||
if (this.mode !== "center") {
|
||||
style.flex = 1;
|
||||
}
|
||||
if (this.bgColor) {
|
||||
style.backgroundColor = this.bgColor;
|
||||
}
|
||||
if (this.round) {
|
||||
const value = common_vendor.addUnit(this.round);
|
||||
if (this.mode === "top") {
|
||||
style.borderBottomLeftRadius = value;
|
||||
style.borderBottomRightRadius = value;
|
||||
} else if (this.mode === "bottom") {
|
||||
style.borderTopLeftRadius = value;
|
||||
style.borderTopRightRadius = value;
|
||||
} else if (this.mode === "center") {
|
||||
style.borderRadius = value;
|
||||
}
|
||||
}
|
||||
return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle));
|
||||
},
|
||||
position() {
|
||||
if (this.mode === "center") {
|
||||
return this.zoom ? "fade-zoom" : "fade";
|
||||
}
|
||||
if (this.mode === "left") {
|
||||
return "slide-left";
|
||||
}
|
||||
if (this.mode === "right") {
|
||||
return "slide-right";
|
||||
}
|
||||
if (this.mode === "bottom") {
|
||||
return "slide-up";
|
||||
}
|
||||
if (this.mode === "top") {
|
||||
return "slide-down";
|
||||
}
|
||||
}
|
||||
},
|
||||
emits: ["open", "close", "click", "update:show"],
|
||||
methods: {
|
||||
// 点击遮罩
|
||||
overlayClick() {
|
||||
if (this.closeOnClickOverlay) {
|
||||
this.$emit("update:show", false);
|
||||
this.$emit("close");
|
||||
}
|
||||
},
|
||||
close(e) {
|
||||
this.$emit("update:show", false);
|
||||
this.$emit("close");
|
||||
},
|
||||
afterEnter() {
|
||||
this.$emit("open");
|
||||
},
|
||||
clickHandler() {
|
||||
if (this.mode === "center") {
|
||||
this.overlayClick();
|
||||
}
|
||||
this.$emit("click");
|
||||
},
|
||||
retryComputedComponentRect(children) {
|
||||
const names = [
|
||||
"u-calendar-month",
|
||||
"u-album",
|
||||
"u-collapse-item",
|
||||
"u-dropdown",
|
||||
"u-index-item",
|
||||
"u-index-list",
|
||||
"u-line-progress",
|
||||
"u-list-item",
|
||||
"u-rate",
|
||||
"u-read-more",
|
||||
"u-row",
|
||||
"u-row-notice",
|
||||
"u-scroll-list",
|
||||
"u-skeleton",
|
||||
"u-slider",
|
||||
"u-steps-item",
|
||||
"u-sticky",
|
||||
"u-subsection",
|
||||
"u-swipe-action-item",
|
||||
"u-tabbar",
|
||||
"u-tabs",
|
||||
"u-tooltip"
|
||||
];
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
const grandChild = child.$children;
|
||||
if (names.includes(child.$options.name) && typeof (child == null ? void 0 : child.init) === "function") {
|
||||
common_vendor.sleep(50).then(() => {
|
||||
child.init();
|
||||
});
|
||||
}
|
||||
if (grandChild.length) {
|
||||
this.retryComputedComponentRect(grandChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_overlay2 = common_vendor.resolveComponent("u-overlay");
|
||||
const _easycom_u_status_bar2 = common_vendor.resolveComponent("u-status-bar");
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
const _easycom_u_safe_bottom2 = common_vendor.resolveComponent("u-safe-bottom");
|
||||
const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
|
||||
(_easycom_u_overlay2 + _easycom_u_status_bar2 + _easycom_u_icon2 + _easycom_u_safe_bottom2 + _easycom_u_transition2)();
|
||||
}
|
||||
const _easycom_u_overlay = () => "../u-overlay/u-overlay.js";
|
||||
const _easycom_u_status_bar = () => "../u-status-bar/u-status-bar.js";
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_u_safe_bottom = () => "../u-safe-bottom/u-safe-bottom.js";
|
||||
const _easycom_u_transition = () => "../u-transition/u-transition.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_overlay + _easycom_u_status_bar + _easycom_u_icon + _easycom_u_safe_bottom + _easycom_u_transition)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.overlay
|
||||
}, _ctx.overlay ? {
|
||||
b: common_vendor.o($options.overlayClick),
|
||||
c: common_vendor.p({
|
||||
show: _ctx.show,
|
||||
zIndex: _ctx.zIndex,
|
||||
duration: $data.overlayDuration,
|
||||
customStyle: _ctx.overlayStyle,
|
||||
opacity: _ctx.overlayOpacity
|
||||
})
|
||||
} : {}, {
|
||||
d: _ctx.safeAreaInsetTop
|
||||
}, _ctx.safeAreaInsetTop ? {} : {}, {
|
||||
e: _ctx.closeable
|
||||
}, _ctx.closeable ? {
|
||||
f: common_vendor.p({
|
||||
name: "close",
|
||||
color: "#909399",
|
||||
size: "18",
|
||||
bold: true
|
||||
}),
|
||||
g: common_vendor.o((...args) => $options.close && $options.close(...args)),
|
||||
h: common_vendor.n("u-popup__content__close--" + _ctx.closeIconPos)
|
||||
} : {}, {
|
||||
i: _ctx.safeAreaInsetBottom
|
||||
}, _ctx.safeAreaInsetBottom ? {} : {}, {
|
||||
j: common_vendor.s($options.contentStyle),
|
||||
k: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)),
|
||||
l: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)),
|
||||
m: common_vendor.o($options.afterEnter),
|
||||
n: common_vendor.o($options.clickHandler),
|
||||
o: common_vendor.p({
|
||||
show: _ctx.show,
|
||||
customStyle: $options.transitionStyle,
|
||||
mode: $options.position,
|
||||
duration: _ctx.duration
|
||||
}),
|
||||
p: common_vendor.n(_ctx.customClass)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-74921bef"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.js.map
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"u-overlay": "../u-overlay/u-overlay",
|
||||
"u-status-bar": "../u-status-bar/u-status-bar",
|
||||
"u-icon": "../u-icon/u-icon",
|
||||
"u-safe-bottom": "../u-safe-bottom/u-safe-bottom",
|
||||
"u-transition": "../u-transition/u-transition"
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="{{['u-popup', 'data-v-74921bef', p]}}"><u-overlay wx:if="{{a}}" class="data-v-74921bef" bindclick="{{b}}" u-i="74921bef-0" bind:__l="__l" u-p="{{c}}"></u-overlay><u-transition wx:if="{{o}}" class="data-v-74921bef" u-s="{{['d']}}" bindafterEnter="{{m}}" bindclick="{{n}}" u-i="74921bef-1" bind:__l="__l" u-p="{{o}}"><view class="u-popup__content data-v-74921bef" style="{{j}}" catchtap="{{k}}" catchtouchmove="{{l}}"><u-status-bar wx:if="{{d}}" class="data-v-74921bef" u-i="74921bef-2,74921bef-1" bind:__l="__l"></u-status-bar><slot></slot><view wx:if="{{e}}" catchtap="{{g}}" class="{{['u-popup__content__close', 'data-v-74921bef', h]}}" hover-class="u-popup__content__close--hover" hover-stay-time="150"><u-icon wx:if="{{f}}" class="data-v-74921bef" u-i="74921bef-3,74921bef-1" bind:__l="__l" u-p="{{f}}"></u-icon></view><u-safe-bottom wx:if="{{i}}" class="data-v-74921bef" u-i="74921bef-4,74921bef-1" bind:__l="__l"></u-safe-bottom></view></u-transition></view>
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.u-empty.data-v-74921bef,
|
||||
.u-empty__wrap.data-v-74921bef,
|
||||
.u-tabs.data-v-74921bef,
|
||||
.u-tabs__wrapper.data-v-74921bef,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-74921bef,
|
||||
.u-tabs__wrapper__scroll-view.data-v-74921bef,
|
||||
.u-tabs__wrapper__nav.data-v-74921bef,
|
||||
.u-tabs__wrapper__nav__line.data-v-74921bef,
|
||||
.up-empty.data-v-74921bef,
|
||||
.up-empty__wrap.data-v-74921bef,
|
||||
.up-tabs.data-v-74921bef,
|
||||
.up-tabs__wrapper.data-v-74921bef,
|
||||
.up-tabs__wrapper__scroll-view-wrapper.data-v-74921bef,
|
||||
.up-tabs__wrapper__scroll-view.data-v-74921bef,
|
||||
.up-tabs__wrapper__nav.data-v-74921bef,
|
||||
.up-tabs__wrapper__nav__line.data-v-74921bef {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-popup.data-v-74921bef {
|
||||
flex: 1;
|
||||
}
|
||||
.u-popup__content.data-v-74921bef {
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
}
|
||||
.u-popup__content--round-top.data-v-74921bef {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
.u-popup__content--round-left.data-v-74921bef {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
.u-popup__content--round-right.data-v-74921bef {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.u-popup__content--round-bottom.data-v-74921bef {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.u-popup__content--round-center.data-v-74921bef {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
.u-popup__content__close.data-v-74921bef {
|
||||
position: absolute;
|
||||
}
|
||||
.u-popup__content__close--hover.data-v-74921bef {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.u-popup__content__close--top-left.data-v-74921bef {
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
}
|
||||
.u-popup__content__close--top-right.data-v-74921bef {
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
.u-popup__content__close--bottom-left.data-v-74921bef {
|
||||
bottom: 15px;
|
||||
left: 15px;
|
||||
}
|
||||
.u-popup__content__close--bottom-right.data-v-74921bef {
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
Reference in New Issue
Block a user