quasar-ui-danx 0.4.24 → 0.4.27
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
@@ -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
|
|
package/src/helpers/formats.ts
CHANGED
@@ -384,7 +384,6 @@ export function parseMarkdownCode(string: string): string {
|
|
384
384
|
* ie: a valid JSON string with a ```json prefix and ``` postfix
|
385
385
|
*/
|
386
386
|
export function fMarkdownCode(type: string, string: string | object): string {
|
387
|
-
console.log("formatting", type, string);
|
388
387
|
if (typeof string === "object" || isJSON(string)) {
|
389
388
|
switch (type) {
|
390
389
|
case "yaml":
|