File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
client/src/components/Common Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
2- import { ref } from " vue" ;
2+ import { computed , ref } from " vue" ;
33
44import GModal from " @/components/BaseComponents/GModal.vue" ;
55import StatelessTags from " @/components/TagsMultiselect/StatelessTags.vue" ;
@@ -17,6 +17,10 @@ const props = withDefaults(defineProps<Props>(), {
1717
1818const tags = ref (props .initialTags );
1919
20+ const emptyTagList = computed (() => {
21+ return tags .value .length === 0 ;
22+ });
23+
2024const emit = defineEmits <{
2125 (e : " cancel" ): void ;
2226 (e : " ok" , tags : string []): void ;
@@ -42,7 +46,16 @@ function resetTags() {
4246 </script >
4347
4448<template >
45- <GModal :show =" show" ok-text =" Add" :confirm =" true" size =" small" :title =" title" @ok =" onOk" @cancel =" onCancel" >
49+ <GModal
50+ :show =" show"
51+ ok-text =" Add"
52+ :confirm =" true"
53+ size =" small"
54+ :title =" title"
55+ :ok-disabled =" emptyTagList"
56+ ok-disabled-title =" Please select at least one tag"
57+ @ok =" onOk"
58+ @cancel =" onCancel" >
4659 <StatelessTags :value =" tags" @input =" onTagsChange($event)" />
4760 </GModal >
4861</template >
You can’t perform that action at this time.
0 commit comments