添加组件

This commit is contained in:
zhengw
2026-01-28 17:13:51 +08:00
parent 193856ccdb
commit 365fcdb19a
8 changed files with 78 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,19 @@
Component({
options: { multipleSlots: true },
/**
* 组件的属性列表
*/
properties: {
customStyle: null,
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {},
});

View File

@@ -0,0 +1,3 @@
<view class="box" style="{{customStyle}}">
<slot></slot>
</view>

View File

@@ -0,0 +1,10 @@
.box {
display: flex;
flex-wrap: wrap;
margin-bottom: 24rpx;
column-gap: 24rpx;
row-gap: 16rpx;
background: #e8f3ff;
padding: 24rpx;
border-radius: 8rpx;
}