forked from verdnatura/salix-front
feat: disabled buttons
This commit is contained in:
parent
96d68ed106
commit
3825dc3851
|
@ -63,6 +63,15 @@ const getSelectedTagValues = async (tag) => {
|
||||||
<template>
|
<template>
|
||||||
<QForm @submit="applyTags(tagValues)" class="all-pointer-events">
|
<QForm @submit="applyTags(tagValues)" class="all-pointer-events">
|
||||||
<QCard class="q-pa-sm column q-pa-lg">
|
<QCard class="q-pa-sm column q-pa-lg">
|
||||||
|
<QBtn
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
style="position: absolute; z-index: 1; right: 0; top: 0"
|
||||||
|
icon="search"
|
||||||
|
type="submit"
|
||||||
|
>
|
||||||
|
</QBtn>
|
||||||
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.tag')"
|
:label="t('params.tag')"
|
||||||
v-model="selectedTag"
|
v-model="selectedTag"
|
||||||
|
@ -77,6 +86,16 @@ const getSelectedTagValues = async (tag) => {
|
||||||
use-input
|
use-input
|
||||||
@update:model-value="($event) => getSelectedTagValues($event)"
|
@update:model-value="($event) => getSelectedTagValues($event)"
|
||||||
/>
|
/>
|
||||||
|
<QBtn
|
||||||
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
|
class="filter-icon q-mb-md"
|
||||||
|
size="md"
|
||||||
|
dense
|
||||||
|
:disabled="!selectedTag || !tagValues[0].value"
|
||||||
|
@click="tagValues.unshift({})"
|
||||||
|
/>
|
||||||
<div
|
<div
|
||||||
v-for="(value, index) in tagValues"
|
v-for="(value, index) in tagValues"
|
||||||
:key="value"
|
:key="value"
|
||||||
|
@ -95,7 +114,7 @@ const getSelectedTagValues = async (tag) => {
|
||||||
rounded
|
rounded
|
||||||
emit-value
|
emit-value
|
||||||
use-input
|
use-input
|
||||||
:disable="!value"
|
:disable="!value || !selectedTag"
|
||||||
:is-clearable="false"
|
:is-clearable="false"
|
||||||
class="col"
|
class="col"
|
||||||
/>
|
/>
|
||||||
|
@ -108,25 +127,19 @@ const getSelectedTagValues = async (tag) => {
|
||||||
:is-clearable="false"
|
:is-clearable="false"
|
||||||
class="col"
|
class="col"
|
||||||
/>
|
/>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="delete"
|
icon="delete"
|
||||||
|
size="md"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
rounded
|
||||||
|
flat
|
||||||
class="filter-icon col-2"
|
class="filter-icon col-2"
|
||||||
|
:disabled="!value.value"
|
||||||
@click="removeTagGroupParam(index)"
|
@click="removeTagGroupParam(index)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<QBtn
|
|
||||||
icon="add_circle"
|
|
||||||
shortcut="+"
|
|
||||||
flat
|
|
||||||
class="filter-icon q-mb-md"
|
|
||||||
size="md"
|
|
||||||
dense
|
|
||||||
@click="tagValues.push({})"
|
|
||||||
/>
|
|
||||||
<QBtn color="primary" type="submit">
|
|
||||||
{{ t('search') }}
|
|
||||||
</QBtn>
|
|
||||||
</QCard>
|
</QCard>
|
||||||
</QForm>
|
</QForm>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -35,6 +35,7 @@ const arrayData = useArrayData(props.dataKey);
|
||||||
const categoryList = ref(null);
|
const categoryList = ref(null);
|
||||||
const selectedCategoryFk = ref(null);
|
const selectedCategoryFk = ref(null);
|
||||||
const typeList = ref([]);
|
const typeList = ref([]);
|
||||||
|
const tagsValues = ref([]);
|
||||||
const selectedTypeFk = ref(null);
|
const selectedTypeFk = ref(null);
|
||||||
const generalSearchParam = ref(null);
|
const generalSearchParam = ref(null);
|
||||||
|
|
||||||
|
@ -289,9 +290,12 @@ onMounted(() => {
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
|
|
||||||
<QItem class="q-mt-lg">
|
<QItem class="q-mt-lg">
|
||||||
<VnInput
|
<VnSelect
|
||||||
:label="t('components.itemsFilterPanel.value')"
|
:label="t('components.itemsFilterPanel.value')"
|
||||||
is-outlined
|
:options="props.tagValue"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
rounded
|
||||||
:is-clearable="false"
|
:is-clearable="false"
|
||||||
v-model="generalSearchParam"
|
v-model="generalSearchParam"
|
||||||
@keyup.enter="
|
@keyup.enter="
|
||||||
|
@ -305,7 +309,7 @@ onMounted(() => {
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<QIcon name="search" />
|
<QIcon name="search" />
|
||||||
</template>
|
</template>
|
||||||
<template #append>
|
<template #after>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="add_circle"
|
icon="add_circle"
|
||||||
shortcut="+"
|
shortcut="+"
|
||||||
|
@ -315,6 +319,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
<QPopupProxy>
|
<QPopupProxy>
|
||||||
<CatalogFilterValueDialog
|
<CatalogFilterValueDialog
|
||||||
|
style="display: inline-block"
|
||||||
:tags="tags"
|
:tags="tags"
|
||||||
@apply-tags="
|
@apply-tags="
|
||||||
($event) => applyTags($event, params, searchFn)
|
($event) => applyTags($event, params, searchFn)
|
||||||
|
@ -322,7 +327,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnSelect>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue