|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-upload
|
|
<el-upload
|
|
|
|
|
+ :id="uploaderId"
|
|
|
drag
|
|
drag
|
|
|
multiple
|
|
multiple
|
|
|
:action="actionUrl"
|
|
:action="actionUrl"
|
|
@@ -33,6 +34,10 @@ import store from "../store/index";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
props: {
|
|
props: {
|
|
|
|
|
+ uploaderId: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: "uploader",
|
|
|
|
|
+ },
|
|
|
limit: {
|
|
limit: {
|
|
|
type: Number,
|
|
type: Number,
|
|
|
default: 100,
|
|
default: 100,
|
|
@@ -76,6 +81,9 @@ export default defineComponent({
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
function changeDragVisable(boo) {
|
|
function changeDragVisable(boo) {
|
|
|
|
|
+ let d = document.getElementById(props.uploaderId);
|
|
|
|
|
+ d.childNodes[1].style.display = boo ? "inline-block" : "none";
|
|
|
|
|
+ return;
|
|
|
let a = document.getElementsByClassName("el-upload-dragger");
|
|
let a = document.getElementsByClassName("el-upload-dragger");
|
|
|
let b = document.getElementsByClassName("el-upload--picture-card");
|
|
let b = document.getElementsByClassName("el-upload--picture-card");
|
|
|
for (let i of a) {
|
|
for (let i of a) {
|