This commit is contained in:
2025-12-15 14:07:09 +07:00
parent e703314c7f
commit b4b7a452fc
3 changed files with 278 additions and 92 deletions

View File

@@ -1,3 +1,10 @@
<!-- plugin upload image -->
<link href="https://unpkg.com/filepond/dist/filepond.min.css" rel="stylesheet" />
<link href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css"
rel="stylesheet" />
<script src="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.js"></script>
<script src="https://unpkg.com/filepond/dist/filepond.min.js"></script>
<script>
const initCustomerAcquisitionChart = () => {
const chartOptions = {
@@ -389,4 +396,13 @@
initAdminHomeTab()
})
// Quan trọng: đăng ký plugin
FilePond.registerPlugin(FilePondPluginImagePreview);
FilePond.create(document.querySelector("#uploadfile-support"), {
credits: false,
allowImageCrop: false,
allowImagePreview: false,
allowMultiple: true,
labelIdle: 'Kéo thả file hoặc <span class="filepond--label-action">Chọn file</span>',
})
</script>