mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
zui doc && 命名空间更改
This commit is contained in:
parent
a7660c2580
commit
4255eaf9a7
16
dist/toast/index.js
vendored
16
dist/toast/index.js
vendored
@ -1,28 +1,28 @@
|
||||
module.exports = {
|
||||
showZuiToast(title, timeout) {
|
||||
var componentToast = this.data.componentToast || {};
|
||||
clearTimeout(componentToast.timer);
|
||||
var zuiToast = this.data.zuiToast || {};
|
||||
clearTimeout(zuiToast.timer);
|
||||
|
||||
// 弹层设置~
|
||||
componentToast = {
|
||||
zuiToast = {
|
||||
show: true,
|
||||
title
|
||||
};
|
||||
this.setData({
|
||||
componentToast
|
||||
zuiToast
|
||||
});
|
||||
|
||||
componentToast.timer = setTimeout(() => {
|
||||
zuiToast.timer = setTimeout(() => {
|
||||
this.clearZuiToast();
|
||||
}, timeout || 3000);
|
||||
},
|
||||
|
||||
clearZuiToast() {
|
||||
var componentToast = this.data.componentToast || {};
|
||||
clearTimeout(componentToast.timer);
|
||||
var zuiToast = this.data.zuiToast || {};
|
||||
clearTimeout(zuiToast.timer);
|
||||
|
||||
this.setData({
|
||||
'componentToast.show': false
|
||||
'zuiToast.show': false
|
||||
});
|
||||
}
|
||||
};
|
||||
|
2
dist/toast/index.wxml
vendored
2
dist/toast/index.wxml
vendored
@ -1,3 +1,3 @@
|
||||
<template name="zui-toast">
|
||||
<view class="zui-toast" wx:if="{{ componentToast.show }}" bindtap="clearToast">{{ componentToast.title }}</view>
|
||||
<view class="zui-toast" wx:if="{{ zuiToast.show }}" bindtap="clearToast">{{ zuiToast.title }}</view>
|
||||
</template>
|
||||
|
4
dist/toptips/index.js
vendored
4
dist/toptips/index.js
vendored
@ -21,7 +21,7 @@ module.exports = {
|
||||
|
||||
// 展示出topTips
|
||||
this.setData({
|
||||
componentTopTips: {
|
||||
zuiTopTips: {
|
||||
show: true,
|
||||
content,
|
||||
options
|
||||
@ -31,7 +31,7 @@ module.exports = {
|
||||
// 设置定时器,定时关闭topTips
|
||||
timer = setTimeout(() => {
|
||||
this.setData({
|
||||
'componentTopTips.show': false
|
||||
'zuiTopTips.show': false
|
||||
});
|
||||
timer = undefined;
|
||||
}, options.duration);
|
||||
|
2
dist/toptips/index.wxml
vendored
2
dist/toptips/index.wxml
vendored
@ -1,3 +1,3 @@
|
||||
<template name="zui-toptips">
|
||||
<view class="zui-toptips {{ componentTopTips.show ? 'zui-toptips--show' : '' }}">{{ componentTopTips.content }}</view>
|
||||
<view class="zui-toptips {{ zuiTopTips.show ? 'zui-toptips--show' : '' }}">{{ zuiTopTips.content }}</view>
|
||||
</template>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<view class="zui-panel">
|
||||
<view class="zui-cell">
|
||||
<view class="zui-cell__bd">
|
||||
<view class="pull-right">pull-right: 往右靠</view>
|
||||
<view class="zui-pull-right">zui-pull-right: 往右靠</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -15,18 +15,18 @@
|
||||
|
||||
<view class="zui-cell">
|
||||
<view class="zui-cell__bd">
|
||||
<view class="zui-font-12 zui-font-bold">
|
||||
<view>zui-font-12:字号12</view>
|
||||
<view>zui-font-bold:加粗</view>
|
||||
<view>
|
||||
<view class="zui-font-12">zui-font-12:字号12</view>
|
||||
<view class="zui-font-12 zui-font-bold">zui-font-bold:再来个加粗</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="zui-cell">
|
||||
<view class="zui-cell__bd">
|
||||
<view class="zui-font-16 zui-font-bold">
|
||||
<view>zui-font-16:字号16</view>
|
||||
<view>zui-font-bold:加粗</view>
|
||||
<view>
|
||||
<view class="zui-font-16">zui-font-16:字号16</view>
|
||||
<view class="zui-font-16 zui-font-bold">zui-font-bold:再来个加粗</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -12,4 +12,4 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template is="zui-toast" data="{{ componentToast }}"></template>
|
||||
<template is="zui-toast" data="{{ zuiToast }}"></template>
|
||||
|
@ -12,4 +12,4 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template is="zui-toptips" data="{{ componentTopTips }}"></template>
|
||||
<template is="zui-toptips" data="{{ zuiTopTips }}"></template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user