[WIP] Изменил ширину столбцов клиентов, добавил ограничение на поле email

This commit is contained in:
megavrilinvv
2022-12-12 13:27:21 +03:00
parent 1d78f05934
commit 8c2ded8758
9 changed files with 50 additions and 13 deletions

View File

@@ -1,6 +1,12 @@
<template lang="pug">
.flex.box-border.px-4.items-center.w-full.text-sm(:style="{ minWidth : width + 'px' }")
span(v-if="!isOpenChange") {{value.email.username}}
.flex.box-border.px-4.items-center.w-full.text-sm(
:style="{ minWidth: width + 'px', maxWidth: isHover && this.value.email.username.length >= 25 ? width + 30 + 'px' : width + 'px' }"
)
span.z-10(
v-if="!isOpenChange",
@mouseover="changeHover",
@mouseleave="changeHover"
) {{maxValue}}
base-input(
v-if="isOpenChange",
:width-input="234",
@@ -20,5 +26,22 @@ export default {
width: Number,
isOpenChange: Boolean,
},
data() {
return {
isHover: false,
};
},
computed: {
maxValue() {
return this.value.email.username.length >= 25 && !this.isHover
? this.value.email.username.substr(0, 25) + "..."
: this.value.email.username;
},
},
methods: {
changeHover() {
this.isHover = !this.isHover;
},
},
};
</script>