后端接收ok

This commit is contained in:
2026-01-19 21:32:09 +08:00
parent 6396b79ac5
commit 6ecc3beaef
6 changed files with 169 additions and 23 deletions
@@ -24,7 +24,11 @@ const prop= defineProps({
maxFilesize:{
type: Number,
default: 10,
}
},
uploadURL:{
type: String,
default: "/api/files/upload",
},
});
// 初始化 Dropzone
@@ -41,7 +45,7 @@ const initDropzone = () => {
// 初始化新的实例
dropzoneInstance = new Dropzone(dropzoneElement.value, {
url: "/api/files/upload", // 上传地址
url: prop.uploadURL, // 上传地址
// headers: {
// user_cookie: "cccc",
// },
@@ -139,13 +139,14 @@ watch(locale, () => {
>{{ t("purchase_addorder.remarks") }}
<span class="form-label-description">0/100</span></label
>
<useDropzone></useDropzone>
<textarea
class="form-control mt-2"
class="form-control mt-2 mb-2"
name="example-textarea-input"
rows="6"
:placeholder="t('purchase_addorder.remarks_text')"
></textarea>
<useDropzone acceptedFiles="image/*" uploadURL="/api/files/upload/image" maxFiles="10"></useDropzone>
</div>
</div>