mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
✨ Feature(custom): filter list in gallery page now sync with visiable setting
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
<ChevronDownIcon :size="16" />
|
<ChevronDownIcon :size="16" />
|
||||||
</button>
|
</button>
|
||||||
<div v-show="picBedDropdownOpen" class="multiselect-dropdown">
|
<div v-show="picBedDropdownOpen" class="multiselect-dropdown">
|
||||||
<label v-for="item in picBedG" :key="item.type" class="multiselect-option">
|
<label v-for="item in filteredPicBedG" :key="item.type" class="multiselect-option">
|
||||||
<input v-model="choosedPicBed" type="checkbox" :value="item.type" />
|
<input v-model="choosedPicBed" type="checkbox" :value="item.type" />
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</label>
|
</label>
|
||||||
@@ -602,6 +602,13 @@ const effectiveGridBreakpoints = computed(() => {
|
|||||||
return [{ min: 0, cols: userGridColumns.value }]
|
return [{ min: 0, cols: userGridColumns.value }]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const filteredPicBedG = computed(() => {
|
||||||
|
if (galleryPicBedFilterSetting.value.length === 0) {
|
||||||
|
return picBedG.value
|
||||||
|
}
|
||||||
|
return picBedG.value.filter(item => galleryPicBedFilterSetting.value.includes(item.type))
|
||||||
|
})
|
||||||
|
|
||||||
const imageLoadStates = reactive<Record<string, boolean>>({})
|
const imageLoadStates = reactive<Record<string, boolean>>({})
|
||||||
const imageErrorStates = reactive<Record<string, boolean>>({})
|
const imageErrorStates = reactive<Record<string, boolean>>({})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user