WIP Исправлены inputs в SectionAddress
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<template lang="pug">
|
||||
.flex.flex-col.gap-y-2
|
||||
.label.font-semibold.text-sm.opacity-40(v-if="label") {{ label }}
|
||||
.font-semibold.text-sm.opacity-40(
|
||||
v-if="label",
|
||||
:class="labelClass"
|
||||
) {{ label }}
|
||||
.base-select.flex.justify-between.items-center.py-9px.px-4.gap-4.cursor-pointer.relative(
|
||||
ref="select",
|
||||
@click="open = !open",
|
||||
@@ -46,6 +49,7 @@ export default {
|
||||
center: Boolean,
|
||||
label: String,
|
||||
textStyle: String,
|
||||
labelStyle: String,
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
data() {
|
||||
@@ -71,6 +75,15 @@ export default {
|
||||
"text-base": true,
|
||||
};
|
||||
},
|
||||
labelClass() {
|
||||
return this.labelStyle
|
||||
? {
|
||||
[this.labelStyle]: true,
|
||||
}
|
||||
: {
|
||||
"text-sm": true,
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
clickItem(id, label) {
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
<template lang="pug">
|
||||
.flex.flex-col.gap-y-2
|
||||
.label.font-semibold.text-sm.opacity-40(v-if="label") {{ label }}
|
||||
.label.font-semibold.text-sm.opacity-40(
|
||||
v-if="label",
|
||||
:class="labelClass"
|
||||
) {{ label }}
|
||||
.input-wrapper.flex.gap-x-2.px-4.box-border.py-10px(
|
||||
:class="{'border-none': borderNone, 'border-error': borderError }"
|
||||
:style="{'background-color': disabled && 'var(--bg-disable-grey-color)'}"
|
||||
)
|
||||
input.input.w-full.outline-0.not-italic(
|
||||
v-model="value",
|
||||
:style="{'color': disabled && 'var(--font-grey-color-0)'}"
|
||||
:style="{'color': disabled && 'var(--font-grey-color-0)'}",
|
||||
:class="textClass",
|
||||
:placeholder="placeholder",
|
||||
:disabled="disabled",
|
||||
:type="type"
|
||||
@@ -35,6 +39,8 @@ export default {
|
||||
borderError: Boolean,
|
||||
disabled: Boolean,
|
||||
label: String,
|
||||
textStyle: String,
|
||||
labelStyle: String,
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
computed: {
|
||||
@@ -46,6 +52,24 @@ export default {
|
||||
this.$emit("update:modelValue", value);
|
||||
},
|
||||
},
|
||||
textClass() {
|
||||
return this.textStyle
|
||||
? {
|
||||
[this.textStyle]: true,
|
||||
}
|
||||
: {
|
||||
"text-base": true,
|
||||
};
|
||||
},
|
||||
labelClass() {
|
||||
return this.labelStyle
|
||||
? {
|
||||
[this.labelStyle]: true,
|
||||
}
|
||||
: {
|
||||
"text-sm": true,
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<template lang="pug">
|
||||
.flex.flex-col.gap-y-2
|
||||
.font-semibold.opacity-40(
|
||||
v-if="label",
|
||||
:class="labelClass"
|
||||
) {{ label }}
|
||||
.base-select(
|
||||
@click="invertOpen",
|
||||
:class="{'open': open && !disable, 'border-none': borderNone}",
|
||||
:style="{'background-color': disable && 'var(--bg-disable-grey-color)'}"
|
||||
ref="select"
|
||||
)
|
||||
.placeholder(
|
||||
@@ -37,6 +43,8 @@ export default {
|
||||
placeholderOpacity: Boolean,
|
||||
disable: Boolean,
|
||||
textStyle: String,
|
||||
labelStyle: String,
|
||||
label: String,
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
data() {
|
||||
@@ -62,6 +70,15 @@ export default {
|
||||
"text-base": true,
|
||||
};
|
||||
},
|
||||
labelClass() {
|
||||
return this.labelStyle
|
||||
? {
|
||||
[this.labelStyle]: true,
|
||||
}
|
||||
: {
|
||||
"text-sm": true,
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
clickItem(id) {
|
||||
@@ -80,6 +97,7 @@ export default {
|
||||
<style scoped lang="sass">
|
||||
.base-select
|
||||
width: 100%
|
||||
height: 40px
|
||||
border: 1.5px solid #D3D4DC
|
||||
border-radius: 4px
|
||||
padding: 9px 16px
|
||||
|
||||
@@ -1,55 +1,54 @@
|
||||
<template lang="pug">
|
||||
.flex.flex-col.gap-y-4
|
||||
.flex.flex-col(class="gap-y-1.5")
|
||||
.text-info.text-xxs.font-semibold Город
|
||||
base-select.select.text-sm(
|
||||
base-select(
|
||||
disable,
|
||||
textStyle="text-sm",
|
||||
labelStyle="text-xxs",
|
||||
placeholder="Введите город",
|
||||
v-model="dopeAddress.city",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
label="Город"
|
||||
)
|
||||
.flex.flex-col(class="gap-y-1.5")
|
||||
.text-info.text-xxs.font-semibold Область
|
||||
base-input.text-sm.input-info(
|
||||
base-input(
|
||||
disabled,
|
||||
placeholder="Введите область",
|
||||
labelStyle="text-xxs",
|
||||
textStyle="text-sm",
|
||||
v-model="dopeAddress.region",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
label="Область"
|
||||
)
|
||||
.flex.flex-col(class="gap-y-1.5")
|
||||
.text-info.text-xxs.font-semibold Улица
|
||||
base-input.text-sm.input-info(
|
||||
base-input(
|
||||
disabled,
|
||||
placeholder="Введите улицу",
|
||||
labelStyle="text-xxs",
|
||||
textStyle="text-sm",
|
||||
v-model="dopeAddress.street",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
label="Улица"
|
||||
)
|
||||
.flex.gap-x-4
|
||||
.flex.flex-col(class="gap-y-1.5")
|
||||
.text-info.text-xxs.font-semibold Дом
|
||||
base-input.text-sm.input-info(
|
||||
base-input(
|
||||
disabled,
|
||||
placeholder="Дом",
|
||||
label="Дом"
|
||||
v-model="dopeAddress.house",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
labelStyle="text-xxs",
|
||||
textStyle="text-sm",
|
||||
)
|
||||
.flex.flex-col(class="gap-y-1.5")
|
||||
.text-info.text-xxs.font-semibold Квартира
|
||||
base-input.text-sm.input-info(
|
||||
base-input(
|
||||
disabled,
|
||||
placeholder="Квартира",
|
||||
label="Квартира",
|
||||
v-model="dopeAddress.flat",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
labelStyle="text-xxs",
|
||||
textStyle="text-sm",
|
||||
)
|
||||
.flex.flex-col(class="gap-y-1.5")
|
||||
.text-info.text-xxs.font-semibold Индекс
|
||||
base-input.text-sm.input-info(
|
||||
base-input(
|
||||
disabled,
|
||||
v-mask="'######'",
|
||||
placeholder="000000",
|
||||
label="Индекс",
|
||||
v-model="dopeAddress.index",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
labelStyle="text-xxs",
|
||||
textStyle="text-sm",
|
||||
)
|
||||
</template>
|
||||
|
||||
@@ -69,12 +68,3 @@ export default {
|
||||
directives: { mask },
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.input-info
|
||||
color: var(--font-dark-blue-color)
|
||||
.text-info
|
||||
color: var(--font-grey-color)
|
||||
.select
|
||||
height: 40px
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user