@mythpe/quasar-ui-qui 0.3.70 → 0.3.71

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.3.70",
3
+ "version": "0.3.71",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -13,7 +13,7 @@
13
13
  import type { ApiInterface, GenericMDtBtn, MDatatableProps } from '../../types'
14
14
  import type { InvalidSubmissionHandler, SubmissionHandler } from 'vee-validate'
15
15
  import { useForm } from 'vee-validate'
16
- import { computed, onMounted, ref, toValue, watch } from 'vue'
16
+ import { computed, onMounted, ref, toValue, useAttrs, watch } from 'vue'
17
17
  import { is as quasarHelpers, QCardSection, QTable, useQuasar } from 'quasar'
18
18
  import { useDtHelpers, useMyth } from '../../composable'
19
19
  import { useI18n } from 'vue-i18n'
@@ -466,6 +466,21 @@ watch(formDialogModel, (v) => {
466
466
  }
467
467
  })
468
468
  const table = ref<InstanceType<typeof QTable>>()
469
+ const mainAttrs = computed(() => ({
470
+ title: getTableTitle.value,
471
+ bordered: props.bordered === undefined ? pluginOptions.value.datatable?.bordered : props.bordered,
472
+ dense: props.dense === undefined ? (theme.value?.inputs?.dense !== undefined ? theme.value.inputs.dense : pluginOptions.value.datatable?.dense) : props.dense,
473
+ flat: props.flat === undefined ? pluginOptions.value.datatable?.flat : props.flat,
474
+ wrapCells: wrapCellsRef.value
475
+ }))
476
+ const attrs = useAttrs()
477
+ console.log(attrs)
478
+ const bindAttr = computed(() => ({
479
+ virtualScroll: !0,
480
+ ...pluginOptions.value.datatable as any,
481
+ ...attrs as any,
482
+ ...mainAttrs.value as any
483
+ }))
469
484
  defineOptions({
470
485
  name: 'MDatatable',
471
486
  inheritAttrs: !1
@@ -579,16 +594,7 @@ defineExpose({
579
594
  card-container-class="m-datatable-container"
580
595
  color="primary"
581
596
  table-class="m-datatable-container"
582
- v-bind="{
583
- virtualScroll: !0,
584
- ...pluginOptions.datatable as any,
585
- ...$attrs as any,
586
- title: getTableTitle,
587
- bordered: bordered === undefined ? pluginOptions.datatable?.bordered : bordered,
588
- dense: dense === undefined ? ( theme.inputs.dense !== undefined ? theme.inputs.dense : pluginOptions.datatable?.dense) : dense,
589
- flat: flat === undefined ? pluginOptions.datatable?.flat : flat,
590
- wrapCells: wrapCellsRef,
591
- } as any"
597
+ v-bind="bindAttr"
592
598
  @request="fetchDatatableItems"
593
599
  @update:selected="onUpdateSelectedItems"
594
600
  @virtual-scroll="endReach ? onScroll : undefined"
@@ -13,7 +13,9 @@ import { computed } from 'vue'
13
13
  type Props = QIconProps
14
14
  const noDefault = defineModel<boolean>('noDefault', { required: !1, default: !1 })
15
15
  const props = defineProps<Props>()
16
- const getSize = computed<Props['size']>(() => noDefault.value ? props.size : props.size || '100%')
16
+ const getSize = computed<any>(() => ({
17
+ size: noDefault.value ? props.size : (props.size || '100%')
18
+ }))
17
19
  defineOptions({
18
20
  name: 'MSarString',
19
21
  inheritAttrs: !1
@@ -21,7 +23,7 @@ defineOptions({
21
23
  </script>
22
24
 
23
25
  <template>
24
- <q-icon v-bind="{...$props,...$attrs,size: getSize} as any">
26
+ <q-icon v-bind="{...$props,...$attrs, ...getSize} as any">
25
27
  <slot name="default">
26
28
  <svg
27
29
  viewBox="0 0 1124.14 1256.39"