@mythpe/quasar-ui-qui 0.3.70 → 0.3.72
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
|
@@ -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"
|
|
@@ -233,21 +233,23 @@ defineOptions({
|
|
|
233
233
|
>
|
|
234
234
|
<MColumn :class="contentClass">
|
|
235
235
|
<slot name="top" />
|
|
236
|
-
<
|
|
237
|
-
|
|
236
|
+
<MTransition
|
|
237
|
+
in="fadeIn"
|
|
238
|
+
out="fadeOut"
|
|
239
|
+
>
|
|
240
|
+
<MRow
|
|
238
241
|
v-if="label !== undefined"
|
|
239
242
|
key="label"
|
|
240
|
-
class="
|
|
243
|
+
class="items-center q-mb-md"
|
|
241
244
|
>
|
|
242
245
|
<q-skeleton
|
|
243
246
|
v-if="loading"
|
|
244
|
-
class="q-mb-md"
|
|
245
247
|
height="22px"
|
|
246
248
|
width="80px"
|
|
247
249
|
/>
|
|
248
250
|
<div
|
|
249
251
|
v-else
|
|
250
|
-
:class="`text-h6 q-px-sm rounded-borders
|
|
252
|
+
:class="`text-h6 q-px-sm rounded-borders ${!!errorMessage ? 'text-negative' : ''}`"
|
|
251
253
|
>
|
|
252
254
|
{{ label ? __(label) : label }}
|
|
253
255
|
<span
|
|
@@ -260,20 +262,25 @@ defineOptions({
|
|
|
260
262
|
:text="help"
|
|
261
263
|
tooltip
|
|
262
264
|
/>
|
|
263
|
-
</
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
v-if="hint !== undefined && !loading"
|
|
267
|
-
key="hint"
|
|
268
|
-
class="m-input__hint"
|
|
269
|
-
v-bind="hintProps"
|
|
270
|
-
>
|
|
271
|
-
<span>{{ hint ? __(hint) : hint }}</span>
|
|
272
|
-
</div>
|
|
273
|
-
</slot>
|
|
265
|
+
</MRow>
|
|
266
|
+
</MTransition>
|
|
267
|
+
<slot name="hint">
|
|
274
268
|
<div
|
|
275
|
-
|
|
276
|
-
|
|
269
|
+
v-if="hint !== undefined && !loading"
|
|
270
|
+
key="hint"
|
|
271
|
+
class="m-input__hint q-mb-md"
|
|
272
|
+
v-bind="hintProps"
|
|
273
|
+
>
|
|
274
|
+
<span>{{ hint ? __(hint) : hint }}</span>
|
|
275
|
+
</div>
|
|
276
|
+
</slot>
|
|
277
|
+
<div
|
|
278
|
+
key="avatar"
|
|
279
|
+
:class="['rounded-borders q-mb-md',{'q-pa-xs': !!errorMessage}]"
|
|
280
|
+
>
|
|
281
|
+
<MTransition
|
|
282
|
+
in="fadeIn"
|
|
283
|
+
out="fadeOut"
|
|
277
284
|
>
|
|
278
285
|
<q-skeleton
|
|
279
286
|
v-if="loading"
|
|
@@ -281,7 +288,7 @@ defineOptions({
|
|
|
281
288
|
type="QAvatar"
|
|
282
289
|
/>
|
|
283
290
|
<q-avatar
|
|
284
|
-
v-if="!loading"
|
|
291
|
+
v-else-if="!loading"
|
|
285
292
|
:color="errorMessage ? 'negative' : ((!isLoaded || !hasSrc || isFile || isFileNotImage) ? emptyColor : undefined)"
|
|
286
293
|
:icon="isFileNotImage && !url ? 'o_description' : undefined"
|
|
287
294
|
:rounded="rounded"
|
|
@@ -309,21 +316,29 @@ defineOptions({
|
|
|
309
316
|
v-text="getAvatarText"
|
|
310
317
|
/>
|
|
311
318
|
</q-avatar>
|
|
312
|
-
</
|
|
319
|
+
</MTransition>
|
|
320
|
+
</div>
|
|
321
|
+
<MTransitionGroup
|
|
322
|
+
in="fadeIn"
|
|
323
|
+
out="fadeOut"
|
|
324
|
+
>
|
|
313
325
|
<div
|
|
314
326
|
v-if="!readonly"
|
|
315
327
|
key="btn"
|
|
316
|
-
class="q-
|
|
328
|
+
class="q-mb-md"
|
|
317
329
|
>
|
|
318
|
-
<
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
330
|
+
<MTransition
|
|
331
|
+
in="fadeIn"
|
|
332
|
+
out="fadeOut"
|
|
333
|
+
>
|
|
334
|
+
<q-skeleton
|
|
335
|
+
v-if="loading"
|
|
336
|
+
type="QBtn"
|
|
337
|
+
/>
|
|
323
338
|
<div
|
|
324
|
-
v-if="!loading && !!modelValue"
|
|
339
|
+
v-else-if="!loading && !!modelValue"
|
|
325
340
|
key="uploaded-text"
|
|
326
|
-
class="text-center q-mb-
|
|
341
|
+
class="text-center q-mb-md text-positive"
|
|
327
342
|
>
|
|
328
343
|
<q-icon name="ion-checkmark" />
|
|
329
344
|
{{ __('labels.uploaded') }}
|
|
@@ -347,18 +362,18 @@ defineOptions({
|
|
|
347
362
|
>
|
|
348
363
|
<span class="text-body2 text-negative">{{ errorMessage }}</span>
|
|
349
364
|
</div>
|
|
350
|
-
<div
|
|
351
|
-
v-if="isFileNotImage && url"
|
|
352
|
-
key="btn-download"
|
|
353
|
-
class="q-mt-lg"
|
|
354
|
-
>
|
|
355
|
-
<MBtn
|
|
356
|
-
icon="ion-cloud-download"
|
|
357
|
-
label="labels.download"
|
|
358
|
-
@click="openWindow(url)"
|
|
359
|
-
/>
|
|
360
|
-
</div>
|
|
361
365
|
</MTransitionGroup>
|
|
366
|
+
<div
|
|
367
|
+
v-if="isFileNotImage && url"
|
|
368
|
+
key="btn-download"
|
|
369
|
+
class="q-mb-md"
|
|
370
|
+
>
|
|
371
|
+
<MBtn
|
|
372
|
+
icon="ion-cloud-download"
|
|
373
|
+
label="labels.download"
|
|
374
|
+
@click="openWindow(url)"
|
|
375
|
+
/>
|
|
376
|
+
</div>
|
|
362
377
|
<slot name="caption">
|
|
363
378
|
<div
|
|
364
379
|
v-if="!!caption"
|
|
@@ -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<
|
|
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,
|
|
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"
|