@bagelink/vue 0.0.1141 → 0.0.1143

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,14 +31,11 @@ interface PropTypes {
31
31
  }
32
32
 
33
33
  const props = withDefaults(defineProps<PropTypes>(), {
34
- searchPlaceholder: 'Search',
35
34
  placeholder: 'Select',
36
35
  })
37
36
 
38
37
  const emit = defineEmits(['update:modelValue']) // Add 'search' event
39
38
 
40
- const searchPlaceholder = $computed(() => props.searchPlaceholder)
41
-
42
39
  const searchInput = $ref<HTMLElement | undefined>()
43
40
 
44
41
  let selectedItems = $ref<Option[]>([])
@@ -61,6 +58,7 @@ const selectedLabel = $computed((): string => {
61
58
  }
62
59
  return selectedItems.map(item => getLabel(item)).join(', ')
63
60
  })
61
+ const searchPlaceholder = $computed(() => props.searchPlaceholder ?? selectedLabel ?? 'Search')
64
62
 
65
63
  let serverOptions: Option[] = $ref([])
66
64
  let isSearching = $ref(false)
@@ -308,6 +308,8 @@ watch(() => props.dirPath, () => {
308
308
  </div>
309
309
  <div v-if="isImage(path_key)" class="h-100">
310
310
  <Image
311
+ v-lightbox="{ src: pathToUrl(path_key), download: true }"
312
+
311
313
  class="single-preview"
312
314
  :pathKey="path_key"
313
315
  alt=""
@@ -341,7 +343,9 @@ watch(() => props.dirPath, () => {
341
343
  </div>
342
344
  <Image
343
345
  v-if="isImage(file.file.type)"
346
+ v-lightbox="{ src: fileToUrl(file.file), download: true }"
344
347
  class="single-preview"
348
+
345
349
  :src="fileToUrl(file.file)"
346
350
  alt=""
347
351
  />
@@ -36,6 +36,7 @@ export interface BaseBagelField<T = { [key: string]: any }> {
36
36
  'disabled'?: boolean
37
37
  'helptext'?: string
38
38
  'options'?: BagelFieldOptions<T>
39
+ 'slots'?: { [key: string]: any }
39
40
  'defaultValue'?: any
40
41
  'transform'?: (val?: any, rowData?: T) => any
41
42
  'onUpdate'?: (val: any, rowData?: T) => void