Commit 003692f2 authored by Facius's avatar Facius

improve: button样式修改

parent a20dfbf7
Pipeline #3786 canceled with stages
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</u-button> </u-button>
</view> </view>
<view class="right-view"> <view class="right-view">
<u-button type="success" :custom-style="customConFirm" @click="handleClickSure" :disabled="disabled" :loading="loading"> <u-button :type="customConFirm.type" :custom-style="customConFirm" @click="handleClickSure" :disabled="disabled" :loading="loading">
<view class="confirm-view">{{ confirmText }}</view> <view class="confirm-view">{{ confirmText }}</view>
</u-button> </u-button>
</view> </view>
...@@ -56,6 +56,7 @@ export default { ...@@ -56,6 +56,7 @@ export default {
computed: { computed: {
customConFirm() { customConFirm() {
return { return {
type: this.disabled ? '' : 'success',
color: 'transparent', color: 'transparent',
'background-color': this.disabled ? '#7DCFB8' : '#02a074', 'background-color': this.disabled ? '#7DCFB8' : '#02a074',
height: '104rpx', height: '104rpx',
......
...@@ -43,9 +43,11 @@ ...@@ -43,9 +43,11 @@
<view class="count-view">共{{differentCount}}单</view> <view class="count-view">共{{differentCount}}单</view>
</view> </view>
</view> </view>
<u-button type="success" :disabled="!canCommit" :custom-style="customSure" @click="handleClickSure"> <view class="right-view">
<view class="sure-view">确定结清</view> <u-button :type="customSure.type" :disabled="!canCommit" :custom-style="customSure" @click="handleClickSure">
</u-button> <view class="sure-view">确定结清</view>
</u-button>
</view>
</view> </view>
<view class="loading-view" v-if="loading && !freshing"> <view class="loading-view" v-if="loading && !freshing">
<u-loading mode="flower"></u-loading> <u-loading mode="flower"></u-loading>
...@@ -121,6 +123,7 @@ export default { ...@@ -121,6 +123,7 @@ export default {
}, },
customSure () { customSure () {
return { return {
type: this.canCommit ? 'success' : '',
color: 'transparent', color: 'transparent',
'background-color': this.canCommit ? '#02a074' : '#7DCFB8', 'background-color': this.canCommit ? '#02a074' : '#7DCFB8',
height: '88rpx', height: '88rpx',
...@@ -428,13 +431,15 @@ export default { ...@@ -428,13 +431,15 @@ export default {
.count-view {} .count-view {}
} }
} }
.right-view {
.sure-view { .sure-view {
color: 32rpx; color: 32rpx;
font-weight: bold; font-weight: bold;
color: #ffffff; color: #ffffff;
}
} }
} }
} }
</style> </style>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
></view> ></view>
<view class="bottom-view"> <view class="bottom-view">
<u-button <u-button
type="success" :type="customConFirm.type"
:custom-style="customConFirm" :custom-style="customConFirm"
@click="handleClickSure" @click="handleClickSure"
:disabled="!canConfirm" :disabled="!canConfirm"
...@@ -253,6 +253,7 @@ export default { ...@@ -253,6 +253,7 @@ export default {
}, },
customConFirm() { customConFirm() {
return { return {
type: this.canConfirm ? 'success' : '',
color: 'transparent', color: 'transparent',
'background-color': this.canConfirm ? '#02a074' : '#7DCFB8', 'background-color': this.canConfirm ? '#02a074' : '#7DCFB8',
height: '96rpx', height: '96rpx',
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
<view class="normal-create"> <view class="normal-create">
<NavbarRight title="收据记账(通用)" /> <NavbarRight title="收据记账(通用)" />
<view class="content-view"> <view class="content-view">
<!-- #ifdef APP-PLUS -->
<scroll-view scroll-y="true" style="height:100%">
<!-- #endif -->
<view class="info-view"> <view class="info-view">
<view class="part-view"> <view class="part-view">
<view class="title-view">今收到</view> <view class="title-view">今收到</view>
...@@ -117,6 +120,9 @@ ...@@ -117,6 +120,9 @@
</view> </view>
</view> </view>
</view> </view>
<!-- #ifdef APP-PLUS -->
</scroll-view>
<!-- #endif -->
</view> </view>
<submit-button background="#f6f7fa" :buttonStyle="customConFirm" :disabled="!canConfirm" <submit-button background="#f6f7fa" :buttonStyle="customConFirm" :disabled="!canConfirm"
:loading="buttonLoading" position="static" text="保存" @handleClick="handleClickCreate"></submit-button> :loading="buttonLoading" position="static" text="保存" @handleClick="handleClickCreate"></submit-button>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<u-button :custom-style="customSkip" @click="handleClickSkip"><view class="skip-view">跳过</view></u-button> <u-button :custom-style="customSkip" @click="handleClickSkip"><view class="skip-view">跳过</view></u-button>
</view> </view>
<view class="right-view"> <view class="right-view">
<u-button type="success" :custom-style="customConFirm" @click="handleClickSure" :disabled="!canConfirm" :loading="buttonLoading"><view class="confirm-view">保存</view></u-button> <u-button :type="customConFirm.type" :custom-style="customConFirm" @click="handleClickSure" :disabled="!canConfirm" :loading="buttonLoading"><view class="confirm-view">保存</view></u-button>
</view> </view>
</view> </view>
<view class="loading-view" v-if="loading"><u-loading mode="flower"></u-loading></view> <view class="loading-view" v-if="loading"><u-loading mode="flower"></u-loading></view>
...@@ -165,6 +165,7 @@ export default { ...@@ -165,6 +165,7 @@ export default {
computed: { computed: {
customConFirm() { customConFirm() {
return { return {
type: this.canConfirm ? 'success' : '',
color: 'transparent', color: 'transparent',
'background-color': this.canConfirm ? '#02a074' : '#7DCFB8', 'background-color': this.canConfirm ? '#02a074' : '#7DCFB8',
height: '96rpx', height: '96rpx',
......
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 to comment