Yao 1d7c23b289
[refactor] Toast: 升级为自定义组件 (#191)
* toast 组件初始化

* toast 增加示例 && 逻辑补全

* toast 支持直接 loading 调用

* 增加 toast readme

* 去除多余的引用
2018-04-12 21:58:54 +08:00

36 lines
1004 B
Plaintext

<pop-manager
show="{{ show }}"
type="center"
>
<view class="zan-dialog--container">
<view
wx:if="{{ title }}"
class="zan-dialog__header"
>{{ title }}</view>
<view
class="zan-dialog__content {{ title ? 'zan-dialog__content--title' : '' }}"
>
<text>{{ message }}</text>
</view>
<view
class="zan-dialog__footer {{ buttonsShowVertical ? 'zan-dialog__footer--vertical' : 'zan-dialog__footer--horizon' }}"
>
<block
wx:for="{{ buttons }}"
wx:key="{{ item.text }}-{{ item.type }}"
>
<zan-button
class="zan-dialog__button"
custom-class="{{ index === 0 ? 'zan-dialog__button-inside--first' : 'zan-dialog__button-inside' }}"
data-type="{{ item.type }}"
bind:btnclick="handleButtonClick"
>
<view
style="color: {{ item.color || '#333' }}"
>{{ item.text }}</view>
</zan-button>
</block>
</view>
</view>
</pop-manager>