提交
This commit is contained in:
137
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.axml
generated
vendored
Normal file
137
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.axml
generated
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
<import-sjs
|
||||
from="./index.sjs"
|
||||
name="utils"
|
||||
></import-sjs>
|
||||
<ant-popup
|
||||
className="ant-modal {{className || ''}}"
|
||||
style="{{style || ''}}"
|
||||
maskClassName="{{maskClassName}}"
|
||||
maskStyle="{{maskStyle}}"
|
||||
visible="{{visible}}"
|
||||
duration="{{duration}}"
|
||||
position="center"
|
||||
animation="{{animation}}"
|
||||
zIndex="{{zIndex}}"
|
||||
destroyOnClose="{{destroyOnClose}}"
|
||||
onClose="onMaskClose"
|
||||
>
|
||||
<slot>
|
||||
<view
|
||||
class="ant-modal-body {{bodyClassName || ''}}"
|
||||
style="{{bodyStyle || ''}}"
|
||||
>
|
||||
<slot name="header"></slot>
|
||||
<slot name="title">
|
||||
<view
|
||||
a:if="{{title}}"
|
||||
class="ant-modal-body-title"
|
||||
>
|
||||
{{title}}
|
||||
</view>
|
||||
</slot>
|
||||
<slot name="content">
|
||||
<view
|
||||
a:if="{{content}}"
|
||||
class="ant-modal-body-content"
|
||||
>
|
||||
{{content}}
|
||||
</view>
|
||||
</slot>
|
||||
<slot name="footer">
|
||||
<view
|
||||
a:if="{{type === 'focus'}}"
|
||||
class="ant-modal-body-footer-focus"
|
||||
>
|
||||
<ant-button
|
||||
type="primary"
|
||||
className="ant-modal-body-footer-focus-primary"
|
||||
style="{{primaryButtonStyle || ''}}"
|
||||
onTap="onPrimaryButtonTap"
|
||||
>
|
||||
{{primaryButtonText}}
|
||||
</ant-button>
|
||||
<view
|
||||
a:if="{{secondaryButtonText}}"
|
||||
class="ant-modal-body-footer-focus-secondary"
|
||||
style="{{secondaryButtonStyle || ''}}"
|
||||
onTap="onSecondaryButtonTap"
|
||||
>
|
||||
{{secondaryButtonText}}
|
||||
</view>
|
||||
<view
|
||||
a:if="{{cancelButtonText}}"
|
||||
class="ant-modal-body-footer-focus-cancel"
|
||||
style="{{cancelButtonStyle || ''}}"
|
||||
onTap="onCancelButtonTap"
|
||||
>
|
||||
{{cancelButtonText}}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
a:elif="{{utils.getDirection(primaryButtonText, secondaryButtonText, cancelButtonText, type) === 'horizontal'}}"
|
||||
class="ant-modal-body-footer-horizontal"
|
||||
>
|
||||
<view
|
||||
a:if="{{cancelButtonText}}"
|
||||
class="ant-modal-body-footer-horizontal-cancel"
|
||||
style="{{cancelButtonStyle || ''}}"
|
||||
onTap="onCancelButtonTap"
|
||||
>
|
||||
{{cancelButtonText}}
|
||||
</view>
|
||||
<view
|
||||
a:if="{{secondaryButtonText}}"
|
||||
class="ant-modal-body-footer-horizontal-secondary"
|
||||
style="{{secondaryButtonStyle || ''}}"
|
||||
onTap="onSecondaryButtonTap"
|
||||
>
|
||||
{{secondaryButtonText}}
|
||||
</view>
|
||||
<view
|
||||
a:if="{{primaryButtonText}}"
|
||||
class="ant-modal-body-footer-horizontal-primary"
|
||||
style="{{primaryButtonStyle || ''}}"
|
||||
onTap="onPrimaryButtonTap"
|
||||
>
|
||||
{{primaryButtonText}}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
a:elif="{{utils.getDirection(primaryButtonText, secondaryButtonText, cancelButtonText, type) === 'vertical'}}"
|
||||
class="ant-modal-body-footer-vertical"
|
||||
>
|
||||
<view
|
||||
a:if="{{primaryButtonText}}"
|
||||
class="ant-modal-body-footer-vertical-primary"
|
||||
style="{{primaryButtonStyle || ''}}"
|
||||
onTap="onPrimaryButtonTap"
|
||||
>
|
||||
{{primaryButtonText}}
|
||||
</view>
|
||||
<view
|
||||
a:if="{{secondaryButtonText}}"
|
||||
class="ant-modal-body-footer-vertical-secondary"
|
||||
style="{{secondaryButtonStyle || ''}}"
|
||||
onTap="onSecondaryButtonTap"
|
||||
>
|
||||
{{secondaryButtonText}}
|
||||
</view>
|
||||
<view
|
||||
a:if="{{cancelButtonText}}"
|
||||
class="ant-modal-body-footer-vertical-cancel"
|
||||
style="{{cancelButtonStyle || ''}}"
|
||||
onTap="onCancelButtonTap"
|
||||
>
|
||||
{{cancelButtonText}}
|
||||
</view>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
</slot>
|
||||
<ant-icon
|
||||
a:if="{{type === 'focus' && closable}}"
|
||||
type="CloseOutline"
|
||||
onTap="onClose"
|
||||
className="ant-modal-close"
|
||||
></ant-icon>
|
||||
</ant-popup>
|
1
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.d.ts
generated
vendored
Normal file
1
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
21
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.js
generated
vendored
Normal file
21
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import { Component, triggerEventOnly } from '../_util/simply';
|
||||
import { ModalFunctionalProps } from './props';
|
||||
Component(ModalFunctionalProps, {
|
||||
onClose: function () {
|
||||
triggerEventOnly(this, 'close');
|
||||
},
|
||||
onMaskClose: function () {
|
||||
if (this.props.maskClosable) {
|
||||
triggerEventOnly(this, 'close');
|
||||
}
|
||||
},
|
||||
onPrimaryButtonTap: function () {
|
||||
triggerEventOnly(this, 'primaryButtonTap');
|
||||
},
|
||||
onSecondaryButtonTap: function () {
|
||||
triggerEventOnly(this, 'secondaryButtonTap');
|
||||
},
|
||||
onCancelButtonTap: function () {
|
||||
triggerEventOnly(this, 'cancelButtonTap');
|
||||
},
|
||||
});
|
8
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.json
generated
vendored
Normal file
8
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.json
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"ant-button": "../Button/index",
|
||||
"ant-icon": "../Icon/index",
|
||||
"ant-popup": "../Popup/index"
|
||||
}
|
||||
}
|
93
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.less
generated
vendored
Normal file
93
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.less
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
@import (reference) './variable.less';
|
||||
@import (reference) '../style/mixins/hairline.less';
|
||||
|
||||
@modalPrefix: ant-modal;
|
||||
|
||||
.@{modalPrefix} {
|
||||
&-body {
|
||||
width: 560 * @rpx;
|
||||
background-color: @modal-background-color;
|
||||
border-radius: @modal-radius;
|
||||
padding-top: 40 * @rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&-title {
|
||||
font-size: @font-size-title;
|
||||
line-height: 50 * @rpx;
|
||||
text-align: center;
|
||||
color: @modal-title-color;
|
||||
margin: 0 24 * @rpx 16 * @rpx;
|
||||
}
|
||||
|
||||
&-content {
|
||||
line-height: 42 * @rpx;
|
||||
font-size: @modal-content-size;
|
||||
color: @modal-content-color;
|
||||
text-align: center;
|
||||
margin: 0 24 * @rpx 40 * @rpx;
|
||||
}
|
||||
&-footer {
|
||||
&-focus {
|
||||
padding: 0 24 * @rpx 24 * @rpx;
|
||||
&-secondary,
|
||||
&-cancel {
|
||||
color: @COLOR_BRAND1;
|
||||
text-align: center;
|
||||
font-size: 36 * @rpx;
|
||||
margin-top: 16 * @rpx;
|
||||
padding-top: 24 * @rpx;
|
||||
}
|
||||
}
|
||||
&-vertical {
|
||||
padding: 0 0 24 * @rpx;
|
||||
&-primary,
|
||||
&-secondary,
|
||||
&-cancel {
|
||||
color: @COLOR_BRAND1;
|
||||
text-align: center;
|
||||
font-size: 36 * @rpx;
|
||||
margin-top: 16 * @rpx;
|
||||
padding-top: 24 * @rpx;
|
||||
position: relative;
|
||||
.hairline('top');
|
||||
}
|
||||
}
|
||||
&-horizontal {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
.hairline('top');
|
||||
&-primary,
|
||||
&-secondary,
|
||||
&-cancel {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
color: @COLOR_BRAND1;
|
||||
text-align: center;
|
||||
font-size: 36 * @rpx;
|
||||
padding: 24 * @rpx 0;
|
||||
&:nth-child(1) {
|
||||
.hairline('right');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-close {
|
||||
position: absolute;
|
||||
right: 16 * @rpx;
|
||||
top: 13 * @rpx;
|
||||
z-index: 3;
|
||||
width: 52 * @rpx;
|
||||
height: 58 * @rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 36 * @rpx;
|
||||
color: @COLOR_TEXT_ASSIST;
|
||||
}
|
||||
.ant-popup-content.ant-popup-center {
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
21
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.sjs
generated
vendored
Normal file
21
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.sjs
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
function getDirection(primaryButtonText, secondaryButtonText, cancelButtonText, type) {
|
||||
// 不显示按钮区域
|
||||
if (!primaryButtonText && !secondaryButtonText && !cancelButtonText) {
|
||||
return '';
|
||||
}
|
||||
// 1个按钮,当纵向处理
|
||||
if ([primaryButtonText, secondaryButtonText, cancelButtonText].filter(function (v) {
|
||||
return !!v;
|
||||
}).length === 1) {
|
||||
return 'vertical';
|
||||
}
|
||||
// 三个按钮,必是纵向
|
||||
if (primaryButtonText && secondaryButtonText && cancelButtonText) {
|
||||
return 'vertical';
|
||||
}
|
||||
// 两个按钮,在 “标准模式” 是横向;在“强调模式”是纵向
|
||||
return type === 'focus' ? 'vertical' : 'horizontal';
|
||||
}
|
||||
export default {
|
||||
getDirection: getDirection
|
||||
};
|
107
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/props.d.ts
generated
vendored
Normal file
107
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/props.d.ts
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
import { IBaseProps } from '../_util/base';
|
||||
/**
|
||||
* @description 对话框,当应用中需要比较明显的对用户当前的操作行为进行警示或提醒时,可以使用对话框。用户需要针对对话框进行操作后方可结束。
|
||||
*/
|
||||
export interface IModalProps extends IBaseProps {
|
||||
/**
|
||||
* @description Modal body类名
|
||||
*/
|
||||
bodyClassName: string;
|
||||
/**
|
||||
* @description Modal body样式
|
||||
*/
|
||||
bodyStyle: string;
|
||||
/**
|
||||
* @description 遮罩层类名
|
||||
*/
|
||||
maskClassName: string;
|
||||
/**
|
||||
* @description 遮罩层样式
|
||||
*/
|
||||
maskStyle: string;
|
||||
/**
|
||||
* @description 是否可点击蒙层关闭
|
||||
* @default true
|
||||
*/
|
||||
maskClosable: boolean;
|
||||
/**
|
||||
* @description 类型
|
||||
*/
|
||||
type: 'default' | 'focus';
|
||||
/**
|
||||
* @description 是否显示右上角的关闭按钮。只有在 type 为 focus 生效
|
||||
*/
|
||||
closable: boolean;
|
||||
/**
|
||||
* @description 过渡动画时长,单位毫秒
|
||||
*/
|
||||
duration: number;
|
||||
/**
|
||||
* @description 是否开启过渡动画
|
||||
*/
|
||||
animation: boolean;
|
||||
/**
|
||||
* @description 弹窗层级
|
||||
*/
|
||||
zIndex: number;
|
||||
/**
|
||||
* @description 标题
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* @description 内容
|
||||
*/
|
||||
content: string;
|
||||
/**
|
||||
* @description 是否可见,受控模式
|
||||
* @default false
|
||||
*/
|
||||
visible: boolean;
|
||||
/**
|
||||
* @description 是否关闭后销毁内部元素
|
||||
* @default false
|
||||
*/
|
||||
destroyOnClose?: boolean;
|
||||
/**
|
||||
* @description 主按钮文本
|
||||
*/
|
||||
primaryButtonText: string;
|
||||
/**
|
||||
* @description 辅助按钮文本
|
||||
*/
|
||||
secondaryButtonText: string;
|
||||
/**
|
||||
* @description 取消按钮文案
|
||||
*/
|
||||
cancelButtonText: string;
|
||||
/**
|
||||
* @description 主按钮样式
|
||||
*/
|
||||
primaryButtonStyle: string;
|
||||
/**
|
||||
* @description 辅助按钮样式
|
||||
*/
|
||||
secondaryButtonStyle: string;
|
||||
/**
|
||||
* @description 取消按钮样式
|
||||
*/
|
||||
cancelButtonStyle: string;
|
||||
/**
|
||||
* @description 触发关闭时回调
|
||||
*/
|
||||
onClose: () => void;
|
||||
/**
|
||||
* @description 主按钮点击事件
|
||||
*/
|
||||
onPrimaryButtonTap: () => void;
|
||||
/**
|
||||
* @description 次要按钮点击事件
|
||||
*/
|
||||
onSecondaryButtonTap: () => void;
|
||||
/**
|
||||
* @description 取消按钮点击事件
|
||||
*/
|
||||
onCancelButtonTap: () => void;
|
||||
}
|
||||
export declare const ModalDefaultProps: Partial<IModalProps>;
|
||||
export declare const ModalFunctionalProps: Partial<IModalProps>;
|
31
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/props.js
generated
vendored
Normal file
31
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/props.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
export var ModalDefaultProps = {
|
||||
visible: false,
|
||||
maskClosable: true,
|
||||
closable: true,
|
||||
type: 'default',
|
||||
duration: 200,
|
||||
animation: true,
|
||||
zIndex: 998,
|
||||
};
|
||||
export var ModalFunctionalProps = {
|
||||
bodyClassName: '',
|
||||
bodyStyle: '',
|
||||
maskClassName: '',
|
||||
maskStyle: '',
|
||||
maskClosable: true,
|
||||
type: 'default',
|
||||
closable: true,
|
||||
duration: 200,
|
||||
animation: true,
|
||||
zIndex: 998,
|
||||
title: '',
|
||||
content: '',
|
||||
visible: false,
|
||||
destroyOnClose: false,
|
||||
primaryButtonText: '',
|
||||
secondaryButtonText: '',
|
||||
cancelButtonText: '',
|
||||
primaryButtonStyle: '',
|
||||
secondaryButtonStyle: '',
|
||||
cancelButtonStyle: '',
|
||||
};
|
14
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/variable.less
generated
vendored
Normal file
14
甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/variable.less
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
@import (reference) '../style/themes/index.less';
|
||||
|
||||
// modal 背景色
|
||||
@modal-background-color: @COLOR_CARD;
|
||||
// modal 圆角
|
||||
@modal-radius: @corner-radius-lg;
|
||||
// 标题颜色
|
||||
@modal-title-color: @COLOR_TEXT_PRIMARY;
|
||||
// 内容大小
|
||||
@modal-content-size: @font-size-subtitle;
|
||||
// 内容颜色
|
||||
@modal-content-color: @COLOR_TEXT_PRIMARY;
|
||||
// 关闭图标尺寸
|
||||
@modal-close-icon-size: 36 * @rpx;
|
Reference in New Issue
Block a user