@mythpe/quasar-ui-qui 0.4.80 → 0.4.82

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.80",
3
+ "version": "0.4.82",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -35,7 +35,7 @@ interface P {
35
35
  rules?: Props['rules'];
36
36
  viewMode?: Props['viewMode'];
37
37
  viewModeValue?: Props['viewModeValue'];
38
- viewModeKey: Props['viewModeKey'];
38
+ viewModeKey?: Props['viewModeKey'];
39
39
  topLabel?: Props['topLabel'];
40
40
  color?: Props['color'];
41
41
  type?: Props['type'];
@@ -74,6 +74,7 @@ const props = withDefaults(defineProps<P>(), {
74
74
  rules: undefined,
75
75
  viewMode: !1,
76
76
  viewModeValue: undefined,
77
+ viewModeKey: undefined,
77
78
  topLabel: undefined,
78
79
  color: undefined,
79
80
  type: 'radio',
@@ -192,7 +193,7 @@ const customViewModeValue = computed(() => {
192
193
  const k = props.optionLabel === undefined ? 'label' : (typeof props.optionLabel === 'function' ? props.optionLabel(opt) : props.optionLabel)
193
194
  return opt[k]
194
195
  })
195
- return opts.length ? opts.join(', ') : undefined
196
+ return opts?.length ? opts.join(', ') : undefined
196
197
  }
197
198
  const opt = options.value?.find((e) => {
198
199
  const k = props.optionValue === undefined ? 'value' : (typeof props.optionValue === 'function' ? props.optionValue(e) : props.optionValue)
@@ -300,11 +301,11 @@ defineOptions({
300
301
  >
301
302
  <template
302
303
  v-if="viewMode"
303
- #control
304
+ #control="controlScope"
304
305
  >
305
306
  <slot name="control">
306
307
  <MInputFieldControl>
307
- {{ customViewModeValue ?? value }}
308
+ {{ customViewModeValue ?? controlScope.modelValue }}
308
309
  </MInputFieldControl>
309
310
  </slot>
310
311
  </template>
@@ -233,13 +233,13 @@ defineOptions({
233
233
  <template #control>
234
234
  <slot name="control">
235
235
  <div
236
- v-if="!disable && !readonly && !viewMode && !!getPlaceholder && !value"
236
+ v-if="!disable && !readonly && !viewMode && !!getPlaceholder && (!value || value?.length === 0)"
237
237
  class="q-placeholder"
238
238
  >
239
239
  {{ getPlaceholder }}
240
240
  </div>
241
241
  <template v-else-if="viewMode && viewModeValue">
242
- <div>{{ viewModeValue?.toString() }}</div>
242
+ <div>{{ viewModeValue?.toString?.() }}</div>
243
243
  </template>
244
244
  <template v-else>
245
245
  <div>
@@ -247,7 +247,7 @@ defineOptions({
247
247
  {{ Object.values(value).join(rangeSeparator || pluginOptions.picker?.rangeSeparator || defSeparator) }}
248
248
  </template>
249
249
  <template v-else>
250
- {{ value?.toString() }}
250
+ {{ value?.toString?.() }}
251
251
  </template>
252
252
  </div>
253
253
  </template>