小程序源码
This commit is contained in:
19
source/wx/xzs-student/component/iView/panel/index.js
Normal file
19
source/wx/xzs-student/component/iView/panel/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
Component({
|
||||
externalClasses: ['i-class'],
|
||||
|
||||
properties: {
|
||||
title: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
// 标题顶部距离
|
||||
hideTop: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
hideBorder: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
}
|
||||
});
|
||||
3
source/wx/xzs-student/component/iView/panel/index.json
Normal file
3
source/wx/xzs-student/component/iView/panel/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
4
source/wx/xzs-student/component/iView/panel/index.wxml
Normal file
4
source/wx/xzs-student/component/iView/panel/index.wxml
Normal file
@@ -0,0 +1,4 @@
|
||||
<view class="i-class i-panel">
|
||||
<view wx:if="{{ title }}" class="i-panel-title {{ hideTop ? 'i-panel-title-hide-top' : '' }}">{{ title }}</view>
|
||||
<view class="i-panel-content {{ hideBorder ? 'i-panel-without-border' : '' }}"><slot></slot></view>
|
||||
</view>
|
||||
1
source/wx/xzs-student/component/iView/panel/index.wxss
Normal file
1
source/wx/xzs-student/component/iView/panel/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
.i-panel{position:relative;overflow:hidden}.i-panel-title{font-size:14px;line-height:1;color:#1c2438;padding:20px 16px 10px}.i-panel-title-hide-top{padding-top:0}.i-panel-content{position:relative;background:#fff;overflow:hidden}.i-panel-content::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-top-width:1px;border-bottom-width:1px}.i-panel-without-border::after{border:0 none}
|
||||
Reference in New Issue
Block a user