|
@@ -62,7 +62,9 @@
|
|
|
/>
|
|
|
</van-cell-group>
|
|
|
<div class="button-group">
|
|
|
- <van-button class="btn" round block type="primary" native-type="submit">
|
|
|
+ <van-button class="btn" round block type="primary"
|
|
|
+ :loading-text="$t('form.Loading')"
|
|
|
+ :loading="loading" native-type="submit">
|
|
|
{{ $t("router.ImportWallet") }}
|
|
|
</van-button>
|
|
|
</div>
|
|
@@ -80,6 +82,7 @@ const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
const walletStore = useWalletStore();
|
|
|
const type = route.query.type;
|
|
|
+const loading = ref(false);
|
|
|
|
|
|
const form = ref({
|
|
|
userKey: "",
|
|
@@ -90,6 +93,7 @@ const onSubmit = async () => {
|
|
|
$msg($t("form.InconsistentPasswords"));
|
|
|
return;
|
|
|
}
|
|
|
+ loading.value = true;
|
|
|
if(type == 0){
|
|
|
walletStore.privateKey = form.value.userKey;
|
|
|
}else{
|
|
@@ -100,6 +104,7 @@ const onSubmit = async () => {
|
|
|
walletStore.accountPassword = data.password ;
|
|
|
walletStore.accountHint = form.value.promptMessage;
|
|
|
await walletStore.loginWithPrivateKey(type != 0);
|
|
|
+ loading.value = false;
|
|
|
router.push({
|
|
|
path: "/wallet",
|
|
|
});
|
|
@@ -109,6 +114,12 @@ const onSubmit = async () => {
|
|
|
<style scoped lang="less">
|
|
|
.van-cell-group {
|
|
|
margin-top: 16px;
|
|
|
+ :deep(.van-cell){
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 16px !important;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
}
|
|
|
.button-group {
|
|
|
width: calc(100% - 32px);
|