init
This commit is contained in:
40
xhs-mini-demos/component-case/template/template.js
Normal file
40
xhs-mini-demos/component-case/template/template.js
Normal file
@@ -0,0 +1,40 @@
|
||||
Page({
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: 'template',
|
||||
path: '/component-case/template/template',
|
||||
};
|
||||
},
|
||||
|
||||
data: {
|
||||
value: '',
|
||||
value2: '',
|
||||
},
|
||||
|
||||
onReady() {
|
||||
// debugger
|
||||
// setTimeout(() => {
|
||||
|
||||
// }, 3000)
|
||||
},
|
||||
|
||||
onClick() {
|
||||
this.setData('value', this.data.value2);
|
||||
},
|
||||
|
||||
onClick2() {
|
||||
// const res = this.selectComponent('#child');
|
||||
// res.onClick();
|
||||
this.setData({
|
||||
value: '',
|
||||
});
|
||||
},
|
||||
|
||||
onInput(e) {
|
||||
this.data.value2 = e.detail.value;
|
||||
},
|
||||
|
||||
onMyevent() {
|
||||
this.onClick2();
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user