@ederzeel/nuxt-schema-form-nightly 0.1.0-29162277.41a79d0 → 0.1.0-29162336.61206bd
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.
|
@@ -61,10 +61,6 @@ const values = computed(() => {
|
|
|
61
61
|
return []
|
|
62
62
|
})
|
|
63
63
|
|
|
64
|
-
type Entries<T> = {
|
|
65
|
-
[K in keyof T]: [K, T[K]]
|
|
66
|
-
}[keyof T][]
|
|
67
|
-
|
|
68
64
|
const geneateColumnsFromSchema = (items: PropertiesType): TableColumn<{}>[] => {
|
|
69
65
|
if (!items.properties) return []
|
|
70
66
|
const res: TableColumn<{}>[] = (Object.entries(items.properties) as [string, PropertiesType][]).map(
|
|
@@ -89,7 +85,6 @@ const geneateColumnsFromSchema = (items: PropertiesType): TableColumn<{}>[] => {
|
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
const columns = computed<TableColumn<{}>[]>(() => {
|
|
92
|
-
console.log(geneateColumnsFromSchema(props.items))
|
|
93
88
|
const columns = props.columns ? Array.from(props.columns) : geneateColumnsFromSchema(props.items)
|
|
94
89
|
|
|
95
90
|
if (props.editInline) {
|
|
@@ -113,7 +108,6 @@ const columns = computed<TableColumn<{}>[]>(() => {
|
|
|
113
108
|
if (props.edit) {
|
|
114
109
|
columns.push({
|
|
115
110
|
id: 'actions',
|
|
116
|
-
rowClass: 'text-right',
|
|
117
111
|
cell: ({ row }) => {
|
|
118
112
|
return h(
|
|
119
113
|
'div',
|
|
@@ -185,7 +179,7 @@ const options = computed(() => {
|
|
|
185
179
|
|
|
186
180
|
const open = (index: number) => {
|
|
187
181
|
if (props.setHidden) props.setHidden(true)
|
|
188
|
-
model.value = { index: index, value:
|
|
182
|
+
model.value = { index: index, value: JSON.parse(JSON.stringify(values.value[index])) }
|
|
189
183
|
}
|
|
190
184
|
|
|
191
185
|
const onInput = (value: Record<string, unknown>, index: number) => {
|