[WIP] Заменил инпуты с датой на baseInput, исправил стили, фикс станицы логина
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
<template lang="pug">
|
||||
.flex.flex-col.gap-y-2
|
||||
.label.font-semibold.text-sm.opacity-40(
|
||||
v-if="label",
|
||||
:class="labelClass",
|
||||
:style="{color: 'var(--font-black-color)'}"
|
||||
) {{ label }}
|
||||
base-input-container.gap-y-2(:label="label")
|
||||
q-input(
|
||||
v-model="value",
|
||||
:input-class="textClass",
|
||||
@@ -16,16 +11,19 @@
|
||||
:disable="disabled",
|
||||
:rules="rule",
|
||||
:mask="mask",
|
||||
:maxlength="maxLength"
|
||||
hide-bottom-space,
|
||||
autogrow
|
||||
:maxlength="maxLength",
|
||||
:autogrow="autogrow",
|
||||
hide-bottom-space
|
||||
)
|
||||
slot.cursor-pointer
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseInputContainer from "@/components/base/BaseInputContainer.vue";
|
||||
|
||||
export default {
|
||||
name: "BaseInput",
|
||||
components: { BaseInputContainer },
|
||||
props: {
|
||||
dense: {
|
||||
type: Boolean,
|
||||
@@ -39,6 +37,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
autogrow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
type: {
|
||||
default: "text",
|
||||
},
|
||||
@@ -50,16 +52,19 @@ export default {
|
||||
disabled: Boolean,
|
||||
label: String,
|
||||
textStyle: String,
|
||||
labelStyle: String,
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
computed: {
|
||||
value: {
|
||||
get() {
|
||||
return this.modelValue;
|
||||
return this.type === "date"
|
||||
? this.modelValue?.toISOString().split("T")[0]
|
||||
: this.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:modelValue", value);
|
||||
this.type === "date"
|
||||
? this.$emit("update:modelValue", value ? new Date(value) : null)
|
||||
: this.$emit("update:modelValue", value);
|
||||
},
|
||||
},
|
||||
textClass() {
|
||||
@@ -71,15 +76,6 @@ export default {
|
||||
"text-base": true,
|
||||
};
|
||||
},
|
||||
labelClass() {
|
||||
return this.labelStyle
|
||||
? {
|
||||
[this.labelStyle]: true,
|
||||
}
|
||||
: {
|
||||
"text-sm": true,
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user