v3.0.6
This commit is contained in:
25
source/wx/xzs-student/component/iView/divider/index.js
Normal file
25
source/wx/xzs-student/component/iView/divider/index.js
Normal file
@@ -0,0 +1,25 @@
|
||||
Component({
|
||||
externalClasses: ['i-class'],
|
||||
properties: {
|
||||
content: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
height : {
|
||||
type: Number,
|
||||
value: 48
|
||||
},
|
||||
color : {
|
||||
type : String,
|
||||
value : '#80848f'
|
||||
},
|
||||
lineColor : {
|
||||
type : String,
|
||||
value : '#e9eaec'
|
||||
},
|
||||
size : {
|
||||
type: String,
|
||||
value: 12
|
||||
}
|
||||
}
|
||||
});
|
||||
3
source/wx/xzs-student/component/iView/divider/index.json
Normal file
3
source/wx/xzs-student/component/iView/divider/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
19
source/wx/xzs-student/component/iView/divider/index.wxml
Normal file
19
source/wx/xzs-student/component/iView/divider/index.wxml
Normal file
@@ -0,0 +1,19 @@
|
||||
<view class="i-divider i-class" style="{{parse.getStyle(color,size,height)}}">
|
||||
<view class="i-divider-content" wx:if="{{content !== ''}}">
|
||||
{{content}}
|
||||
</view>
|
||||
<view class="i-divider-content" wx:else>
|
||||
<slot></slot>
|
||||
</view>
|
||||
<view class="i-divider-line" style="background:{{lineColor}}"></view>
|
||||
</view>
|
||||
<wxs module="parse">
|
||||
module.exports = {
|
||||
getStyle : function(color,size,height){
|
||||
var color = 'color:' + color +';';
|
||||
var size = 'font-size:' + size + 'px;';
|
||||
var height = 'height:' + height+'px;'
|
||||
return color + size + height;
|
||||
}
|
||||
}
|
||||
</wxs>
|
||||
1
source/wx/xzs-student/component/iView/divider/index.wxss
Normal file
1
source/wx/xzs-student/component/iView/divider/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
.i-divider{width:100%;text-align:center;font-size:12px;position:relative;display:flex;align-items:center;justify-content:center}.i-divider-line{position:absolute;left:0;width:100%;height:1rpx;background-color:#f7f7f7;top:50%}.i-divider-content{background:#fff;position:relative;z-index:1;display:inline-block;padding:0 10px}
|
||||
Reference in New Issue
Block a user