提交
This commit is contained in:
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.acss
generated
vendored
Normal file
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.acss
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.ant-popup{position:fixed;top:0;bottom:0;left:0;right:0;z-index:998;touch-action:none}.ant-popup-mask{width:100%;height:100%;background-color:rgba(0,0,0,.55);animation-fill-mode:forwards}.ant-popup-mask-closing{animation-name:ant-popup-mask-close}.ant-popup-content{position:fixed;background:#fff;animation-fill-mode:forwards;animation-timing-function:ease-out;color:#333}.ant-popup-transform-top{top:0;left:0;right:0;animation-name:ant-popup-transform-top;border-radius:0 0 8px 8px}.ant-popup-transform-top-close{animation-name:ant-popup-transform-top-close}.ant-popup-transform-right{top:0;right:0;bottom:0;animation-name:ant-popup-transform-right}.ant-popup-transform-right-close{animation-name:ant-popup-transform-right-close}.ant-popup-transform-bottom{left:0;right:0;bottom:0;animation-name:ant-popup-transform-bottom;border-radius:8px 8px 0 0}.ant-popup-transform-bottom-close{animation-name:ant-popup-transform-bottom-close}.ant-popup-transform-left{top:0;left:0;bottom:0;animation-name:ant-popup-transform-left}.ant-popup-transform-left-close{animation-name:ant-popup-transform-left-close}.ant-popup-transform-center{top:50%;left:50%;transform:translate3d(-50%,-50%,0);animation-name:ant-popup-transform-center;border-radius:8px;background:0 0}.ant-popup-transform-center-close{animation-name:ant-popup-transform-center-close}.ant-popup-position-top{top:0;left:0;right:0;animation-name:ant-popup-position-top;border-radius:0 0 8px 8px}.ant-popup-position-top-close{animation-name:ant-popup-position-top-close}.ant-popup-position-right{top:0;right:0;bottom:0;animation-name:ant-popup-position-right}.ant-popup-position-right-close{animation-name:ant-popup-position-right-close}.ant-popup-position-bottom{left:0;right:0;bottom:0;animation-name:ant-popup-position-bottom;border-radius:8px 8px 0 0}.ant-popup-position-bottom-close{animation-name:ant-popup-position-bottom-close}.ant-popup-position-left{top:0;left:0;bottom:0;animation-name:ant-popup-position-left}.ant-popup-position-left-close{animation-name:ant-popup-position-left-close}.ant-popup-position-center{top:50%;left:50%;transform:translate3d(-50%,-50%,0);animation-name:ant-popup-position-center;border-radius:8px;background:0 0}.ant-popup-position-center-close{animation-name:ant-popup-position-center-close}@keyframes ant-popup-transform-top{0%{transform:translateY(-100%)}100%{transform:translateY(0)}}@keyframes ant-popup-transform-bottom{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes ant-popup-transform-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes ant-popup-transform-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes ant-popup-transform-center{0%{transform:translate3d(-50%,-50%,0) scale(.1);opacity:0}100%{transform:translate3d(-50%,-50%,0) scale(1);opacity:1}}@keyframes ant-popup-transform-top-close{0%{transform:translateY(0)}100%{transform:translateY(-100%)}}@keyframes ant-popup-transform-bottom-close{0%{transform:translateY(0)}100%{transform:translateY(100%)}}@keyframes ant-popup-transform-left-close{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}@keyframes ant-popup-transform-right-close{0%{transform:translateX(0)}100%{transform:translateX(100%)}}@keyframes ant-popup-transform-center-close{0%{opacity:1;transform:translate3d(-50%,-50%,0) scale(1)}20%{opacity:.8;transform:translate3d(-50%,-50%,0) scale(.9)}100%{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}}@keyframes ant-popup-position-top{0%{top:-100%}100%{top:0}}@keyframes ant-popup-position-bottom{0%{bottom:-100%}100%{bottom:0}}@keyframes ant-popup-position-left{0%{left:-100%}100%{left:0}}@keyframes ant-popup-position-right{0%{right:-100%}100%{right:0}}@keyframes ant-popup-position-center{0%{transform:translate3d(-50%,-50%,0) scale(.1);opacity:0}100%{transform:translate3d(-50%,-50%,0) scale(1);opacity:1}}@keyframes ant-popup-position-top-close{0%{top:0}100%{top:-100%}}@keyframes ant-popup-position-bottom-close{0%{bottom:0}100%{bottom:-100%}}@keyframes ant-popup-position-left-close{0%{left:0}100%{left:-100%}}@keyframes ant-popup-position-right-close{0%{right:0}100%{right:-100%}}@keyframes ant-popup-position-center-close{0%{opacity:1;transform:translate3d(-50%,-50%,0) scale(1)}20%{opacity:.8;transform:translate3d(-50%,-50%,0) scale(.9)}100%{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}}@keyframes ant-popup-mask-close{0%{background-color:rgba(0,0,0,.55)}100%{background-color:rgba(0,0,0,0)}}
|
30
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.axml
generated
vendored
Normal file
30
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.axml
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<import-sjs
|
||||
from="./index.sjs"
|
||||
name="utils"
|
||||
></import-sjs>
|
||||
<view
|
||||
a:if="{{!destroyOnClose || visible || closing}}"
|
||||
class="ant-popup {{className || ''}}"
|
||||
style="{{zIndex ? 'z-index:' + zIndex : ''}};{{style || ''}}"
|
||||
hidden="{{!destroyOnClose && !visible && !closing}}"
|
||||
>
|
||||
<view
|
||||
a:if="{{showMask}}"
|
||||
class="ant-popup-mask {{maskClassName || ''}} {{closing && !visible ? 'ant-popup-mask-closing' : ''}}"
|
||||
onTap="onTapMask"
|
||||
style="{{animation ? '-webkit-animation-duration:' + duration + 'ms; animation-duration:' + duration + 'ms;' : ''}} {{maskStyle || ''}}"
|
||||
>
|
||||
<slot name="mask"></slot>
|
||||
</view>
|
||||
<view
|
||||
class="ant-popup-content ant-popup-{{animationType}}-{{position}} {{closing ? 'ant-popup-' + animationType + '-' + position + '-close' : ''}}"
|
||||
style="{{utils.getContentStyle(position, animation, duration, width, height)}}"
|
||||
onAnimationEnd="onAnimationEnd"
|
||||
>
|
||||
<slot></slot>
|
||||
<slot
|
||||
name="content"
|
||||
a:if="{{isOldVersion}}"
|
||||
></slot>
|
||||
</view>
|
||||
</view>
|
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.d.ts
generated
vendored
Normal file
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
64
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.js
generated
vendored
Normal file
64
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.js
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
import { __awaiter, __generator } from "tslib";
|
||||
import { Component, triggerEventOnly, getValueFromProps, } from '../_util/simply';
|
||||
import { PopupDefaultProps } from './props';
|
||||
import { isOldSDKVersion } from '../_util/platform';
|
||||
var isOldVersion = isOldSDKVersion();
|
||||
Component(PopupDefaultProps, {
|
||||
onTapMask: function () {
|
||||
var closing = this.data.closing;
|
||||
if (closing) {
|
||||
return;
|
||||
}
|
||||
triggerEventOnly(this, 'close');
|
||||
},
|
||||
onAnimationEnd: function () {
|
||||
var closing = this.data.closing;
|
||||
if (closing) {
|
||||
this.setData({ closing: false });
|
||||
}
|
||||
var _a = getValueFromProps(this, [
|
||||
'visible',
|
||||
'duration',
|
||||
'animation',
|
||||
]), visible = _a[0], duration = _a[1], animation = _a[2];
|
||||
var enableAnimation = animation && duration > 0;
|
||||
if (enableAnimation) {
|
||||
triggerEventOnly(this, visible ? 'afterShow' : 'afterClose');
|
||||
}
|
||||
},
|
||||
}, {
|
||||
closing: false,
|
||||
isOldVersion: isOldVersion,
|
||||
}, undefined, {
|
||||
deriveDataFromProps: function (nextProps) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _a, visible, duration, animation, enableAnimation;
|
||||
return __generator(this, function (_b) {
|
||||
_a = getValueFromProps(this, [
|
||||
'visible',
|
||||
'duration',
|
||||
'animation',
|
||||
]), visible = _a[0], duration = _a[1], animation = _a[2];
|
||||
enableAnimation = animation && duration > 0;
|
||||
if (nextProps.visible !== visible &&
|
||||
enableAnimation &&
|
||||
!nextProps.visible &&
|
||||
!this.data.closing) {
|
||||
this.setData({ closing: true });
|
||||
}
|
||||
return [2 /*return*/];
|
||||
});
|
||||
});
|
||||
},
|
||||
didUpdate: function (prevProps) {
|
||||
var _a = getValueFromProps(this, [
|
||||
'visible',
|
||||
'duration',
|
||||
'animation',
|
||||
]), visible = _a[0], duration = _a[1], animation = _a[2];
|
||||
var enableAnimation = animation && duration > 0;
|
||||
if (prevProps.visible !== visible && !enableAnimation) {
|
||||
triggerEventOnly(this, visible ? 'afterShow' : 'afterClose');
|
||||
}
|
||||
},
|
||||
});
|
4
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.json
generated
vendored
Normal file
4
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.json
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
20
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.sjs
generated
vendored
Normal file
20
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/index.sjs
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
function getContentStyle(position, animation, duration, width, height) {
|
||||
var style = '';
|
||||
if (animation) {
|
||||
style += "-webkit-animation-duration:".concat(duration, "ms; animation-duration:").concat(duration, "ms;");
|
||||
}
|
||||
if (position === 'top' || position === 'bottom') {
|
||||
if (typeof height !== 'undefined' && height !== null) {
|
||||
style += "height:".concat(height, "px");
|
||||
}
|
||||
}
|
||||
if (position === 'left' || position === 'right') {
|
||||
if (typeof width !== 'undefined' && width !== null) {
|
||||
style += "width:".concat(width, "px");
|
||||
}
|
||||
}
|
||||
return style;
|
||||
}
|
||||
export default {
|
||||
getContentStyle: getContentStyle
|
||||
};
|
69
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/props.d.ts
generated
vendored
Normal file
69
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/props.d.ts
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
import { IBaseProps } from '../_util/base';
|
||||
/**
|
||||
* @description 弹窗,可在其中加入具体内容,展示更多信息供用户使用。
|
||||
*/
|
||||
export interface IPopupProps extends IBaseProps {
|
||||
/**
|
||||
* @description 是否显示
|
||||
* @default false
|
||||
*/
|
||||
visible: boolean;
|
||||
/**
|
||||
* @description 是否关闭后销毁内部元素
|
||||
* @default false
|
||||
*/
|
||||
destroyOnClose: boolean;
|
||||
/**
|
||||
* @description 是否展示蒙层
|
||||
* @default true
|
||||
*/
|
||||
showMask: boolean;
|
||||
/**
|
||||
* @description 弹窗布局
|
||||
* @default "bottom"
|
||||
*/
|
||||
position: 'center' | 'top' | 'bottom' | 'left' | 'right';
|
||||
/**
|
||||
* @description 是否开启过渡动画
|
||||
*/
|
||||
animation: boolean;
|
||||
/**
|
||||
* @description 动画类型
|
||||
* @default "transform"
|
||||
*/
|
||||
animationType: 'transform' | 'position';
|
||||
/**
|
||||
* @description 过渡动画时长,单位毫秒
|
||||
*/
|
||||
duration: number;
|
||||
/**
|
||||
* @description 内容区高度,单位px
|
||||
*/
|
||||
height: number;
|
||||
/**
|
||||
* @description 内容区宽度,单位px
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* @description 遮罩层类名
|
||||
*/
|
||||
maskClassName: string;
|
||||
/**
|
||||
* @description 遮罩层样式
|
||||
*/
|
||||
maskStyle: string;
|
||||
zIndex: number;
|
||||
/**
|
||||
* @description 关闭时回调
|
||||
*/
|
||||
onClose?: () => void;
|
||||
/**
|
||||
* @description 完全打开时回调
|
||||
*/
|
||||
onAfterShow?: () => void;
|
||||
/**
|
||||
* @description 完全关闭时回调
|
||||
*/
|
||||
onAfterClose?: () => void;
|
||||
}
|
||||
export declare const PopupDefaultProps: Partial<IPopupProps>;
|
17
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/props.js
generated
vendored
Normal file
17
甲情_甲意/miniprogram/node_modules/antd-mini/es/Popup/props.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
export var PopupDefaultProps = {
|
||||
visible: false,
|
||||
destroyOnClose: false,
|
||||
showMask: true,
|
||||
position: 'bottom',
|
||||
// 是否开启动画
|
||||
animation: true,
|
||||
animationType: 'transform',
|
||||
// 动画持续时间
|
||||
duration: 300,
|
||||
height: null,
|
||||
width: null,
|
||||
maskClassName: '',
|
||||
maskStyle: '',
|
||||
// 弹窗层级
|
||||
zIndex: 998,
|
||||
};
|
Reference in New Issue
Block a user