@mythpe/quasar-ui-qui 0.1.27 → 0.1.29
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
|
@@ -333,7 +333,7 @@ defineOptions({
|
|
|
333
333
|
:disable="disable"
|
|
334
334
|
:factory="startUpload"
|
|
335
335
|
:field-name="fieldName"
|
|
336
|
-
:label="__(label)"
|
|
336
|
+
:label="label !== undefined ? __(label):label"
|
|
337
337
|
:readonly="readonly"
|
|
338
338
|
style="width: 100%;max-height: 450px;"
|
|
339
339
|
v-bind="{...pluginOptions.uploader as any,...$attrs}"
|
|
@@ -347,56 +347,67 @@ defineOptions({
|
|
|
347
347
|
v-if="scope.isUploading"
|
|
348
348
|
class="q-uploader__spinner"
|
|
349
349
|
/>
|
|
350
|
-
<div
|
|
351
|
-
|
|
350
|
+
<div
|
|
351
|
+
v-if="label || !readonly"
|
|
352
|
+
class="col"
|
|
353
|
+
>
|
|
354
|
+
<div
|
|
355
|
+
v-if="!!label"
|
|
356
|
+
class="q-uploader__title"
|
|
357
|
+
>
|
|
352
358
|
{{ __(label) }}
|
|
353
359
|
</div>
|
|
354
|
-
<div
|
|
360
|
+
<div
|
|
361
|
+
v-if="!readonly"
|
|
362
|
+
class="q-uploader__subtitle"
|
|
363
|
+
>
|
|
355
364
|
{{ scope.uploadSizeLabel }} / {{ scope.uploadProgressLabel }}
|
|
356
365
|
</div>
|
|
357
366
|
</div>
|
|
358
|
-
<
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
367
|
+
<template v-if="!readonly">
|
|
368
|
+
<q-btn
|
|
369
|
+
v-if="scope.queuedFiles.length > 0"
|
|
370
|
+
:icon="removeQueuedIcon"
|
|
371
|
+
:label="__('myth.uploader.clearAll')"
|
|
372
|
+
dense
|
|
373
|
+
flat
|
|
374
|
+
@click="scope.removeQueuedFiles"
|
|
375
|
+
/>
|
|
376
|
+
<q-btn
|
|
377
|
+
v-if="scope.uploadedFiles.length > 0"
|
|
378
|
+
:icon="removeUploadedIcon"
|
|
379
|
+
:label="__('myth.uploader.removeUploadedFiles')"
|
|
380
|
+
dense
|
|
381
|
+
flat
|
|
382
|
+
@click="scope.removeUploadedFiles"
|
|
383
|
+
/>
|
|
384
|
+
<q-btn
|
|
385
|
+
v-if="scope.canAddFiles && !hideUploadBtn"
|
|
386
|
+
:icon="pickFilesIcon"
|
|
387
|
+
:label="__('myth.uploader.pickFiles')"
|
|
388
|
+
dense
|
|
389
|
+
flat
|
|
390
|
+
@click="scope.pickFiles"
|
|
391
|
+
>
|
|
392
|
+
<q-uploader-add-trigger />
|
|
393
|
+
</q-btn>
|
|
394
|
+
<q-btn
|
|
395
|
+
v-if="scope.canUpload && !hideUploadBtn"
|
|
396
|
+
:icon="uploadFilesIcon"
|
|
397
|
+
:label="__('myth.uploader.uploadFiles')"
|
|
398
|
+
dense
|
|
399
|
+
flat
|
|
400
|
+
@click="scope.upload"
|
|
401
|
+
/>
|
|
402
|
+
<q-btn
|
|
403
|
+
v-if="scope.isUploading"
|
|
404
|
+
:icon="abortUploadIcon"
|
|
405
|
+
:label="__('myth.uploader.abortUpload')"
|
|
406
|
+
dense
|
|
407
|
+
flat
|
|
408
|
+
@click="scope.abort"
|
|
409
|
+
/>
|
|
410
|
+
</template>
|
|
400
411
|
</MRow>
|
|
401
412
|
<slot
|
|
402
413
|
name="header"
|
|
@@ -102,7 +102,11 @@ export const useMyth = () => {
|
|
|
102
102
|
const parents: string[] = routeName.split('.')
|
|
103
103
|
if (parents.length > 1) {
|
|
104
104
|
const e = `choice.${Str.pascalCase(lodash.pluralize(parents[parents.length - 2]))}`
|
|
105
|
-
|
|
105
|
+
if (te(e)) {
|
|
106
|
+
str = t(k, { name: t(e, '1') })
|
|
107
|
+
} else {
|
|
108
|
+
str = te(k) ? t(k, { name: '' }) : null
|
|
109
|
+
}
|
|
106
110
|
} else {
|
|
107
111
|
str = te(k) ? t(k, { name: '' }) : null
|
|
108
112
|
}
|