|
@@ -135,6 +135,9 @@ import {
|
|
|
|
|
|
// 组件参数 - 保持不变
|
|
// 组件参数 - 保持不变
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
|
+ deviceId:{
|
|
|
|
+ type: String,
|
|
|
|
+ },
|
|
allowFolderUpload: {
|
|
allowFolderUpload: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
default: true
|
|
default: true
|
|
@@ -378,6 +381,7 @@ const startUpload = async () => {
|
|
// 发送请求
|
|
// 发送请求
|
|
xhr.open('POST', props.uploadUrl, true);
|
|
xhr.open('POST', props.uploadUrl, true);
|
|
xhr.setRequestHeader('tenant-id', 1);
|
|
xhr.setRequestHeader('tenant-id', 1);
|
|
|
|
+ xhr.setRequestHeader('device-id', props.deviceId);
|
|
xhr.send(formData);
|
|
xhr.send(formData);
|
|
|
|
|
|
} catch (error) {
|
|
} catch (error) {
|