This commit is contained in:
Viet An
2026-07-02 09:07:59 +07:00
parent 1fc8532ed8
commit e91f0d22c4
52 changed files with 131 additions and 159 deletions

View File

@@ -1,6 +1,4 @@
<script setup>
const { $buildFileUrl, $copyToClipboard } = useNuxtApp();
const props = defineProps({
className: String,
image: Object,
@@ -8,14 +6,12 @@ const props = defineProps({
downloadImage: Function,
openDeleteImageConfirm: Function,
});
const url = $buildFileUrl(props.image.file__file);
</script>
<template>
<div :class="['buttons has-addons', className]">
<button
class="button is-small is-white"
@click="$copyToClipboard(url)"
@click="$copyToClipboard($buildFileUrl(props.image.file__file))"
title="Sao chép link"
>
<span class="icon">

View File

@@ -38,7 +38,7 @@
/>
</template>
<script setup>
const { $copy, $getpath, $download } = useNuxtApp();
const { $copy, $getpath } = useNuxtApp();
const emit = defineEmits(["remove", "close"]);
const props = defineProps({
files: Object,

View File

@@ -13,7 +13,7 @@
class="file-input"
ref="file-input"
type="file"
:id="docid"
:id="$id()"
:multiple="multiple ?? true"
name="resume"
@change="doChange"
@@ -52,14 +52,13 @@ const props = defineProps({
});
const emit = defineEmits(["files"]);
const { $id, $snackbar, $upload } = useNuxtApp();
const { $snackbar, $upload } = useNuxtApp();
const fileInput = useTemplateRef("file-input");
const vtype = props.type || ["image"];
const files = ref(); // files selected in <input>
const dataFiles = ref(); // files returned by $upload
const showmodal = ref();
const docid = $id();
function getFileExtension(fileName) {
if (!fileName || typeof fileName !== "string") return "";

View File

@@ -10,7 +10,7 @@ const props = defineProps({
viewImage: Function,
});
const { $buildFileUrl, $formatFileSize, $getpath, $patchapi, $snackbar } = useNuxtApp();
const { $buildFileUrl, $getpath, $patchapi, $snackbar } = useNuxtApp();
const url = $buildFileUrl(props.image.file__file);

View File

@@ -201,9 +201,7 @@
/>
</template>
<script setup>
import { ref } from "vue";
import { debounce } from "es-toolkit";
import { useNuxtApp } from "#app";
import FileUpload from "~/components/media/FileUpload.vue";
import ImageCard from "~/components/media/ImageCard.vue";