Filter
This commit is contained in:
parent
0c20791179
commit
6dfca55de5
|
@ -65,4 +65,3 @@ function logout() {
|
|||
router.push({ name: 'Login' })
|
||||
}
|
||||
</script>
|
||||
@/store/appStore
|
||||
|
|
|
@ -44,6 +44,8 @@ export const useAppStore = defineStore('app', {
|
|||
filteredPrinters(state): Printer[] {
|
||||
const filter = this.printerFilter?.trim()
|
||||
|
||||
console.log(filter)
|
||||
|
||||
if (!filter) {
|
||||
return state.printers
|
||||
}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<v-container fluid>
|
||||
<v-row>
|
||||
<v-col cols="6" v-for="printer in appStore.printers" :key="printer.id">
|
||||
<v-col
|
||||
cols="6"
|
||||
v-for="printer in appStore.filteredPrinters"
|
||||
:key="printer.id"
|
||||
>
|
||||
<printer-card :printer="printer" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
@ -21,4 +25,3 @@ onMounted(async () => {
|
|||
await appStore.fetchPrinters()
|
||||
})
|
||||
</script>
|
||||
@/store/appStore
|
||||
|
|
|
@ -112,4 +112,3 @@ async function login() {
|
|||
}
|
||||
}
|
||||
</script>
|
||||
@/store/appStore
|
||||
|
|
Loading…
Reference in New Issue
Block a user