7299_testToMaster #351

Merged
alexm merged 321 commits from 7299_testToMaster into master 2024-05-07 05:36:02 +00:00
2 changed files with 28 additions and 17 deletions
Showing only changes of commit 1e7c8e03df - Show all commits

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import { computed } from 'vue'; import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
const emit = defineEmits(['update:modelValue', 'update:options', 'keyup.enter']); const emit = defineEmits(['update:modelValue', 'update:options', 'keyup.enter']);
@ -26,7 +26,7 @@ const value = computed({
emit('update:modelValue', value); emit('update:modelValue', value);
}, },
}); });
const focus = ref(false);
const styleAttrs = computed(() => { const styleAttrs = computed(() => {
return $props.isOutlined return $props.isOutlined
? { ? {
@ -43,6 +43,11 @@ const onEnterPress = () => {
</script> </script>
<template> <template>
<div
@mouseover="focus = true"
@mouseleave="focus = false"
:rules="$attrs.required ? [requiredFieldRule] : null"
>
<QInput <QInput
ref="vnInputRef" ref="vnInputRef"
v-model="value" v-model="value"
@ -50,13 +55,20 @@ const onEnterPress = () => {
type="text" type="text"
:class="{ required: $attrs.required }" :class="{ required: $attrs.required }"
@keyup.enter="onEnterPress()" @keyup.enter="onEnterPress()"
:rules="$attrs.required ? [requiredFieldRule] : null"
> >
<template v-if="$slots.prepend" #prepend> <template v-if="$slots.prepend" #prepend>
<slot name="prepend" /> <slot name="prepend" />
</template> </template>
<template v-if="$slots.append" #append>
<slot name="append" /> <template #append>
<slot name="append" v-if="$slots.append" />
<QIcon
name="close"
size="xs"
v-if="focus && value"
@click="value = null"
></QIcon>
</template> </template>
</QInput> </QInput>
</div>
</template> </template>

View File

@ -69,7 +69,6 @@ const filterOptions = {
v-model="data.socialName" v-model="data.socialName"
:label="t('customer.basicData.socialName')" :label="t('customer.basicData.socialName')"
:rules="validate('client.socialName')" :rules="validate('client.socialName')"
autofocus
/> />
</div> </div>
<div class="col"> <div class="col">