Исправление ошибок фронта
Правим фронт от ошибок
This commit is contained in:
@@ -19,8 +19,10 @@
|
||||
class="btn-confirm"
|
||||
:class="variant"
|
||||
@click="handleConfirm"
|
||||
:disabled="isLoading"
|
||||
>
|
||||
{{ confirmText }}
|
||||
<span v-if="isLoading" class="btn-loader"></span>
|
||||
<span v-else>{{ confirmText }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,6 +64,11 @@ const props = defineProps({
|
||||
variant: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
},
|
||||
// Состояние загрузки (блокирует кнопку подтверждения)
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -179,6 +186,27 @@ const handleDiscard = () => {
|
||||
background: #d97706;
|
||||
}
|
||||
|
||||
.btn-confirm:disabled {
|
||||
opacity: 0.7;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-loader {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||
border-top-color: currentColor;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.7s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Transition */
|
||||
.dialog-enter-active,
|
||||
.dialog-leave-active {
|
||||
|
||||
Reference in New Issue
Block a user