From 7c93f6f7c794f55304efd3b93a1aae8c4f5724b6 Mon Sep 17 00:00:00 2001 From: donne1226 <503124742@qq.com> Date: Fri, 1 Apr 2022 23:28:42 +0800 Subject: [PATCH] fix all --- src/views/Governance.vue | 9 + src/views/StakingRewardComponent.vue | 17 +- .../OperationModal/components/GovDeposit.vue | 194 ++++++++++++++++++ .../OperationModal/components/IBCTransfer.vue | 1 - .../OperationModal/components/Unbond.vue | 1 - .../OperationModal/components/Vote.vue | 136 +++++------- .../OperationModal/components/Withdraw.vue | 16 -- .../components/WithdrawCommission.vue | 84 ++++++++ src/views/components/OperationModal/index.vue | 6 +- 9 files changed, 362 insertions(+), 102 deletions(-) create mode 100644 src/views/components/OperationModal/components/GovDeposit.vue create mode 100644 src/views/components/OperationModal/components/WithdrawCommission.vue diff --git a/src/views/Governance.vue b/src/views/Governance.vue index 7e7d3c25..b51d339f 100644 --- a/src/views/Governance.vue +++ b/src/views/Governance.vue @@ -164,6 +164,15 @@ > {{ $t('btn_deposit') }} + + {{ $t('btn_deposit') }}1 + Outstanding Rewards Withdraw Commission + + Withdraw Commission1 + + @@ -98,6 +111,7 @@ import { import { sha256 } from '@cosmjs/crypto' import { toHex } from '@cosmjs/encoding' import { formatToken, numberWithCommas } from '@/libs/utils' +import OperationModal from '@/views/components/OperationModal/index.vue' import OperationWithdrawCommissionComponent from './OperationWithdrawCommissionComponent.vue' export default { @@ -112,6 +126,7 @@ export default { BMediaAside, BAvatar, OperationWithdrawCommissionComponent, + OperationModal, }, props: { data: { diff --git a/src/views/components/OperationModal/components/GovDeposit.vue b/src/views/components/OperationModal/components/GovDeposit.vue new file mode 100644 index 00000000..8bdf23eb --- /dev/null +++ b/src/views/components/OperationModal/components/GovDeposit.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/views/components/OperationModal/components/IBCTransfer.vue b/src/views/components/OperationModal/components/IBCTransfer.vue index 2bdbe433..99b5d4ea 100644 --- a/src/views/components/OperationModal/components/IBCTransfer.vue +++ b/src/views/components/OperationModal/components/IBCTransfer.vue @@ -177,7 +177,6 @@ export default { token: '', amount: null, recipient: null, - error: null, IBCDenom: {}, paths: {}, destination: {}, diff --git a/src/views/components/OperationModal/components/Unbond.vue b/src/views/components/OperationModal/components/Unbond.vue index bf00902d..2882a100 100644 --- a/src/views/components/OperationModal/components/Unbond.vue +++ b/src/views/components/OperationModal/components/Unbond.vue @@ -119,7 +119,6 @@ export default { data() { return { validators: [], - selectedValidator: this.validatorAddress, token: '', amount: null, delegations: [], diff --git a/src/views/components/OperationModal/components/Vote.vue b/src/views/components/OperationModal/components/Vote.vue index 2f45c0af..f25e0029 100644 --- a/src/views/components/OperationModal/components/Vote.vue +++ b/src/views/components/OperationModal/components/Vote.vue @@ -16,14 +16,11 @@ rules="required" name="Voter" > - - {{ errors[0] }} Please import an account first! + {{ errors[0] }} @@ -34,41 +31,48 @@ label="Option" label-for="option" > -
+ +
- - Yes - - - No - - - No With Veto - - - Abstain - -
+ + Yes + + + No + + + No With Veto + + + Abstain + +
+ {{ errors[0] }} + @@ -78,15 +82,14 @@ diff --git a/src/views/components/OperationModal/index.vue b/src/views/components/OperationModal/index.vue index af0b1af0..d1a28649 100644 --- a/src/views/components/OperationModal/index.vue +++ b/src/views/components/OperationModal/index.vue @@ -40,7 +40,7 @@