[bugfix] SubmitBar:优化提交订单栏 (#635)

This commit is contained in:
rex 2018-09-26 15:01:50 +08:00 committed by neverland
parent bd525425ad
commit 5d2b0dd604
5 changed files with 14 additions and 17 deletions

View File

@ -1,5 +1,5 @@
{
"navigationBarTitleText": "Search 搜索",
"navigationBarTitleText": "Radio 单选框",
"usingComponents": {
"demo-block": "../../components/demo-block/index",
"van-radio-group": "../../dist/radio-group/index",

View File

@ -1,5 +1,5 @@
{
"navigationBarTitleText": "Steps 步骤条",
"navigationBarTitleText": "SubmitBar 提交订单栏",
"usingComponents": {
"demo-block": "../../components/demo-block/index",
"van-submit-bar": "../../dist/submit-bar/index",

View File

@ -2,6 +2,7 @@ import { VantComponent } from '../common/component';
VantComponent({
classes: [
'bar-class',
'price-class',
'button-class'
],
@ -9,7 +10,7 @@ VantComponent({
props: {
tip: [String, Boolean],
type: Number,
price: Number,
price: null,
label: String,
loading: Boolean,
disabled: Boolean,

View File

@ -1,42 +1,38 @@
@import '../common/style/var.pcss';
.van-submit-bar {
left: 0;
bottom: 0;
width: 100%;
z-index: 100;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
user-select: none;
&__tip {
color: $orange;
padding: 10px;
background-color: #fff7cc;
color: $orange;
font-size: 12px;
line-height: 18px;
background-color: #fff7cc;
}
&__bar {
height: 50px;
display: flex;
font-size: 14px;
align-items: center;
height: 50px;
background-color: $white;
font-size: 14px;
}
&__text {
flex: 1;
color: $text-color;
font-weight: 500;
text-align: right;
color: $text-color;
padding-right: 12px;
span {
display: inline-block;
}
}
&__price {
padding-right: 12px;
color: $red;
}

View File

@ -5,7 +5,7 @@
{{ tipStr }}<slot name="tip" />
</view>
<view class="van-submit-bar__bar">
<view class="van-submit-bar__bar bar-class">
<slot />
<view class="van-submit-bar__text">
<block wx:if="{{ hasPrice }}">