@ederzeel/nuxt-schema-form-nightly 0.1.0-29119142.f6bc066 → 0.1.0-29119255.9390cd6
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.
|
@@ -17,12 +17,13 @@ export type SComponentProps = {
|
|
|
17
17
|
id?: string
|
|
18
18
|
title?: string
|
|
19
19
|
renderer?: string
|
|
20
|
-
type?: string
|
|
20
|
+
type?: string | unknown[]
|
|
21
21
|
properties?: Properties
|
|
22
22
|
enum?: string[]
|
|
23
23
|
enum_titles?: string[]
|
|
24
24
|
format?: string
|
|
25
25
|
description?: string
|
|
26
|
+
placeholder?: string
|
|
26
27
|
jsonSchemaPath?: string
|
|
27
28
|
required?: string[]
|
|
28
29
|
isRequired: boolean
|
|
@@ -44,7 +45,8 @@ const onSubmit = () => {
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
const Render = () => {
|
|
47
|
-
const { type, renderer, format } = props
|
|
48
|
+
const { type: t, renderer, format } = props
|
|
49
|
+
const type = Array.isArray(t) ? t[0] : t
|
|
48
50
|
if (type == null || (renderer != null && renderer === 'none')) {
|
|
49
51
|
return undefined
|
|
50
52
|
} else if (renderer) {
|
|
@@ -5,6 +5,7 @@ const props = defineProps<{
|
|
|
5
5
|
id: string
|
|
6
6
|
title?: string
|
|
7
7
|
description?: string
|
|
8
|
+
placeholder?: string
|
|
8
9
|
jsonSchemaPath: string
|
|
9
10
|
items: {
|
|
10
11
|
id: string
|
|
@@ -36,7 +37,7 @@ const value = defineModel<string[]>({ required: true })
|
|
|
36
37
|
>
|
|
37
38
|
<USelect
|
|
38
39
|
v-model="value"
|
|
39
|
-
placeholder="select size"
|
|
40
|
+
:placeholder="props.placeholder || 'select size'"
|
|
40
41
|
:items="options"
|
|
41
42
|
multiple
|
|
42
43
|
value-attribute="value"
|
|
@@ -5,6 +5,7 @@ const props = defineProps<{
|
|
|
5
5
|
id: string
|
|
6
6
|
title?: string
|
|
7
7
|
description?: string
|
|
8
|
+
placeholder?: string
|
|
8
9
|
enum: string[]
|
|
9
10
|
enum_titles?: string[]
|
|
10
11
|
isRequired: boolean
|
|
@@ -25,7 +26,7 @@ const value = defineModel<string>({ required: true })
|
|
|
25
26
|
>
|
|
26
27
|
<USelect
|
|
27
28
|
v-model="value"
|
|
28
|
-
placeholder="
|
|
29
|
+
:placeholder="props.placeholder || 'Make a seletion'"
|
|
29
30
|
:items="options"
|
|
30
31
|
value-attribute="value"
|
|
31
32
|
option-attribute="key"
|