modal.wxml
788 Bytes
<!--components/modal/modal.wxml-->
<view class="modal-wrapper" hidden='{{hidden}}'>
<view class="modal modal-{{position}}">
<view class="modal-header" hidden='{{!title}}'>
<view class="title">{{title}}</view>
</view>
<view class="modal-body">
<slot></slot>
</view>
<view class="modal-footer {{type === 'custom' ? 'hidden' : ''}}">
<view hover-class hidden="{{type === 'alert' }}" bindtap='confirm' class='btn btn-cancel'>取消</view>
<block wx:if='{{closeApp}}'>
<navigator class='btn btn-ok' target="miniProgram" open-type="exit">确定</navigator >
</block>
<block wx:else>
<view hover-class data-is-confirm="true" bindtap='confirm' class='btn btn-ok'>确认</view>
</block>
</view>
</view>
</view>