Commit 2849f3c4 authored by Facius's avatar Facius

feat: 按钮按下样式

parent cba9efd5
......@@ -6,7 +6,7 @@
</u-button>
</view>
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickSure" :disabled="disabled" :loading="loading">
<u-button type="success" :custom-style="customConFirm" @click="handleClickSure" :disabled="disabled" :loading="loading">
<view class="confirm-view">{{ confirmText }}</view>
</u-button>
</view>
......
......@@ -40,7 +40,7 @@
</view>
<view class="buttons-view">
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickConfirm" :loading="loading">
<u-button :type="customConFirm.type" :custom-style="customConFirm" @click="handleClickConfirm" :loading="loading">
<view class="confirm-view">{{ confirmText }}</view>
</u-button>
</view>
......@@ -94,6 +94,7 @@ export default {
},
customConFirm() {
return {
type: this.isError ? 'error' : 'success',
color: 'transparent',
'background-color': this.isError ? '#FC524D' : '#02A074',
height: '96rpx',
......
......@@ -56,7 +56,7 @@
</u-button>
</view>
<view class="right-view">
<u-button :loading="loading" :custom-style="customConFirm" @click="handleClickConfirm">
<u-button :loading="loading" :type="customConFirm.type" :custom-style="customConFirm" @click="handleClickConfirm">
<view class="confirm-view">{{ confirmText }}</view>
</u-button>
</view>
......@@ -164,6 +164,7 @@ export default {
},
customConFirm() {
return {
type: this.isError ? 'error' : 'success',
color: 'transparent',
'background-color': this.isError ? '#FC524D' : '#02A074',
height: '96rpx',
......
......@@ -24,6 +24,7 @@
</view>
<view class="right-view">
<u-button
:type="customConFirm.type"
:custom-style="customConFirm"
@click="handleClickConfirm"
>
......@@ -92,6 +93,7 @@ export default {
},
customConFirm() {
return {
type: this.isError ? 'error' : 'success',
color: 'transparent',
'background-color': this.isError ? '#FC524D' : '#02A074',
height: '96rpx',
......
......@@ -43,7 +43,7 @@
<view class="count-view">共{{differentCount}}单</view>
</view>
</view>
<u-button :disabled="!canCommit" :custom-style="customSure" @click="handleClickSure">
<u-button type="success" :disabled="!canCommit" :custom-style="customSure" @click="handleClickSure">
<view class="sure-view">确定结清</view>
</u-button>
</view>
......
......@@ -17,7 +17,7 @@
/>
<view v-if="!disabled" class="tip-view">{{ tipText }}</view>
<view class="bottom-view">
<u-button :customStyle="buttonStyle" @click="handleClick"><view class="button-text">确定</view></u-button>
<u-button type="success" :customStyle="buttonStyle" @click="handleClick"><view class="button-text">确定</view></u-button>
</view>
</view>
</view>
......
......@@ -122,6 +122,7 @@
></view>
<view class="bottom-view">
<u-button
type="success"
:custom-style="customConFirm"
@click="handleClickSure"
:disabled="!canConfirm"
......
......@@ -21,6 +21,7 @@
</view>
<view class="right-view">
<u-button
type="success"
:custom-style="customConFirm"
@click="handleClickConfirm"
class="confirm-button"
......
......@@ -31,7 +31,7 @@
</view>
<!-- <submit-button @handleClick="submit" text="下一步"></submit-button> -->
<view class="bottom-view">
<u-button :custom-style="customCreate" @click="submit">
<u-button type="success" :custom-style="customCreate" @click="submit">
<view class="create-view">下一步</view>
</u-button>
</view>
......
......@@ -98,7 +98,7 @@
<view class="status-view" :style="'color: ' + syncFlagSettings.color">{{ syncFlagSettings.text }}</view>
</u-button>
<u-button v-if="!isSure" :custom-style="customChange" @click="handleClickChange" class="change-button"><view class="change-view">修改</view></u-button>
<u-button :custom-style="customConFirm" @click="handleClickSure" class="confirm-button" :loading="buttonLoading">
<u-button type="success" :custom-style="customConFirm" @click="handleClickSure" class="confirm-button" :loading="buttonLoading">
<view class="confirm-view">预览/发送客户</view>
</u-button>
</view>
......
......@@ -173,15 +173,15 @@
baseUrl() {
return process.uniEnv.qn_base_url;
},
customCreate() {
return {
color: 'transparent',
'background-color': this.canSave ? '#02a074' : '#7DCFB8',
height: '104rpx',
'border-radius': '16rpx',
width: '686rpx'
};
},
// customCreate() {
// return {
// color: 'transparent',
// 'background-color': this.canSave ? '#02a074' : '#7DCFB8',
// height: '104rpx',
// 'border-radius': '16rpx',
// width: '686rpx'
// };
// },
placeholderStyle() {
return 'color:#ccc;font-size:28rpx;font-weight: bold;';
},
......
......@@ -104,7 +104,7 @@
<u-button :custom-style="customSkip" @click="handleClickSkip"><view class="skip-view">跳过</view></u-button>
</view>
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickSure" :disabled="!canConfirm" :loading="buttonLoading"><view class="confirm-view">保存</view></u-button>
<u-button type="success" :custom-style="customConFirm" @click="handleClickSure" :disabled="!canConfirm" :loading="buttonLoading"><view class="confirm-view">保存</view></u-button>
</view>
</view>
<view class="loading-view" v-if="loading"><u-loading mode="flower"></u-loading></view>
......
......@@ -138,13 +138,13 @@
</view>
</view>
<view class="right-view-r">
<u-button :custom-style="customSave" @click="handleClickSave" class="save-button">
<u-button type="success" :custom-style="customSave" @click="handleClickSave" class="save-button">
<view class="save-view">
<view class="image-view"><image :src="saveImage"></image></view>
<view>保存账单</view>
</view>
</u-button>
<u-button :disabled="isSure" :custom-style="customReceive" @click="handleClickSign" class="confirm-button" :loading="buttonLoading">
<u-button :disabled="isSure" :type="customReceive.type" :custom-style="customReceive" @click="handleClickSign" class="confirm-button" :loading="buttonLoading">
<view class="receive-view">
<view class="receive-text">{{ customReceive.text }}</view>
<view v-if="customReceive.tipText" class="tip-view">{{ customReceive.tipText }}</view>
......@@ -168,7 +168,7 @@
<view class="image-view"><image :src="saomalingquImage"></image></view>
<view class="scan-view">扫码领取</view>
</u-button>
<u-button :custom-style="customConFirm" @click="handleClickShare" class="confirm-button" open-type="share">
<u-button type="success" :custom-style="customConFirm" @click="handleClickShare" class="confirm-button" open-type="share">
<view class="image-view"><image :src="zhuanfweixinImage"></image></view>
<view class="confirm-view">转发微信</view>
</u-button>
......@@ -348,6 +348,7 @@ export default {
customReceive() {
return this.isSure
? {
type: 'default',
color: 'transparent',
'background-color': '#cccccc',
height: '104rpx',
......@@ -356,6 +357,7 @@ export default {
text: '已签收'
}
: {
type:'success',
color: 'transparent',
'background-color': '#02a074',
height: '104rpx',
......
......@@ -61,14 +61,6 @@ export default {
baseUrl() {
return process.uniEnv.qn_base_url;
},
buttonStyle() {
return {
color: 'transparent',
'background-color': '#02A074',
height: '104rpx',
'border-radius': '16rpx'
};
},
placeholderStyle() {
return 'color: #cccccc;font-size: 28rpx;font-weight: bold;';
},
......
......@@ -31,7 +31,7 @@
</view>
<view class="buttons-view">
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickConfirm" :loading="loading">
<u-button :type="customConFirm.type" :custom-style="customConFirm" @click="handleClickConfirm" :loading="loading">
<view class="confirm-view">{{ confirmText }}</view>
</u-button>
</view>
......@@ -70,6 +70,7 @@ export default {
},
customConFirm() {
return {
type: this.isError ? 'error' : 'success',
color: 'transparent',
'background-color': this.isError ? '#FC524D' : '#02A074',
height: '96rpx'
......
......@@ -60,14 +60,6 @@ export default {
baseUrl() {
return process.uniEnv.qn_base_url;
},
buttonStyle() {
return {
color: 'transparent',
'background-color': '#02A074',
height: '104rpx',
'border-radius': '16rpx'
};
},
placeholderStyle() {
return 'color: #cccccc;font-size: 28rpx;font-weight: bold;';
},
......
......@@ -4,7 +4,7 @@
<!-- v-if 可以清空上次填写 -->
<WageSetting v-if="visible" type="pop" :form="salary" @close="handleClose" :fill.sync="canConfirm" @change="handleChange" />
<view class="bottom-view">
<u-button :custom-style="customConFirm" @click="handleClickSure" :loading="buttonLoading">
<u-button type="success" :custom-style="customConFirm" @click="handleClickSure" :loading="buttonLoading">
<view class="confirm-view">确定</view>
</u-button>
</view>
......
......@@ -43,7 +43,7 @@
<u-button v-if="memberId" :custom-style="customDelete" @click="handleClickDelete" class="delete-button">
<view class="delete-view">删除</view>
</u-button>
<u-button :custom-style="customConFirm" @click="handleClickConfirm" :loading="buttonLoading">
<u-button type="success" :custom-style="customConFirm" @click="handleClickConfirm" :loading="buttonLoading">
<view class="confirm-view">保存</view>
</u-button>
</view>
......
......@@ -27,13 +27,13 @@
<u-button :custom-style="customAdd" @click="handleClickAdd">
<view class="scan-view">添加过往合作</view>
</u-button>
<u-button :custom-style="customCreate" @click="handleClickCreate">
<u-button type="success" :custom-style="customCreate" @click="handleClickCreate">
<u-icon name="plus" color="#FFFFFF" size="40"></u-icon>
<view class="create-view">创建新成员</view>
</u-button>
</view>
<view class="bottom-select" v-if="isSelect">
<u-button :loading="buttonLoading" :custom-style="customConFirm" @click="handleClickConfirm">
<u-button type="success" :loading="buttonLoading" :custom-style="customConFirm" @click="handleClickConfirm">
<view class="confirm-view">{{buttonText}}</view>
</u-button>
</view>
......
......@@ -41,7 +41,7 @@
</view>
<view class="buttons-view">
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickConfirm" :loading="loading">
<u-button :type="customConFirm.type" :custom-style="customConFirm" @click="handleClickConfirm" :loading="loading">
<view class="confirm-view">{{ confirmText }}</view>
</u-button>
</view>
......@@ -97,6 +97,7 @@ export default {
},
customConFirm() {
return {
type: this.isError ? 'error' : 'success',
color: 'transparent',
'background-color': this.isError ? '#FC524D' : '#02A074',
height: '96rpx'
......
......@@ -8,7 +8,7 @@
<u-button :custom-style="customLoan" @click="handleClickButton('delete')">
<view class="delete-view">删除</view>
</u-button>
<u-button :custom-style="customWork" @click="handleClickButton('recover')">
<u-button type="success" :custom-style="customWork" @click="handleClickButton('recover')">
<view class="recover-view">恢复</view>
</u-button>
</view>
......
......@@ -19,7 +19,7 @@
<u-button :custom-style="customLoan" @click="handleClickButton('loan')">
<view class="loan-view">借支/结算</view>
</u-button>
<u-button :custom-style="customWork" @click="handleClickButton('work')">
<u-button type="success" :custom-style="customWork" @click="handleClickButton('work')">
<view class="work-view">记工</view>
</u-button>
</view>
......
......@@ -22,7 +22,7 @@
</scroll-view>
</view>
<view class="bottom-view" v-if="!isClosed">
<u-button :custom-style="customCreate" @click="handleClickCreate">
<u-button type="success" :custom-style="customCreate" @click="handleClickCreate">
<u-icon name="plus" color="#FFFFFF" size="40"></u-icon>
<view class="create-view">创建项目</view>
</u-button>
......
......@@ -44,7 +44,7 @@
<u-button :custom-style="customDelete" @click="handleClickDelete" class="delete-button">
<view class="delete-view">删除项目</view>
</u-button>
<u-button v-if="canClosed" :custom-style="customConFirm" @click="handleClickSetting" :loading="buttonLoading">
<u-button type="success" v-if="canClosed" :custom-style="customConFirm" @click="handleClickSetting" :loading="buttonLoading">
<view class="confirm-view">设置为已结清</view>
</u-button>
</view>
......
......@@ -82,7 +82,15 @@ $uni-font-size-paragraph:15px;
display: none;
}
/deep/.u-default-hover {
opacity: 0.6 !important;
}
/deep/.u-success-hover {
opacity: 0.6 !important;
}
/* uni.scss */
@import 'uview-ui/theme.scss';
// 引入自定义全局scss变量
@import "@/static/styles/common.scss"
\ No newline at end of file
@import "@/static/styles/common.scss";
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