@live-change/vue3-components 0.8.14 → 0.8.16
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/form/DefinedForm.vue +2 -2
- package/logic/data.js +1 -1
- package/package.json +3 -3
package/form/DefinedForm.vue
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
reset(initialValue) {
|
|
73
73
|
if(this.definition.type) {
|
|
74
|
-
let defaultValue = this.definition.defaultValue
|
|
74
|
+
let defaultValue = this.definition.defaultValue ?? this.definition.default
|
|
75
75
|
if(defaultValue === undefined) {
|
|
76
76
|
switch(this.definition.type) {
|
|
77
77
|
case "String" : defaultValue = ""; break;
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
reset(initialValue) {
|
|
167
|
-
if(this.definition.type
|
|
167
|
+
if(this.definition.type === 'Object') {
|
|
168
168
|
this.data[this.property] = JSON.parse(JSON.stringify(initialValue ||
|
|
169
169
|
(this.definition.hasOwnProperty('defaultValue') ? this.definition.defaultValue : {} )))
|
|
170
170
|
this.object = this.data[this.property]
|
package/logic/data.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getCurrentInstance } from 'vue'
|
|
|
2
2
|
|
|
3
3
|
export function defaultData(definition, otherSrc) {
|
|
4
4
|
if(!definition) return undefined
|
|
5
|
-
let result = definition.defaultValue || otherSrc
|
|
5
|
+
let result = definition.defaultValue || definition.default || otherSrc
|
|
6
6
|
if(definition.properties) {
|
|
7
7
|
result = result || {}
|
|
8
8
|
for(let name in definition.properties) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/vue3-components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.16",
|
|
4
4
|
"description": "Live Change Framework - vue components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
24
|
+
"@live-change/vue3-ssr": "^0.8.16",
|
|
25
25
|
"debug": "^4.3.4",
|
|
26
26
|
"mitt": "3.0.1",
|
|
27
27
|
"vue": "^3.4.19"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "b8ac84cbe1a8c435c7b5003dfc64ddc41a4e15a6"
|
|
30
30
|
}
|