jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/less/Modal/index.axml

137 lines
4.0 KiB
Plaintext
Raw Normal View History

2024-12-01 11:56:54 +00:00
<import-sjs
from="./index.sjs"
name="utils"
></import-sjs>
<ant-popup
2024-11-10 07:01:22 +00:00
className="ant-modal {{className || ''}}"
style="{{style || ''}}"
maskClassName="{{maskClassName}}"
maskStyle="{{maskStyle}}"
2024-12-01 11:56:54 +00:00
visible="{{visible}}"
2024-11-10 07:01:22 +00:00
duration="{{duration}}"
position="center"
animation="{{animation}}"
zIndex="{{zIndex}}"
destroyOnClose="{{destroyOnClose}}"
2024-12-01 11:56:54 +00:00
onClose="onMaskClose"
>
<slot>
<view
class="ant-modal-body {{bodyClassName || ''}}"
style="{{bodyStyle || ''}}"
>
<slot name="header"></slot>
2024-11-10 07:01:22 +00:00
<slot name="title">
2024-12-01 11:56:54 +00:00
<view
a:if="{{title}}"
class="ant-modal-body-title"
>
2024-11-10 07:01:22 +00:00
{{title}}
</view>
</slot>
<slot name="content">
2024-12-01 11:56:54 +00:00
<view
a:if="{{content}}"
class="ant-modal-body-content"
>
{{content}}
</view>
2024-11-10 07:01:22 +00:00
</slot>
<slot name="footer">
2024-12-01 11:56:54 +00:00
<view
a:if="{{type === 'focus'}}"
class="ant-modal-body-footer-focus"
>
<ant-button
2024-11-10 07:01:22 +00:00
type="primary"
2024-12-01 11:56:54 +00:00
className="ant-modal-body-footer-focus-primary"
2024-11-10 07:01:22 +00:00
style="{{primaryButtonStyle || ''}}"
2024-12-01 11:56:54 +00:00
onTap="onPrimaryButtonTap"
>
{{primaryButtonText}}
</ant-button>
<view
2024-11-10 07:01:22 +00:00
a:if="{{secondaryButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-focus-secondary"
2024-11-10 07:01:22 +00:00
style="{{secondaryButtonStyle || ''}}"
onTap="onSecondaryButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{secondaryButtonText}}
</view>
2024-12-01 11:56:54 +00:00
<view
2024-11-10 07:01:22 +00:00
a:if="{{cancelButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-focus-cancel"
2024-11-10 07:01:22 +00:00
style="{{cancelButtonStyle || ''}}"
onTap="onCancelButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{cancelButtonText}}
</view>
</view>
2024-12-01 11:56:54 +00:00
<view
a:elif="{{utils.getDirection(primaryButtonText, secondaryButtonText, cancelButtonText, type) === 'horizontal'}}"
class="ant-modal-body-footer-horizontal"
>
<view
2024-11-10 07:01:22 +00:00
a:if="{{cancelButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-horizontal-cancel"
2024-11-10 07:01:22 +00:00
style="{{cancelButtonStyle || ''}}"
onTap="onCancelButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{cancelButtonText}}
</view>
2024-12-01 11:56:54 +00:00
<view
2024-11-10 07:01:22 +00:00
a:if="{{secondaryButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-horizontal-secondary"
2024-11-10 07:01:22 +00:00
style="{{secondaryButtonStyle || ''}}"
onTap="onSecondaryButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{secondaryButtonText}}
</view>
2024-12-01 11:56:54 +00:00
<view
2024-11-10 07:01:22 +00:00
a:if="{{primaryButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-horizontal-primary"
2024-11-10 07:01:22 +00:00
style="{{primaryButtonStyle || ''}}"
onTap="onPrimaryButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{primaryButtonText}}
</view>
</view>
2024-12-01 11:56:54 +00:00
<view
a:elif="{{utils.getDirection(primaryButtonText, secondaryButtonText, cancelButtonText, type) === 'vertical'}}"
class="ant-modal-body-footer-vertical"
>
<view
2024-11-10 07:01:22 +00:00
a:if="{{primaryButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-vertical-primary"
2024-11-10 07:01:22 +00:00
style="{{primaryButtonStyle || ''}}"
onTap="onPrimaryButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{primaryButtonText}}
</view>
2024-12-01 11:56:54 +00:00
<view
2024-11-10 07:01:22 +00:00
a:if="{{secondaryButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-vertical-secondary"
2024-11-10 07:01:22 +00:00
style="{{secondaryButtonStyle || ''}}"
onTap="onSecondaryButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{secondaryButtonText}}
</view>
2024-12-01 11:56:54 +00:00
<view
2024-11-10 07:01:22 +00:00
a:if="{{cancelButtonText}}"
2024-12-01 11:56:54 +00:00
class="ant-modal-body-footer-vertical-cancel"
2024-11-10 07:01:22 +00:00
style="{{cancelButtonStyle || ''}}"
onTap="onCancelButtonTap"
2024-12-01 11:56:54 +00:00
>
2024-11-10 07:01:22 +00:00
{{cancelButtonText}}
</view>
</view>
</slot>
</view>
</slot>
2024-12-01 11:56:54 +00:00
<ant-icon
a:if="{{type === 'focus' && closable}}"
type="CloseOutline"
onTap="onClose"
className="ant-modal-close"
></ant-icon>
</ant-popup>