消息
This commit is contained in:
132
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.js
vendored
Normal file
132
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.js
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const TUIKit_utils_env = require("../../../utils/env.js");
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
// Whether to display the bottom pop-up dialog box
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// Whether a mask layer is required, the default is true
|
||||
modal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// Popup box content area height (excluding mask), default is fit-content
|
||||
height: {
|
||||
type: String,
|
||||
default: "fit-content"
|
||||
},
|
||||
// Whether the pop-up dialog box can be closed by clicking outside, the default is true
|
||||
// uniapp only supports closing the pop-up dialog box by clicking the mask
|
||||
closeByClickOutside: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// The rounded angle of the top border corners is 0px by default, i.e. right angle by default
|
||||
borderRadius: {
|
||||
type: String,
|
||||
default: "0px"
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
// Whether to display the top close button, not displayed by default
|
||||
showHeaderCloseButton: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// Whether to display the submit button at the bottom, not displayed by default
|
||||
showFooterSubmitButton: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// Bottom submit button text, only valid when showFooterSubmitButton is true
|
||||
submitButtonContent: {
|
||||
type: String,
|
||||
default: () => common_vendor.Wt.t("确定")
|
||||
}
|
||||
},
|
||||
emits: ["onOpen", "onClose", "onSubmit"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const dialogRef = common_vendor.ref();
|
||||
common_vendor.watch(
|
||||
() => props.show,
|
||||
(newVal, oldVal) => {
|
||||
if (newVal === oldVal) {
|
||||
return;
|
||||
}
|
||||
switch (newVal) {
|
||||
case true:
|
||||
emits("onOpen", dialogRef);
|
||||
common_vendor.nextTick$1(() => {
|
||||
if (TUIKit_utils_env.isH5 && !TUIKit_utils_env.isUniFrameWork) {
|
||||
if (props.closeByClickOutside) {
|
||||
common_vendor.O.listen({
|
||||
domRefs: dialogRef.value,
|
||||
handler: closeBottomPopup
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case false:
|
||||
emits("onClose", dialogRef);
|
||||
break;
|
||||
}
|
||||
}
|
||||
);
|
||||
const closeBottomPopup = () => {
|
||||
if (TUIKit_utils_env.isUniFrameWork || TUIKit_utils_env.isH5) {
|
||||
emits("onClose", dialogRef);
|
||||
}
|
||||
};
|
||||
const submit = () => {
|
||||
emits("onSubmit");
|
||||
closeBottomPopup();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: props.show
|
||||
}, props.show ? common_vendor.e({
|
||||
b: !common_vendor.unref(TUIKit_utils_env.isPC)
|
||||
}, !common_vendor.unref(TUIKit_utils_env.isPC) ? common_vendor.e({
|
||||
c: __props.title || __props.showHeaderCloseButton
|
||||
}, __props.title || __props.showHeaderCloseButton ? common_vendor.e({
|
||||
d: __props.title
|
||||
}, __props.title ? {
|
||||
e: common_vendor.t(__props.title)
|
||||
} : {}, {
|
||||
f: __props.showHeaderCloseButton
|
||||
}, __props.showHeaderCloseButton ? {
|
||||
g: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("关闭")),
|
||||
h: common_vendor.o$1(closeBottomPopup)
|
||||
} : {}) : {}, {
|
||||
i: __props.showFooterSubmitButton
|
||||
}, __props.showFooterSubmitButton ? {
|
||||
j: common_vendor.t(__props.submitButtonContent),
|
||||
k: common_vendor.o$1(submit)
|
||||
} : {}, {
|
||||
l: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "bottom-popup-h5-main"),
|
||||
m: props.height,
|
||||
n: props.borderRadius,
|
||||
o: props.borderRadius,
|
||||
p: common_vendor.o$1(() => {
|
||||
}),
|
||||
q: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "bottom-popup-h5"),
|
||||
r: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && props.modal && "bottom-popup-modal"),
|
||||
s: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "bottom-popup-uni"),
|
||||
t: common_vendor.o$1(closeBottomPopup)
|
||||
}) : {}) : {});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6d2e47d7"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/common/BottomPopup/index.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view wx:if="{{a}}" class="data-v-6d2e47d7"><view wx:if="{{b}}" class="{{['data-v-6d2e47d7', 'bottom-popup', q, r, s]}}" bindtap="{{t}}"><view ref="dialogRef" class="{{['data-v-6d2e47d7', 'bottom-popup-main', l]}}" style="{{'height:' + m + ';' + ('border-top-left-radius:' + n) + ';' + ('border-top-right-radius:' + o)}}" catchtap="{{p}}"><view wx:if="{{c}}" class="header data-v-6d2e47d7"><view wx:if="{{d}}" class="header-title data-v-6d2e47d7">{{e}}</view><view wx:if="{{f}}" class="header-close data-v-6d2e47d7" bindtap="{{h}}">{{g}}</view></view><slot/><view wx:if="{{i}}" class="footer data-v-6d2e47d7"><view class="footer-submit data-v-6d2e47d7" bindtap="{{k}}">{{j}}</view></view></view></view><slot wx:else/></view>
|
||||
133
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.wxss
vendored
Normal file
133
unpackage/dist/dev/mp-weixin/TUIKit/components/common/BottomPopup/index.wxss
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-6d2e47d7, div.data-v-6d2e47d7, ul.data-v-6d2e47d7, ol.data-v-6d2e47d7, dt.data-v-6d2e47d7, dd.data-v-6d2e47d7, li.data-v-6d2e47d7, dl.data-v-6d2e47d7, h1.data-v-6d2e47d7, h2.data-v-6d2e47d7, h3.data-v-6d2e47d7, h4.data-v-6d2e47d7, p.data-v-6d2e47d7 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-6d2e47d7, ul.data-v-6d2e47d7, li.data-v-6d2e47d7 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-6d2e47d7 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-6d2e47d7 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-6d2e47d7 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-6d2e47d7 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-6d2e47d7:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-6d2e47d7, textarea.data-v-6d2e47d7 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-6d2e47d7:focus, input.data-v-6d2e47d7:active, textarea.data-v-6d2e47d7:focus, textarea.data-v-6d2e47d7:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-6d2e47d7 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.bottom-popup-h5.data-v-6d2e47d7 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: stretch;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
z-index: 10;
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
.bottom-popup-h5-main.data-v-6d2e47d7 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: stretch;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
background-color: #fff;
|
||||
}
|
||||
.bottom-popup-h5-main .header.data-v-6d2e47d7 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.bottom-popup-h5-main .header .header-close.data-v-6d2e47d7 {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
color: #006eff;
|
||||
font-size: 18px;
|
||||
}
|
||||
.bottom-popup-h5-main .footer.data-v-6d2e47d7 {
|
||||
padding: 20px;
|
||||
}
|
||||
.bottom-popup-h5-main .footer .footer-submit.data-v-6d2e47d7 {
|
||||
color: #fff;
|
||||
padding: 12px 0;
|
||||
width: 100%;
|
||||
background: #006eff;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.bottom-popup-uni.data-v-6d2e47d7 {
|
||||
padding-bottom: var(--window-bottom);
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
.bottom-popup-modal.data-v-6d2e47d7 {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
Reference in New Issue
Block a user