Browse Source

修改提币按钮颜色显示不了

master
liaoxinyu 8 months ago
parent
commit
a0e2f79457
  1. 8
      layout/vButton.vue
  2. 17
      pages/safe/withdrawals-pwd.vue

8
layout/vButton.vue

@ -197,4 +197,12 @@ export default {
border-radius:inherit;
}
}
.white1 {
::v-deep uni-button {
background: #eaeaea;
color: #000!important;
border:none;
border-radius:inherit;
}
}
</style>

17
pages/safe/withdrawals-pwd.vue

@ -15,7 +15,7 @@
</view>
</view>
<view class="p-md ">
<v-button block type="white" class="w-max rounded-md" ref="btn" @click="setPassword">{{$t('safe.b7')}}</v-button>
<v-button block :type="buttonType" class="w-max rounded-md" ref="btn" @click="setPassword">{{$t('safe.b7')}}</v-button>
</view>
</main>
@ -39,6 +39,17 @@ export default {
...mapState({
user: "user",
}),
buttonType() {
return this.arePasswordsValid ? 'blue' : 'white1';
},
isButtonDisabled() {
return !this.arePasswordsValid;
},
arePasswordsValid() {
return this.form.password !== '' &&
this.form.password_confirmation !== '' &&
this.form.password === this.form.password_confirmation;
}
},
methods: {
setPassword() {
@ -46,8 +57,10 @@ export default {
Setting.withdrawalPassword(data, { btn: this.$refs.btn })
.then((res) => {
if(res.code==200){
this.$back();
this.$toast.success(this.$t('safe.d3'));
setTimeout(()=>{
this.$back();
},2000)
}
}).catch(() => {});
},

Loading…
Cancel
Save