【发布时间】:2019-08-28 12:04:48
【问题描述】:
我已经尽一切努力让它工作,但它还没有工作
我从 cdn 加载,就像在预览文档中一样
<!-- add to document <head> -->
<link href="https://unpkg.com/filepond/dist/filepond.css"
rel="stylesheet">
<link href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-
plugin-image-preview.css" rel="stylesheet">
<!-- add before </body> -->
<script src="https://unpkg.com/filepond-plugin-image-
preview/dist/filepond-plugin-image-preview.js"></script>
<script src="https://unpkg.com/filepond/dist/filepond.js"></script>
为了增强我的文件池元素
<script>
const inputElement = document.querySelector('input[type="file"]');
const pond = FilePond.create( inputElement );
</script>
最后
<input type="file">
它只是显示为一个文件,而不是图像预览。我错过了什么?
【问题讨论】:
-
请注意,为您的问题添加更多详细信息总是好的,以及您迄今为止使用代码尝试过的内容。
-
对不起,我已经编辑过了。
标签: filepond