glib-web 2.6.8 → 2.6.10
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/components/_chip.vue +15 -2
- package/components/fields/check.vue +26 -18
- package/components/fields/hidden.vue +7 -2
- package/components/fields/submit.vue +5 -2
- package/components/panels/responsive.vue +13 -10
- package/nav/dialog.vue +2 -0
- package/package.json +1 -1
- package/utils/settings.js +0 -0
package/components/_chip.vue
CHANGED
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
@click="$onClick()"
|
|
12
12
|
v-on="on"
|
|
13
13
|
>
|
|
14
|
-
|
|
14
|
+
<div v-if="spec.icon" class="icon-wrapper">
|
|
15
|
+
<common-icon :spec="spec.icon" />
|
|
16
|
+
</div>
|
|
17
|
+
<div>{{ spec.text }}</div>
|
|
15
18
|
</v-chip>
|
|
16
19
|
<v-chip
|
|
17
20
|
v-else
|
|
@@ -20,7 +23,13 @@
|
|
|
20
23
|
:small="$classes().includes('small')"
|
|
21
24
|
v-on="on"
|
|
22
25
|
>
|
|
23
|
-
|
|
26
|
+
<!-- <span v-if="spec.icon" class="icon-wrapper"
|
|
27
|
+
><common-icon :spec="spec.icon"
|
|
28
|
+
/></span> -->
|
|
29
|
+
<div v-if="spec.icon" class="icon-wrapper">
|
|
30
|
+
<common-icon :spec="spec.icon" />
|
|
31
|
+
</div>
|
|
32
|
+
<div>{{ spec.text }}</div>
|
|
24
33
|
</v-chip>
|
|
25
34
|
</common-badge>
|
|
26
35
|
</template>
|
|
@@ -53,4 +62,8 @@ export default {
|
|
|
53
62
|
.v-chip:not(.v-chip--clickable).theme--light:hover:before {
|
|
54
63
|
opacity: 0;
|
|
55
64
|
}
|
|
65
|
+
.icon-wrapper {
|
|
66
|
+
display: flex;
|
|
67
|
+
padding-right: 2px;
|
|
68
|
+
}
|
|
56
69
|
</style>
|
|
@@ -30,6 +30,31 @@ export default {
|
|
|
30
30
|
},
|
|
31
31
|
methods: {
|
|
32
32
|
$ready() {
|
|
33
|
+
this.updateData()
|
|
34
|
+
},
|
|
35
|
+
changed(event) {
|
|
36
|
+
// Execute later to ensure the checkbox's checked state has been updated.
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
this.$type.ifObject(this.groupElement, val =>
|
|
39
|
+
val.dispatchEvent(new Event("change"))
|
|
40
|
+
);
|
|
41
|
+
}, 100);
|
|
42
|
+
|
|
43
|
+
// setTimeout(() => {
|
|
44
|
+
this.$executeOnChange();
|
|
45
|
+
// }, 500);
|
|
46
|
+
},
|
|
47
|
+
$internalizeValue(val) {
|
|
48
|
+
if (val == this.spec.checkValue) {
|
|
49
|
+
return val;
|
|
50
|
+
}
|
|
51
|
+
return this.spec.uncheckValue;
|
|
52
|
+
},
|
|
53
|
+
action_merge(mergedSpec) {
|
|
54
|
+
Object.assign(this.spec, mergedSpec);
|
|
55
|
+
this.updateData()
|
|
56
|
+
},
|
|
57
|
+
updateData() {
|
|
33
58
|
this.groupElement = this.$el.closest("[data-component=checkGroup]");
|
|
34
59
|
|
|
35
60
|
let groupName = null;
|
|
@@ -49,24 +74,7 @@ export default {
|
|
|
49
74
|
this.fieldType = "switch";
|
|
50
75
|
}
|
|
51
76
|
});
|
|
52
|
-
|
|
53
|
-
changed(event) {
|
|
54
|
-
// Execute later to ensure the checkbox's checked state has been updated.
|
|
55
|
-
setTimeout(() => {
|
|
56
|
-
this.$type.ifObject(this.groupElement, val =>
|
|
57
|
-
val.dispatchEvent(new Event("change"))
|
|
58
|
-
);
|
|
59
|
-
}, 100);
|
|
60
|
-
|
|
61
|
-
// setTimeout(() => {
|
|
62
|
-
this.$executeOnChange();
|
|
63
|
-
// }, 500);
|
|
64
|
-
},
|
|
65
|
-
$internalizeValue(val) {
|
|
66
|
-
if (val == this.spec.checkValue) {
|
|
67
|
-
return val;
|
|
68
|
-
}
|
|
69
|
-
return this.spec.uncheckValue;
|
|
77
|
+
// this.fieldModel = this.spec.value;
|
|
70
78
|
}
|
|
71
79
|
}
|
|
72
80
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<common-button :spec="spec" type="submit" :disabled="$isBusy" />
|
|
2
|
+
<common-button :spec="spec" type="submit" :disabled="spec.disabled || $isBusy" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -15,7 +15,10 @@ export default {
|
|
|
15
15
|
methods: {
|
|
16
16
|
$ready() {
|
|
17
17
|
this.$dispatchEvent("forms/addSubmit", this.$data);
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
action_merge(mergedSpec) {
|
|
20
|
+
Object.assign(this.spec, mergedSpec);
|
|
21
|
+
},
|
|
19
22
|
}
|
|
20
23
|
};
|
|
21
24
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- Use `display: contents` so this div doesn't intefere with the child's sizing behaviour. -->
|
|
3
|
-
<div style="display: contents
|
|
3
|
+
<div style="display: contents">
|
|
4
4
|
<!-- <common-responsive v-if="!hoverViewsSpec" :spec="spec" /> -->
|
|
5
5
|
<v-menu
|
|
6
6
|
v-if="hoverViewsSpec"
|
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
<common-responsive :spec="hoverViewsSpec" />
|
|
20
20
|
</v-card>
|
|
21
21
|
</v-menu>
|
|
22
|
-
<common-tooltip v-else :spec="spec">
|
|
22
|
+
<common-tooltip v-else :spec="Object.assign({}, spec, { id: undefined })">
|
|
23
23
|
<template v-slot:activator="{ on }">
|
|
24
|
-
<common-responsive
|
|
24
|
+
<common-responsive
|
|
25
|
+
:spec="Object.assign({}, spec, { id: undefined })"
|
|
26
|
+
:event-handlers="on"
|
|
27
|
+
/>
|
|
25
28
|
</template>
|
|
26
29
|
</common-tooltip>
|
|
27
30
|
</div>
|
|
@@ -33,14 +36,14 @@ export default {
|
|
|
33
36
|
spec: {
|
|
34
37
|
type: Object,
|
|
35
38
|
required: true,
|
|
36
|
-
default: function() {
|
|
39
|
+
default: function () {
|
|
37
40
|
return {};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
41
|
+
},
|
|
42
|
+
},
|
|
40
43
|
},
|
|
41
44
|
data() {
|
|
42
45
|
return {
|
|
43
|
-
hoverViewsSpec: null
|
|
46
|
+
hoverViewsSpec: null,
|
|
44
47
|
};
|
|
45
48
|
},
|
|
46
49
|
methods: {
|
|
@@ -48,11 +51,11 @@ export default {
|
|
|
48
51
|
this.hoverViewsSpec = this.spec.hoverViews
|
|
49
52
|
? {
|
|
50
53
|
childViews: this.spec.hoverViews,
|
|
51
|
-
align: this.spec.align
|
|
54
|
+
align: this.spec.align,
|
|
52
55
|
}
|
|
53
56
|
: null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
57
|
+
},
|
|
58
|
+
},
|
|
56
59
|
};
|
|
57
60
|
</script>
|
|
58
61
|
|
package/nav/dialog.vue
CHANGED
package/package.json
CHANGED
package/utils/settings.js
CHANGED
|
File without changes
|