Commit 88f2e258 by wjw

wjw--自定义组件

parent 5f481136
// components/Blank/Blank.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="blank"></view>
\ No newline at end of file
.blank {
height: 68rpx;
background-color: #fff;
}
\ No newline at end of file
// components/Tips/Tips.js
Component({
properties: {
text: {
type: String,
value: ''
}
},
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="tips">
<view class="tips-img"><image src="../../assets/icon_wraning.png" mode="widthFix"></image></view>
<view class="tips-text">{{text}}</view>
</view>
.tips {
height: 72rpx;
display: flex;
align-items: center;
padding: 0 36rpx;
background-color: #F5EEDF;
}
.tips-img {
width: 32rpx;
height: 32rpx;
}
.tips-text {
margin-left: 12rpx;
font-size: 22rpx;
color: #837048;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment