[WIP] Заменил BaseInputTime на BaseInput, исправил стили

This commit is contained in:
megavrilinvv
2023-01-17 18:26:19 +03:00
parent 9d2dfbffa3
commit 06d570d6df
10 changed files with 31 additions and 101 deletions

View File

@@ -47,7 +47,7 @@ export default {
mask: String,
maxLength: String,
rule: Array,
modelValue: String,
modelValue: String || Date,
placeholder: String,
disabled: Boolean,
label: String,

View File

@@ -1,5 +1,5 @@
<template lang="pug">
.flex.flex-col
.flex.flex-col.gap-y-2
.label.font-semibold.text-sm.opacity-40(v-if="label") {{ label }}
slot
</template>

View File

@@ -1,54 +0,0 @@
<template lang="pug">
.flex.flex-col.gap-y-2
.label.font-semibold.text-sm.opacity-40(v-if="label") {{ label }}
.input-wrapper.flex.gap-x-2.px-4.box-border.py-2.h-10
input.input.w-full.outline-0.not-italic.cursor-text(
v-model="value"
type="time"
:placeholder="placeholder"
)
.slot(v-if="withIcon" :class="iconPosition")
slot.cursor-pointer
</template>
<script>
export default {
name: "BaseInputTime",
props: {
modelValue: String,
withIcon: {
default: false,
},
iconPosition: {
default: "right",
},
placeholder: String,
label: String,
},
emits: ["update:modelValue"],
computed: {
value: {
get() {
return this.modelValue;
},
set(value) {
this.$emit("update:modelValue", value);
},
},
},
};
</script>
<style lang="sass" scoped>
.left
order: -1
.right
order: 1
.input-wrapper
border-radius: 4px
background-color: var(--default-white)
color: var(--font-black-color)
border: 1.5px solid var(--border-light-grey-color)
input::-webkit-calendar-picker-indicator
cursor: pointer
</style>