@d-mok/quasar-app-extension-quasar-axe 2.1.67 → 2.1.69

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.67",
3
+ "version": "2.1.69",
4
4
  "description": "A Quasar App Extension",
5
5
  "author": "d-mok <49301824+d-mok@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -11,12 +11,15 @@ import { computed } from 'vue'
11
11
 
12
12
  const modelValue = defineModel<T>()
13
13
 
14
- const { options, optionLabel = $ => String($) } = defineProps<{
14
+ const { options, optionLabel } = defineProps<{
15
15
  options: T[]
16
16
  optionLabel?: (string & keyof T) | ((_: T) => string)
17
17
  }>()
18
18
 
19
19
  let opts = computed(() =>
20
- options.map($ => ({ label: String($.pipe(optionLabel)), value: $ }))
20
+ options.map($ => ({
21
+ label: String($.pipe(optionLabel ?? ($ => String($)))),
22
+ value: $,
23
+ }))
21
24
  )
22
25
  </script>
@@ -11,12 +11,15 @@ import { computed } from 'vue'
11
11
 
12
12
  let modelValue = defineModel<T>()
13
13
 
14
- const { options, optionLabel = $ => String($) } = defineProps<{
14
+ const { options, optionLabel } = defineProps<{
15
15
  options: T[]
16
16
  optionLabel?: (string & keyof T) | ((_: T) => string)
17
17
  }>()
18
18
 
19
19
  let opts = computed(() =>
20
- options.map($ => ({ label: String($.pipe(optionLabel)), value: $ }))
20
+ options.map($ => ({
21
+ label: String($.pipe(optionLabel ?? ($ => String($)))),
22
+ value: $,
23
+ }))
21
24
  )
22
25
  </script>
@@ -22,7 +22,9 @@
22
22
  <tr style="cursor: move">
23
23
  <td>{{ index + 1 }}</td>
24
24
  <td>
25
- <b>{{ element.pipe(label) }}</b>
25
+ <b>{{
26
+ element.pipe(label ?? (($: any) => String($)))
27
+ }}</b>
26
28
  </td>
27
29
  </tr>
28
30
  </template>
@@ -37,7 +39,7 @@ let modelValue = defineModel<T[]>()
37
39
 
38
40
  const {
39
41
  header,
40
- label = $ => String($),
42
+ label,
41
43
  dense = false,
42
44
  } = defineProps<{
43
45
  header: string
@@ -151,10 +151,7 @@ export async function askRadio<T>(
151
151
  options: {
152
152
  model: '',
153
153
  type: 'radio',
154
- items: items.map($ => ({
155
- label: labelFunc($),
156
- value: labelFunc($),
157
- })),
154
+ items: values.map($ => ({ label: $, value: $ })),
158
155
  isValid: $ => typeof $ === 'string' && values.includes($),
159
156
  },
160
157
  })