first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
// components/header/header.js
Component({
options: {
multipleSlots: true
},
/**
* 组件的属性列表
*/
properties: {
title: {
type: String,
value: "默认数值"
}
},
/**
* 组件的初始数据
*/
data: {
test: '测试数据,哈哈哈哈'
},
observers: {
'test': function (newTest) {
console.log("newTest: ", newTest);
}
},
/**
* 组件的方法列表
*/
methods: {
test() {
this.setData({
test: "你好"
})
this.triggerEvent("change", this.data.test)
}
}
})

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,12 @@
<view class="header">
<view bind:tap="test">
头部组件 {{ title }}
<view class="left">
<slot name="left"></slot>
</view>
<view class="right">
<slot name="right"></slot>
</view>
</view>
</view>

View File

@@ -0,0 +1 @@
/* components/header/header.wxss */