This commit is contained in:
syuilo
2021-04-23 12:00:07 +09:00
parent b5c8dc0fe3
commit e825d3be83
8 changed files with 186 additions and 271 deletions

View File

@ -9,9 +9,9 @@
<slot :result="result"></slot>
</div>
<div class="_formItem" v-else>
<div class="_formPanel">
error!
<button @click="retry">retry</button>
<div class="_formPanel eiurkvay">
<div><i class="fas fa-exclamation-triangle"></i> {{ $ts.somethingHappened }}</div>
<MkButton inline @click="retry" class="retry"><i class="fas fa-redo-alt"></i> {{ $ts.retry }}</MkButton>
</div>
</div>
</transition>
@ -20,8 +20,13 @@
<script lang="ts">
import { defineComponent, PropType, ref, watch } from 'vue';
import './form.scss';
import MkButton from '@client/components/ui/button.vue';
export default defineComponent({
components: {
MkButton
},
props: {
p: {
type: Function as PropType<() => Promise<any>>,
@ -84,4 +89,13 @@ export default defineComponent({
.fade-leave-to {
opacity: 0;
}
.eiurkvay {
padding: 16px;
text-align: center;
> .retry {
margin-top: 16px;
}
}
</style>