mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
41 lines
697 B
JavaScript
41 lines
697 B
JavaScript
const Zan = require('../../dist/index');
|
|
|
|
Page(Object.assign({}, Zan.Toast, {
|
|
data: {},
|
|
|
|
showToast() {
|
|
this.showZanToast('toast的内容');
|
|
},
|
|
|
|
showIconToast() {
|
|
this.showZanToast({
|
|
title: 'toast的内容',
|
|
icon: 'fail'
|
|
});
|
|
},
|
|
|
|
showImageToast() {
|
|
this.showZanToast({
|
|
title: 'toast的内容',
|
|
image: 'https://b.yzcdn.cn/v2/image/dashboard/secured_transaction/suc_green@2x.png'
|
|
});
|
|
},
|
|
|
|
showLoadingToast() {
|
|
this.showZanToast({
|
|
title: 'toast的内容',
|
|
icon: 'loading'
|
|
});
|
|
},
|
|
|
|
showOnlyIcon() {
|
|
this.showZanToast({
|
|
icon: 'fail'
|
|
});
|
|
},
|
|
|
|
showLoading() {
|
|
this.showZanLoading('加载中');
|
|
}
|
|
}));
|