@stonecrop/desktop 0.4.23 → 0.4.24
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/dist/desktop.css +1 -1
- package/dist/desktop.js +2604 -2445
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +10 -10
- package/dist/desktop.umd.cjs.map +1 -1
- package/package.json +5 -5
- package/src/components/Doctype.vue +10 -7
- package/src/components/Records.vue +2 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/desktop",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.24",
|
|
4
4
|
"description": "Desktop-specific components for Stonecrop UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"vue": "^3.5.17",
|
|
32
|
-
"@stonecrop/aform": "0.4.
|
|
33
|
-
"@stonecrop/atable": "0.4.
|
|
34
|
-
"@stonecrop/stonecrop": "0.4.
|
|
35
|
-
"@stonecrop/themes": "0.4.
|
|
32
|
+
"@stonecrop/aform": "0.4.24",
|
|
33
|
+
"@stonecrop/atable": "0.4.24",
|
|
34
|
+
"@stonecrop/stonecrop": "0.4.24",
|
|
35
|
+
"@stonecrop/themes": "0.4.24"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@microsoft/api-documenter": "^7.26.29",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<AForm
|
|
2
|
+
<AForm class="aform-main" v-model="schema" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup lang="ts">
|
|
@@ -10,16 +10,19 @@ import { AForm } from '@stonecrop/aform'
|
|
|
10
10
|
import type { SchemaTypes } from '@stonecrop/aform'
|
|
11
11
|
import { /* DoctypeMeta, */ useStonecrop } from '@stonecrop/stonecrop'
|
|
12
12
|
|
|
13
|
-
const { stonecrop
|
|
13
|
+
const { stonecrop } = useStonecrop()
|
|
14
14
|
const schema = ref<SchemaTypes[]>([])
|
|
15
15
|
|
|
16
|
-
watch(
|
|
17
|
-
if (
|
|
16
|
+
watch(stonecrop, () => {
|
|
17
|
+
if (stonecrop.value) {
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
19
|
-
let newSchema
|
|
19
|
+
let newSchema = stonecrop.value.schema?.schema.toArray()
|
|
20
|
+
if (!newSchema) {
|
|
21
|
+
newSchema = []
|
|
22
|
+
}
|
|
20
23
|
newSchema.forEach((item, index) => {
|
|
21
|
-
const record = stonecrop.value
|
|
22
|
-
const fieldValue = record[item.fieldname]
|
|
24
|
+
const record = stonecrop.value?.store.record
|
|
25
|
+
const fieldValue = record?.[item.fieldname]
|
|
23
26
|
newSchema[index].value = fieldValue
|
|
24
27
|
})
|
|
25
28
|
schema.value = newSchema
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ATable
|
|
3
|
-
v-if="isReady"
|
|
4
|
-
:columns="stonecrop.schema.schema.toArray()"
|
|
5
|
-
:rows="stonecrop.store.records"
|
|
6
|
-
:config="config" />
|
|
2
|
+
<ATable v-model="stonecrop.store.records" :columns="stonecrop.schema.schema.toArray()" :config="config" />
|
|
7
3
|
</template>
|
|
8
4
|
|
|
9
5
|
<script setup lang="ts">
|
|
@@ -15,6 +11,6 @@ import { useStonecrop } from '@stonecrop/stonecrop'
|
|
|
15
11
|
// default_view key in schema
|
|
16
12
|
// last_used_view_type in application state
|
|
17
13
|
|
|
18
|
-
const { stonecrop
|
|
14
|
+
const { stonecrop } = useStonecrop()
|
|
19
15
|
const config = { view: 'list' }
|
|
20
16
|
</script>
|