mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
64 lines
848 B
JavaScript
64 lines
848 B
JavaScript
import Page from '../../common/page';
|
|
|
|
Page({
|
|
data: {
|
|
show: {
|
|
basic: false,
|
|
top: false,
|
|
bottom: false,
|
|
left: false,
|
|
right: false
|
|
}
|
|
},
|
|
|
|
toggle(type, show) {
|
|
this.setData({
|
|
[`show.${type}`]: show
|
|
});
|
|
},
|
|
|
|
showBasic() {
|
|
this.toggle('basic', true);
|
|
},
|
|
|
|
hideBasic() {
|
|
this.toggle('basic', false);
|
|
},
|
|
|
|
showTop() {
|
|
this.toggle('top', true);
|
|
},
|
|
|
|
hideTop() {
|
|
this.toggle('top', false);
|
|
},
|
|
|
|
showLeft() {
|
|
this.toggle('left', true);
|
|
},
|
|
|
|
hideLeft() {
|
|
this.toggle('left', false);
|
|
},
|
|
|
|
showRight() {
|
|
this.toggle('right', true);
|
|
},
|
|
|
|
hideRight() {
|
|
this.toggle('right', false);
|
|
},
|
|
|
|
showBottom() {
|
|
this.toggle('bottom', true);
|
|
},
|
|
|
|
hideBottom() {
|
|
this.toggle('bottom', false);
|
|
},
|
|
|
|
onClickLeft() {
|
|
wx.navigateBack();
|
|
}
|
|
});
|