@simsustech/quasar-components 0.3.2 → 0.3.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.
- package/CHANGELOG.md +12 -0
- package/dist/form.js +12 -11
- package/package.json +1 -1
- package/src/ui/form/BooleanSelect.vue +2 -2
- package/src/ui/form/GenderSelect.vue +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @simsustech/quasar-components
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7f5b036: fix(components): await loadLang in GenderSelect
|
|
8
|
+
|
|
9
|
+
## 0.3.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- e1538f5: fix(components): make genderOptions reactive; fix(components): make booleanOptions reactive
|
|
14
|
+
|
|
3
15
|
## 0.3.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, defineComponent, useAttrs, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, computed, useSlots, renderSlot, createCommentVNode, resolveDirective, createElementVNode, withDirectives, createElementBlock, Fragment } from "vue";
|
|
1
|
+
import { ref, defineComponent, useAttrs, withAsyncContext, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, computed, useSlots, renderSlot, createCommentVNode, resolveDirective, createElementVNode, withDirectives, createElementBlock, Fragment } from "vue";
|
|
2
2
|
import { useQuasar, QSelect, QItem, QItemSection, QItemLabel, QInput, QIcon, QBtn, QDate, QPopupProxy, QEditor } from "quasar";
|
|
3
3
|
const lang$1 = {
|
|
4
4
|
isoName: "en-US",
|
|
@@ -73,17 +73,18 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
73
73
|
required: { type: Boolean }
|
|
74
74
|
},
|
|
75
75
|
emits: ["update:modelValue"],
|
|
76
|
-
setup(__props) {
|
|
76
|
+
async setup(__props) {
|
|
77
|
+
let __temp, __restore;
|
|
77
78
|
const props = __props;
|
|
78
79
|
const attrs = useAttrs();
|
|
79
80
|
const lang2 = useLang();
|
|
80
81
|
const $q = useQuasar();
|
|
81
82
|
if (lang2.value.isoName !== $q.lang.isoName)
|
|
82
|
-
loadLang($q.lang.isoName);
|
|
83
|
+
[__temp, __restore] = withAsyncContext(() => loadLang($q.lang.isoName)), await __temp, __restore();
|
|
83
84
|
watch($q.lang, (val) => {
|
|
84
85
|
loadLang($q.lang.isoName);
|
|
85
86
|
});
|
|
86
|
-
const genderOptions = [
|
|
87
|
+
const genderOptions = ref([
|
|
87
88
|
{
|
|
88
89
|
label: lang2.value.gender.male,
|
|
89
90
|
value: "male"
|
|
@@ -96,7 +97,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
96
97
|
label: lang2.value.gender.other,
|
|
97
98
|
value: "other"
|
|
98
99
|
}
|
|
99
|
-
];
|
|
100
|
+
]);
|
|
100
101
|
const validations = ref([]);
|
|
101
102
|
if (props.required)
|
|
102
103
|
validations.value.push(
|
|
@@ -106,12 +107,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
106
107
|
return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
|
|
107
108
|
rules: validations.value,
|
|
108
109
|
"model-value": __props.modelValue,
|
|
109
|
-
options: genderOptions,
|
|
110
|
+
options: genderOptions.value,
|
|
110
111
|
label: `${unref(lang2).gender.gender}${__props.required ? "*" : ""}`,
|
|
111
112
|
"emit-value": "",
|
|
112
113
|
"map-options": "",
|
|
113
114
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
114
|
-
}), null, 16, ["rules", "model-value", "label"]);
|
|
115
|
+
}), null, 16, ["rules", "model-value", "options", "label"]);
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
118
|
});
|
|
@@ -417,7 +418,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
417
418
|
watch($q.lang, (val) => {
|
|
418
419
|
loadLang($q.lang.isoName);
|
|
419
420
|
});
|
|
420
|
-
const booleanOptions = [
|
|
421
|
+
const booleanOptions = ref([
|
|
421
422
|
{
|
|
422
423
|
label: lang2.value.yes,
|
|
423
424
|
value: true
|
|
@@ -426,7 +427,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
426
427
|
label: lang2.value.no,
|
|
427
428
|
value: false
|
|
428
429
|
}
|
|
429
|
-
];
|
|
430
|
+
]);
|
|
430
431
|
const validations = ref([]);
|
|
431
432
|
if (props.required)
|
|
432
433
|
validations.value.push(
|
|
@@ -436,12 +437,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
436
437
|
return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
|
|
437
438
|
rules: validations.value,
|
|
438
439
|
"model-value": __props.modelValue,
|
|
439
|
-
options: booleanOptions,
|
|
440
|
+
options: booleanOptions.value,
|
|
440
441
|
label: `${__props.label}${__props.required ? "*" : ""}`,
|
|
441
442
|
"emit-value": "",
|
|
442
443
|
"map-options": "",
|
|
443
444
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
|
|
444
|
-
}), null, 16, ["rules", "model-value", "label"]);
|
|
445
|
+
}), null, 16, ["rules", "model-value", "options", "label"]);
|
|
445
446
|
};
|
|
446
447
|
}
|
|
447
448
|
});
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ watch($q.lang, (val) => {
|
|
|
33
33
|
loadLang($q.lang.isoName)
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
const booleanOptions = [
|
|
36
|
+
const booleanOptions = ref([
|
|
37
37
|
{
|
|
38
38
|
label: lang.value.yes,
|
|
39
39
|
value: true
|
|
@@ -42,7 +42,7 @@ const booleanOptions = [
|
|
|
42
42
|
label: lang.value.no,
|
|
43
43
|
value: false
|
|
44
44
|
}
|
|
45
|
-
]
|
|
45
|
+
])
|
|
46
46
|
|
|
47
47
|
const validations = ref<ValidationRule[]>([])
|
|
48
48
|
|
|
@@ -28,12 +28,12 @@ const attrs = useAttrs()
|
|
|
28
28
|
const lang = useLang()
|
|
29
29
|
|
|
30
30
|
const $q = useQuasar()
|
|
31
|
-
if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
|
|
31
|
+
if (lang.value.isoName !== $q.lang.isoName) await loadLang($q.lang.isoName)
|
|
32
32
|
watch($q.lang, (val) => {
|
|
33
33
|
loadLang($q.lang.isoName)
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
const genderOptions = [
|
|
36
|
+
const genderOptions = ref([
|
|
37
37
|
{
|
|
38
38
|
label: lang.value.gender.male,
|
|
39
39
|
value: 'male'
|
|
@@ -46,7 +46,7 @@ const genderOptions = [
|
|
|
46
46
|
label: lang.value.gender.other,
|
|
47
47
|
value: 'other'
|
|
48
48
|
}
|
|
49
|
-
]
|
|
49
|
+
])
|
|
50
50
|
|
|
51
51
|
const validations = ref<ValidationRule[]>([])
|
|
52
52
|
|