first commit

This commit is contained in:
PC-202306242200\Administrator
2026-03-28 23:09:02 +08:00
commit dac42e3b0c
3512 changed files with 181637 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
"use strict";
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
const props = {
props: {
// 是否展示弹窗
show: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.show
},
// 是否显示遮罩
overlay: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.overlay
},
// 弹出的方向,可选值为 top bottom right left center
mode: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.mode
},
// 动画时长单位ms
duration: {
type: [String, Number],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.duration
},
// 是否显示关闭图标
closeable: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.closeable
},
// 自定义遮罩的样式
overlayStyle: {
type: [Object, String],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.overlayStyle
},
// 点击遮罩是否关闭弹窗
closeOnClickOverlay: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.closeOnClickOverlay
},
// 层级
zIndex: {
type: [String, Number],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.zIndex
},
// 是否为iPhoneX留出底部安全距离
safeAreaInsetBottom: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.safeAreaInsetBottom
},
// 是否留出顶部安全距离(状态栏高度)
safeAreaInsetTop: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.safeAreaInsetTop
},
// 自定义关闭图标位置top-left为左上角top-right为右上角bottom-left为左下角bottom-right为右下角
closeIconPos: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.closeIconPos
},
// 是否显示圆角
round: {
type: [Boolean, String, Number],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.round
},
// mode=center也即中部弹出时是否使用缩放模式
zoom: {
type: Boolean,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.zoom
},
// 弹窗背景色设置为transparent可去除白色背景
bgColor: {
type: String,
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.bgColor
},
// 遮罩的透明度0-1之间
overlayOpacity: {
type: [Number, String],
default: () => uni_modules_uviewPlus_libs_config_props.defProps.popup.overlayOpacity
}
}
};
exports.props = props;

View File

@@ -0,0 +1,75 @@
.u-empty.data-v-05c24e9b,
.u-empty__wrap.data-v-05c24e9b,
.u-tabs.data-v-05c24e9b,
.u-tabs__wrapper.data-v-05c24e9b,
.u-tabs__wrapper__scroll-view-wrapper.data-v-05c24e9b,
.u-tabs__wrapper__scroll-view.data-v-05c24e9b,
.u-tabs__wrapper__nav.data-v-05c24e9b,
.u-tabs__wrapper__nav__line.data-v-05c24e9b {
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-05c24e9b {
flex: 1;
}
.u-popup__content.data-v-05c24e9b {
background-color: #fff;
position: relative;
}
.u-popup__content--round-top.data-v-05c24e9b {
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-05c24e9b {
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-05c24e9b {
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-05c24e9b {
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-05c24e9b {
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-05c24e9b {
position: absolute;
}
.u-popup__content__close--hover.data-v-05c24e9b {
opacity: 0.4;
}
.u-popup__content__close--top-left.data-v-05c24e9b {
top: 15px;
left: 15px;
}
.u-popup__content__close--top-right.data-v-05c24e9b {
top: 15px;
right: 15px;
}
.u-popup__content__close--bottom-left.data-v-05c24e9b {
bottom: 15px;
left: 15px;
}
.u-popup__content__close--bottom-right.data-v-05c24e9b {
right: 15px;
bottom: 15px;
}

View File

@@ -0,0 +1 @@
<view class="u-popup data-v-05c24e9b"><u-overlay a:if="{{a}}" class="data-v-05c24e9b" onClick="{{b}}" u-i="05c24e9b-0" onVI="__l" u-p="{{c}}"></u-overlay><u-transition class="data-v-05c24e9b" u-s="{{['d']}}" onAfterEnter="{{l}}" onClick="{{m}}" u-i="05c24e9b-1" onVI="__l" u-p="{{n}}"><view class="u-popup__content data-v-05c24e9b" style="{{j}}" catchTap="{{k}}"><u-status-bar a:if="{{d}}" class="data-v-05c24e9b" u-i="05c24e9b-2,05c24e9b-1" onVI="__l"></u-status-bar><slot></slot><view a:if="{{e}}" catchTap="{{g}}" class="{{('u-popup__content__close') + ' ' + 'data-v-05c24e9b' + ' ' + h}}" hover-class="u-popup__content__close--hover" hover-stay-time="150"><u-icon class="data-v-05c24e9b" u-i="05c24e9b-3,05c24e9b-1" onVI="__l" u-p="{{f}}"></u-icon></view><u-safe-bottom a:if="{{i}}" class="data-v-05c24e9b" u-i="05c24e9b-4,05c24e9b-1" onVI="__l"></u-safe-bottom></view></u-transition></view>

View File

@@ -0,0 +1,178 @@
"use strict";
const uni_modules_uviewPlus_components_uPopup_props = require("./props.js");
const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-popup",
mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uPopup_props.props],
data() {
return {
overlayDuration: this.duration + 50
};
},
watch: {
show(newValue, oldValue) {
}
},
computed: {
transitionStyle() {
const style = {
zIndex: this.zIndex,
position: "fixed",
display: "flex"
};
style[this.mode] = 0;
if (this.mode === "left") {
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
bottom: 0,
top: 0
});
} else if (this.mode === "right") {
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
bottom: 0,
top: 0
});
} else if (this.mode === "top") {
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
left: 0,
right: 0
});
} else if (this.mode === "bottom") {
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
left: 0,
right: 0
});
} else if (this.mode === "center") {
return uni_modules_uviewPlus_libs_function_index.deepMerge(style, {
alignItems: "center",
"justify-content": "center",
top: 0,
left: 0,
right: 0,
bottom: 0
});
}
},
contentStyle() {
const style = {};
uni_modules_uviewPlus_libs_function_index.sys();
if (this.mode !== "center") {
style.flex = 1;
}
if (this.bgColor) {
style.backgroundColor = this.bgColor;
}
if (this.round) {
const value = uni_modules_uviewPlus_libs_function_index.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 uni_modules_uviewPlus_libs_function_index.deepMerge(style, uni_modules_uviewPlus_libs_function_index.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"],
methods: {
// 点击遮罩
overlayClick() {
if (this.closeOnClickOverlay) {
this.$emit("close");
}
},
close(e) {
this.$emit("close");
},
afterEnter() {
this.$emit("open");
},
clickHandler() {
if (this.mode === "center") {
this.overlayClick();
}
this.$emit("click");
}
}
};
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($options.afterEnter),
m: common_vendor.o($options.clickHandler),
n: common_vendor.p({
show: _ctx.show,
customStyle: $options.transitionStyle,
mode: $options.position,
duration: _ctx.duration
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-05c24e9b"]]);
my.createComponent(Component);

View File

@@ -0,0 +1,11 @@
{
"component": true,
"styleIsolation": "apply-shared",
"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"
}
}