仿互站小程序
This commit is contained in:
9
vant/panel/index.js
Normal file
9
vant/panel/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
classes: [ "header-class", "footer-class" ],
|
||||
props: {
|
||||
desc: String,
|
||||
title: String,
|
||||
status: String,
|
||||
useFooterSlot: Boolean
|
||||
}
|
||||
});
|
14
vant/panel/index.json
Normal file
14
vant/panel/index.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-cell": "../cell/index",
|
||||
"forview": "/utils/forview/index",
|
||||
"van-loading": "/vant/loading/index",
|
||||
"van-dialog": "/vant/dialog/index",
|
||||
"van-button": "/vant/button/index",
|
||||
"van-icon": "/vant/icon/index",
|
||||
"van-popup": "/vant/popup/index",
|
||||
"van-tab": "/vant/tab/index",
|
||||
"van-tabs": "/vant/tabs/index"
|
||||
}
|
||||
}
|
10
vant/panel/index.wxml
Normal file
10
vant/panel/index.wxml
Normal file
@@ -0,0 +1,10 @@
|
||||
<view class="van-panel van-hairline--top-bottom custom-class">
|
||||
<van-cell customClass="header-class" label="{{desc}}" title="{{title}}" value="{{status}}" valueClass="van-panel__header-value" wx:if="{{title||desc||status}}"></van-cell>
|
||||
<slot name="header" wx:else></slot>
|
||||
<view class="van-panel__content">
|
||||
<slot></slot>
|
||||
</view>
|
||||
<view class="van-panel__footer van-hairline--top footer-class" wx:if="{{useFooterSlot}}">
|
||||
<slot name="footer"></slot>
|
||||
</view>
|
||||
</view>
|
13
vant/panel/index.wxss
Normal file
13
vant/panel/index.wxss
Normal file
@@ -0,0 +1,13 @@
|
||||
@import "../area/index.wxss";
|
||||
|
||||
.van-panel {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.van-panel__header-value {
|
||||
color: #f44;
|
||||
}
|
||||
|
||||
.van-panel__footer {
|
||||
padding: 10px 15px;
|
||||
}
|
Reference in New Issue
Block a user