Commit 2849f3c4 authored by Facius's avatar Facius

feat: 按钮按下样式

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