[WIP] Заменил степпер на квазаровский, фикс стилей

This commit is contained in:
megavrilinvv
2023-02-22 16:09:27 +03:00
parent ad08a6b4d5
commit 888550f3c5
6 changed files with 130 additions and 156 deletions

View File

@@ -53,6 +53,14 @@ export default {
type: String,
default: "menu",
},
icon: {
type: String,
default: null,
},
size: {
type: Number,
default: 18,
},
disable: Boolean,
label: String,
},

View File

@@ -0,0 +1,79 @@
<template lang="pug">
q-stepper(
v-model="currentStep",
:color="color",
:flat="flat",
class="font-input",
animated
)
q-step.overflow-hidden(
v-for="step in steps",
:name="step.id",
:title="step.value",
:key="step.id",
:prefix="step.id + 1"
:done="currentStep > step.id"
)
slot
q-stepper-navigation.flex.justify-between
.flex
q-btn(
@click="prevStep",
v-if="currentStep !== 0",
outline,
no-caps,
label="Назад",
color="primary",
padding="8px 24px"
)
.flex
q-btn(
@click="nextStep",
v-if="currentStep < steps.length-1",
no-caps,
label="Далее",
color="primary",
padding="8px 24px"
)
q-btn(
@click="finish",
v-if="currentStep === steps.length-1",
no-caps,
:label="finishLabel",
color="primary",
padding="8px 24px"
)
</template>
<script>
export default {
name: "BaseStepperQuasar",
props: {
name: Number,
steps: Array,
currentStep: {
type: Number,
default: 0,
},
nextStep: Function,
prevStep: Function,
flat: {
type: Boolean,
default: false,
},
color: {
type: String,
default: "primary",
},
finishLabel: {
type: String,
default: "Завершить",
},
},
};
</script>
<style lang="sass" scoped>
.font-input
font-feature-settings: 'pnum' on, 'lnum' on
</style>