@d-mok/quasar-app-extension-quasar-axe 2.1.60 → 2.1.62

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-mok/quasar-app-extension-quasar-axe",
3
- "version": "2.1.60",
3
+ "version": "2.1.62",
4
4
  "description": "A Quasar App Extension",
5
5
  "author": "d-mok <49301824+d-mok@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -91,7 +91,7 @@
91
91
  </template>
92
92
 
93
93
  <script lang="ts" setup>
94
- import { ref } from 'vue'
94
+ import { computed, ref } from 'vue'
95
95
  type item = {
96
96
  title?: string
97
97
  caption?: string
@@ -124,15 +124,11 @@ const props = withDefaults(
124
124
 
125
125
  let open = ref(false)
126
126
 
127
- import { watch } from 'vue'
128
127
  import { useRoute } from 'vue-router'
129
128
  const route = useRoute()
130
-
131
- const maxPageWidth = ref(2000)
132
-
133
- watch(route, (to, from) => {
134
- maxPageWidth.value = props.items.get({ link: to.path })?.width ?? 2000
135
- })
129
+ const maxPageWidth = computed(
130
+ () => props.items.get({ link: route.path })?.width ?? 2000
131
+ )
136
132
  </script>
137
133
 
138
134
  <style scoped>
@@ -215,6 +215,22 @@ export async function askFile(
215
215
  return await base(dialogFile, {
216
216
  title,
217
217
  message,
218
+ multiple: false,
219
+ cancel: true,
220
+ })
221
+ }
222
+
223
+ /**
224
+ * Ask to select files.
225
+ */
226
+ export async function askFiles(
227
+ title: string,
228
+ message: string = ''
229
+ ): Promise<File[]> {
230
+ return await base(dialogFile, {
231
+ title,
232
+ message,
233
+ multiple: true,
218
234
  cancel: true,
219
235
  })
220
236
  }
@@ -10,6 +10,7 @@
10
10
  <q-file
11
11
  v-model="file"
12
12
  label="File"
13
+ :multiple="multiple"
13
14
  filled
14
15
  counter
15
16
  />
@@ -42,11 +43,12 @@ defineEmits([...useDialogPluginComponent.emits])
42
43
  const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
43
44
  useDialogPluginComponent()
44
45
 
45
- let file = ref<File | null>(null)
46
+ let file = ref<File | File[] | null>(null)
46
47
 
47
48
  const props = defineProps<{
48
49
  title: string
49
50
  message: string
51
+ multiple: boolean
50
52
  cancel: boolean
51
53
  }>()
52
54
  </script>