mirror of https://github.com/ElemeFE/element
Docs: rename variable in Upload docs (#14593)
parent
ad8612429a
commit
3340c8a7f1
|
@ -163,7 +163,7 @@ Use `list-type` to change the fileList style.
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:file-list="fileList2"
|
:file-list="fileList"
|
||||||
list-type="picture">
|
list-type="picture">
|
||||||
<el-button size="small" type="primary">Click to upload</el-button>
|
<el-button size="small" type="primary">Click to upload</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">jpg/png files with a size less than 500kb</div>
|
<div slot="tip" class="el-upload__tip">jpg/png files with a size less than 500kb</div>
|
||||||
|
@ -172,7 +172,7 @@ Use `list-type` to change the fileList style.
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList2: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -198,7 +198,7 @@ Use `on-change` hook function to control upload file list
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-change="handleChange"
|
:on-change="handleChange"
|
||||||
:file-list="fileList3">
|
:file-list="fileList">
|
||||||
<el-button size="small" type="primary">Click to upload</el-button>
|
<el-button size="small" type="primary">Click to upload</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">jpg/png files with a size less than 500kb</div>
|
<div slot="tip" class="el-upload__tip">jpg/png files with a size less than 500kb</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -206,7 +206,7 @@ Use `on-change` hook function to control upload file list
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList3: [{
|
fileList: [{
|
||||||
name: 'food.jpeg',
|
name: 'food.jpeg',
|
||||||
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
||||||
}, {
|
}, {
|
||||||
|
@ -217,7 +217,7 @@ Use `on-change` hook function to control upload file list
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(file, fileList) {
|
handleChange(file, fileList) {
|
||||||
this.fileList3 = fileList.slice(-3);
|
this.fileList = fileList.slice(-3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ Utilice la propiedad `list-type` para cambiar el estilo a un listado de archivos
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:file-list="fileList2"
|
:file-list="fileList"
|
||||||
list-type="picture">
|
list-type="picture">
|
||||||
<el-button size="small" type="primary">Clic para subir archivo</el-button>
|
<el-button size="small" type="primary">Clic para subir archivo</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">Solo archivos jpg/png con un tamaño menor de 500kb</div>
|
<div slot="tip" class="el-upload__tip">Solo archivos jpg/png con un tamaño menor de 500kb</div>
|
||||||
|
@ -168,7 +168,7 @@ Utilice la propiedad `list-type` para cambiar el estilo a un listado de archivos
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList2: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -194,7 +194,7 @@ Utilice el _hook_ `on-change` para controlar la funcionalidad de la lista de arc
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-change="handleChange"
|
:on-change="handleChange"
|
||||||
:file-list="fileList3">
|
:file-list="fileList">
|
||||||
<el-button size="small" type="primary">Clic para subir archivo</el-button>
|
<el-button size="small" type="primary">Clic para subir archivo</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">Solo archivos jpg/png con un tamaño menor de 500kb</div>
|
<div slot="tip" class="el-upload__tip">Solo archivos jpg/png con un tamaño menor de 500kb</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -202,7 +202,7 @@ Utilice el _hook_ `on-change` para controlar la funcionalidad de la lista de arc
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList3: [{
|
fileList: [{
|
||||||
name: 'food.jpeg',
|
name: 'food.jpeg',
|
||||||
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
||||||
}, {
|
}, {
|
||||||
|
@ -213,7 +213,7 @@ Utilice el _hook_ `on-change` para controlar la funcionalidad de la lista de arc
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(file, fileList) {
|
handleChange(file, fileList) {
|
||||||
this.fileList3 = fileList.slice(-3);
|
this.fileList = fileList.slice(-3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ Utilisez `list-type` pour changer le style de la liste de fichiers.
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:file-list="fileList2"
|
:file-list="fileList"
|
||||||
list-type="picture">
|
list-type="picture">
|
||||||
<el-button size="small" type="primary">Cliquer pour envoyer</el-button>
|
<el-button size="small" type="primary">Cliquer pour envoyer</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">Fichiers jpg/png avec une taille inférieure à 500kb</div>
|
<div slot="tip" class="el-upload__tip">Fichiers jpg/png avec une taille inférieure à 500kb</div>
|
||||||
|
@ -172,7 +172,7 @@ Utilisez `list-type` pour changer le style de la liste de fichiers.
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList2: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -198,7 +198,7 @@ Utilisez `on-change` pour contrôler le comportement de la liste de fichiers.
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-change="handleChange"
|
:on-change="handleChange"
|
||||||
:file-list="fileList3">
|
:file-list="fileList">
|
||||||
<el-button size="small" type="primary">Cliquer pour envoyer</el-button>
|
<el-button size="small" type="primary">Cliquer pour envoyer</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">Fichiers jpg/png avec une taille inférieure à 500kb</div>
|
<div slot="tip" class="el-upload__tip">Fichiers jpg/png avec une taille inférieure à 500kb</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -206,7 +206,7 @@ Utilisez `on-change` pour contrôler le comportement de la liste de fichiers.
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList3: [{
|
fileList: [{
|
||||||
name: 'food.jpeg',
|
name: 'food.jpeg',
|
||||||
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
||||||
}, {
|
}, {
|
||||||
|
@ -217,7 +217,7 @@ Utilisez `on-change` pour contrôler le comportement de la liste de fichiers.
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(file, fileList) {
|
handleChange(file, fileList) {
|
||||||
this.fileList3 = fileList.slice(-3);
|
this.fileList = fileList.slice(-3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:file-list="fileList2"
|
:file-list="fileList"
|
||||||
list-type="picture">
|
list-type="picture">
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList2: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
action="https://jsonplaceholder.typicode.com/posts/"
|
||||||
:on-change="handleChange"
|
:on-change="handleChange"
|
||||||
:file-list="fileList3">
|
:file-list="fileList">
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList3: [{
|
fileList: [{
|
||||||
name: 'food.jpeg',
|
name: 'food.jpeg',
|
||||||
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
|
||||||
}, {
|
}, {
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(file, fileList) {
|
handleChange(file, fileList) {
|
||||||
this.fileList3 = fileList.slice(-3);
|
this.fileList = fileList.slice(-3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue