mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
25 lines
409 B
JavaScript
25 lines
409 B
JavaScript
import Page from '../../common/page';
|
|
|
|
Page({
|
|
data: {
|
|
checked: true,
|
|
checked2: true
|
|
},
|
|
|
|
onChange({ detail }) {
|
|
this.setData({ checked: detail });
|
|
},
|
|
|
|
onChange2({ detail }) {
|
|
wx.showModal({
|
|
title: '提示',
|
|
content: '是否切换开关?',
|
|
success: res => {
|
|
if (res.confirm) {
|
|
this.setData({ checked2: detail });
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|