File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
vue3/src/components/display Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2
2
<div v-if =" props.keywords" >
3
3
<slot name =" prepend" ></slot >
4
4
5
- <v-chip class =" me-1 mb-1" :label =" props.label" :color =" props.color" :size =" props.size" :variant =" props.variant" v-for =" k in keywords" > {{ k.label }}</v-chip >
5
+ <v-chip class =" me-1 mb-1" :label =" props.label" :color =" props.color" :size =" props.size" :variant =" props.variant" v-for =" k in keywords"
6
+ :to =" {name: 'SearchPage', query: {keywords: k.id}}" > {{ k.label }}
7
+ </v-chip >
6
8
7
9
<slot name =" append" ></slot >
8
10
</div >
@@ -21,11 +23,11 @@ const props = defineProps({
21
23
variant: {type: String as PropType <NonNullable <" tonal" | " flat" | " text" | " elevated" | " outlined" | " plain" > | undefined >, default: ' tonal' },
22
24
label: {type: Boolean , default: true },
23
25
// maximum number of keywords, 0 for all
24
- maxKeywords : {type: Number , default: 0 },
26
+ maxKeywords: {type: Number , default: 0 },
25
27
})
26
28
27
29
const keywords = computed (() => {
28
- if (props .maxKeywords > 0 ){
30
+ if (props .maxKeywords > 0 ) {
29
31
return props .keywords ?.slice (0 , props .maxKeywords )
30
32
} else {
31
33
return props .keywords
You can’t perform that action at this time.
0 commit comments