This commit is contained in:
2025-09-14 00:21:54 +08:00
commit d40b3bbd62
766 changed files with 36275 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
Component({
options: {
styleIsolation: 'shared'
},
properties: {
},
data: {
childDataMessage: '',
// 这里是一些组件内部数据
childMessage: '',
someData: {}
},
methods: {
handleClick() {
const com2 = this.selectComponent('#com2');
console.log('com2', com2);
},
handleEventMessage() {
this.setData('childDataMessage', '修改了传给子组件的data');
},
onChildMessage(e) {
this.setData('childMessage', `收到子组件的事件detail${e.detail.data}`);
},
onClear() {
console.log('onClear', this);
this.setData('childMessage', '');
this.setData('childDataMessage', '');
},
handleSelectMessage() {
const com2 = this.selectComponent('#com2');
com2.onTap();
}
},
});