[WIP] Заменил инпуты и радио инпуты

This commit is contained in:
megavrilinvv
2023-01-18 18:09:36 +03:00
parent b2a4d8313d
commit b410628858
7 changed files with 65 additions and 97 deletions

View File

@@ -2,7 +2,9 @@
base-input-container.gap-y-2(:label="label")
q-input(
v-model="value",
:input-class="textClass",
:class="{'circle': circle}",
:input-style="{ color: textColor }",
:borderless="borderless",
:placeholder="placeholder",
:outlined="outlined",
:dense="dense",
@@ -13,6 +15,7 @@
:mask="mask",
:maxlength="maxLength",
:autogrow="autogrow",
:square="square",
hide-bottom-space
)
slot.cursor-pointer
@@ -25,6 +28,7 @@ export default {
name: "BaseInput",
components: { BaseInputContainer },
props: {
circle: Boolean,
dense: {
type: Boolean,
default: true,
@@ -33,10 +37,18 @@ export default {
type: Boolean,
default: true,
},
square: {
type: Boolean,
default: false,
},
filled: {
type: Boolean,
default: false,
},
borderless: {
type: Boolean,
default: false,
},
autogrow: {
type: Boolean,
default: false,
@@ -46,12 +58,12 @@ export default {
},
mask: String,
maxLength: String,
textColor: String,
rule: Array,
modelValue: String || Date,
modelValue: [String, Date],
placeholder: String,
disabled: Boolean,
label: String,
textStyle: String,
},
emits: ["update:modelValue"],
computed: {
@@ -67,15 +79,15 @@ export default {
: this.$emit("update:modelValue", value);
},
},
textClass() {
return this.textStyle
? {
[this.textStyle]: true,
}
: {
"text-base": true,
};
},
},
};
</script>
<style lang="sass" scoped>
.circle
width: 100%
height: 100%
border-radius: 50%
z-index: 5
opacity: 0
</style>