添加组件
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
Component({
|
||||
options: { multipleSlots: true },
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
customStyle: null,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {},
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
<view class="box" style="{{customStyle}}">
|
||||
<slot></slot>
|
||||
</view>
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user