@signal24/vue-foundation 4.29.2 → 4.29.4
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.
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<script lang="ts" setup>
|
|
16
16
|
import { ref } from 'vue';
|
|
17
|
+
import { watch } from 'vue';
|
|
17
18
|
|
|
18
19
|
import { OverlayContainer } from '@/components';
|
|
19
20
|
|
|
@@ -21,7 +22,11 @@ import DemoVfAlertModal from './demo-vf-alert-modal.vue';
|
|
|
21
22
|
import DemoVfSmartSelect from './demo-vf-smart-select.vue';
|
|
22
23
|
|
|
23
24
|
const demos = ['VfSmartSelect', 'VfAlertModal'] as const;
|
|
24
|
-
const selectedDemo = ref<(typeof demos)[number] | null>();
|
|
25
|
+
const selectedDemo = ref<(typeof demos)[number] | null>(sessionStorage.getItem('selectedDemo') as (typeof demos)[number] | null);
|
|
26
|
+
|
|
27
|
+
watch(selectedDemo, () => {
|
|
28
|
+
sessionStorage.setItem('selectedDemo', selectedDemo.value ?? '');
|
|
29
|
+
});
|
|
25
30
|
</script>
|
|
26
31
|
|
|
27
32
|
<style lang="scss" scoped></style>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div>
|
|
4
4
|
<b>Local options + label field</b>
|
|
5
5
|
<VfSmartSelect v-model="selectedInstantOption1" :options="instantOptions" label-field="label" />
|
|
6
|
-
Selected
|
|
6
|
+
Selected object: {{ JSON.stringify(selectedInstantOption1) }}
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div>
|
|
@@ -15,7 +15,21 @@
|
|
|
15
15
|
group-field="group"
|
|
16
16
|
null-title="No selection"
|
|
17
17
|
/>
|
|
18
|
-
Selected
|
|
18
|
+
Selected object: {{ JSON.stringify(selectedInstantOption2) }}
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div>
|
|
22
|
+
<b>Local options + label field + value field + null title + loading text</b>
|
|
23
|
+
<VfSmartSelect
|
|
24
|
+
v-model="selectedDelayedOption0"
|
|
25
|
+
:options="delayedOptions"
|
|
26
|
+
label="Options"
|
|
27
|
+
loading-text="Loading..."
|
|
28
|
+
null-title="Select an option"
|
|
29
|
+
label-field="label"
|
|
30
|
+
value-field="value"
|
|
31
|
+
/>
|
|
32
|
+
Selected value: {{ selectedDelayedOption0 ?? '-' }}
|
|
19
33
|
</div>
|
|
20
34
|
|
|
21
35
|
<div>
|
|
@@ -27,7 +41,7 @@
|
|
|
27
41
|
group-field="group"
|
|
28
42
|
null-title="No selection"
|
|
29
43
|
/>
|
|
30
|
-
Selected
|
|
44
|
+
Selected object: {{ JSON.stringify(selectedInstantOption2) }}
|
|
31
45
|
</div>
|
|
32
46
|
|
|
33
47
|
<div>
|
|
@@ -40,7 +54,7 @@
|
|
|
40
54
|
null-title="No selection"
|
|
41
55
|
@update:model-value="logModelValueChange"
|
|
42
56
|
/>
|
|
43
|
-
Selected
|
|
57
|
+
Selected object: {{ JSON.stringify(selectedDelayedOption1) }}
|
|
44
58
|
</div>
|
|
45
59
|
|
|
46
60
|
<div>
|
|
@@ -58,7 +72,7 @@
|
|
|
58
72
|
</div>
|
|
59
73
|
|
|
60
74
|
<div>
|
|
61
|
-
<b>Local delayed options + value field + label field + group + null title</b>
|
|
75
|
+
<b>Local delayed options + value field + label field + group + null title + preselected invalid</b>
|
|
62
76
|
<VfSmartSelect
|
|
63
77
|
v-model="selectedDelayedOption3"
|
|
64
78
|
:options="delayedOptions"
|
|
@@ -188,6 +202,7 @@ const delayedOptions = ref<IOption[]>();
|
|
|
188
202
|
|
|
189
203
|
const selectedInstantOption1 = ref<IOption | null>(null);
|
|
190
204
|
const selectedInstantOption2 = ref<IOption | null>(null);
|
|
205
|
+
const selectedDelayedOption0 = ref<number | null>(null);
|
|
191
206
|
const selectedDelayedOption1 = ref<IOption | null>(options[1]);
|
|
192
207
|
const selectedDelayedOption2 = ref<string | null>('2');
|
|
193
208
|
const selectedDelayedOption3 = ref<string | null>('19'); // intentionally invalid value
|