@mythpe/quasar-ui-qui 0.4.74 → 0.4.75

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.4.74",
3
+ "version": "0.4.75",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -51,6 +51,8 @@ interface P {
51
51
  prependIconProps?: Props['prependIconProps'];
52
52
  appendIcon?: Props['appendIcon'];
53
53
  appendIconProps?: Props['appendIconProps'];
54
+ yesNo?: boolean;
55
+ genders?: boolean;
54
56
  }
55
57
 
56
58
  const props = withDefaults(defineProps<P>(), {
@@ -86,7 +88,8 @@ const props = withDefaults(defineProps<P>(), {
86
88
  prependIcon: undefined,
87
89
  prependIconProps: undefined,
88
90
  appendIcon: undefined,
89
- appendIconProps: undefined
91
+ appendIconProps: undefined,
92
+ yesNo: undefined
90
93
  })
91
94
  defineModel<Props['modelValue']>({ required: !1, default: undefined })
92
95
  const loading = defineModel<Props['loading']>('loading', { required: !1, default: !1 })
@@ -112,6 +115,32 @@ const scopes = reactive(inputScope)
112
115
  defineExpose<typeof scopes & { input: typeof input }>({ input, ...scopes })
113
116
  const { alertError, __, props: pluginProps, api } = useMyth()
114
117
  const fetchData = async () => {
118
+ if (props.yesNo) {
119
+ options.value = [
120
+ {
121
+ label: __('labels.yes'),
122
+ value: true
123
+ },
124
+ {
125
+ label: __('labels.no'),
126
+ value: false
127
+ }
128
+ ]
129
+ return
130
+ }
131
+ if (props.genders) {
132
+ options.value = [
133
+ {
134
+ label: __('labels.male'),
135
+ value: 'male'
136
+ },
137
+ {
138
+ label: __('labels.female'),
139
+ value: 'female'
140
+ }
141
+ ]
142
+ return
143
+ }
115
144
  if (props.service) {
116
145
  const s = props.service
117
146
  loading.value = !0
@@ -58,5 +58,15 @@ export type MOptionsProps = Omit<QOptionGroupProps, 'name' | 'modelValue' | 'opt
58
58
  * Default is: 33.33333333%
59
59
  */
60
60
  fitWidth?: boolean;
61
+ /**
62
+ * Set options to yes/no.
63
+ * Default is: false
64
+ */
65
+ yesNo?: boolean;
66
+ /**
67
+ * Set options to male/female.
68
+ * Default is: false
69
+ */
70
+ genders?: boolean;
61
71
  }
62
72
  export type MOptionsSlots = QOptionGroupSlots & QFieldSlots & BaseInputsSlots