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,31 @@
// components/header/header.js
Component({
/**
* 组件的属性列表 props
*/
properties: {
list: {
type: Array,
value: []
}
},
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/**
* 组件的初始数据
*/
data: {
demo: "测试"
},
/**
* 组件的方法列表
*/
methods: {
sendFather() {
this.triggerEvent("change", this.data.demo)
}
}
})

View File

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

View File

@@ -0,0 +1,8 @@
<view>
<slot name="top"></slot>
<view wx:for="{{ list }}" wx:key="i" wx:for-item="val" wx:for-index="i">
<navigator url="/pages/about/about?id={{val.id}}">{{ i }} : {{ val.title }}</navigator>
</view>
<slot name="bottom"></slot>
<button type="warn" bindtap="sendFather">点我传递数据给父组件</button>
</view>

View File

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