quasar-ui-danx 0.4.24 → 0.4.26
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +148 -145
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +1 -1
- package/dist/danx.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionTable/Form/Fields/SingleFileField.vue +14 -16
package/package.json
CHANGED
@@ -6,7 +6,9 @@
|
|
6
6
|
@drop.prevent="onDrop"
|
7
7
|
>
|
8
8
|
<FieldLabel
|
9
|
-
|
9
|
+
v-if="label || (name || showName)"
|
10
|
+
:label="label"
|
11
|
+
:name="name"
|
10
12
|
:show-name="showName"
|
11
13
|
class="text-sm font-semibold"
|
12
14
|
/>
|
@@ -35,7 +37,7 @@
|
|
35
37
|
v-if="!readonly || uploadedFile"
|
36
38
|
class="w-32 cursor-pointer mt-2"
|
37
39
|
:class="{'border border-dashed border-blue-600': !uploadedFile, 'mx-auto': !readonly}"
|
38
|
-
:file="uploadedFile"
|
40
|
+
:file="uploadedFile || undefined"
|
39
41
|
downloadable
|
40
42
|
@click="!disable && $refs.file.click()"
|
41
43
|
/>
|
@@ -48,26 +50,22 @@
|
|
48
50
|
</div>
|
49
51
|
</template>
|
50
52
|
|
51
|
-
<script setup>
|
53
|
+
<script setup lang="ts">
|
52
54
|
import { onMounted } from "vue";
|
53
55
|
import { useSingleFileUpload } from "../../../../helpers";
|
56
|
+
import { UploadedFile } from "../../../../types";
|
54
57
|
import { FilePreview } from "../../../Utility";
|
55
58
|
import FieldLabel from "./FieldLabel";
|
56
59
|
|
57
60
|
const emit = defineEmits(["update:model-value"]);
|
58
|
-
const props = defineProps
|
59
|
-
modelValue
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
},
|
67
|
-
showName: Boolean,
|
68
|
-
disable: Boolean,
|
69
|
-
readonly: Boolean
|
70
|
-
});
|
61
|
+
const props = defineProps<{
|
62
|
+
modelValue?: UploadedFile;
|
63
|
+
label?: string;
|
64
|
+
name?: string;
|
65
|
+
showName?: boolean;
|
66
|
+
disable?: boolean;
|
67
|
+
readonly?: boolean;
|
68
|
+
}>();
|
71
69
|
const { onComplete, onDrop, onFileSelected, uploadedFile, clearUploadedFile } = useSingleFileUpload();
|
72
70
|
onComplete(() => emit("update:model-value", uploadedFile.value));
|
73
71
|
|