Docs: rename variable in Upload docs (#14593)

pull/14602/head
刘鹏龙 2019-03-06 14:26:17 +08:00 committed by hetech
parent ad8612429a
commit 3340c8a7f1
4 changed files with 20 additions and 20 deletions

View File

@ -163,7 +163,7 @@ Use `list-type` to change the fileList style.
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList2"
:file-list="fileList"
list-type="picture">
<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>
@ -172,7 +172,7 @@ Use `list-type` to change the fileList style.
export default {
data() {
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: {
@ -198,7 +198,7 @@ Use `on-change` hook function to control upload file list
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-change="handleChange"
:file-list="fileList3">
:file-list="fileList">
<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>
</el-upload>
@ -206,7 +206,7 @@ Use `on-change` hook function to control upload file list
export default {
data() {
return {
fileList3: [{
fileList: [{
name: 'food.jpeg',
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: {
handleChange(file, fileList) {
this.fileList3 = fileList.slice(-3);
this.fileList = fileList.slice(-3);
}
}
}

View File

@ -159,7 +159,7 @@ Utilice la propiedad `list-type` para cambiar el estilo a un listado de archivos
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList2"
:file-list="fileList"
list-type="picture">
<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>
@ -168,7 +168,7 @@ Utilice la propiedad `list-type` para cambiar el estilo a un listado de archivos
export default {
data() {
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: {
@ -194,7 +194,7 @@ Utilice el _hook_ `on-change` para controlar la funcionalidad de la lista de arc
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-change="handleChange"
:file-list="fileList3">
:file-list="fileList">
<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>
</el-upload>
@ -202,7 +202,7 @@ Utilice el _hook_ `on-change` para controlar la funcionalidad de la lista de arc
export default {
data() {
return {
fileList3: [{
fileList: [{
name: 'food.jpeg',
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: {
handleChange(file, fileList) {
this.fileList3 = fileList.slice(-3);
this.fileList = fileList.slice(-3);
}
}
}

View File

@ -163,7 +163,7 @@ Utilisez `list-type` pour changer le style de la liste de fichiers.
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList2"
:file-list="fileList"
list-type="picture">
<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>
@ -172,7 +172,7 @@ Utilisez `list-type` pour changer le style de la liste de fichiers.
export default {
data() {
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: {
@ -198,7 +198,7 @@ Utilisez `on-change` pour contrôler le comportement de la liste de fichiers.
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-change="handleChange"
:file-list="fileList3">
:file-list="fileList">
<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>
</el-upload>
@ -206,7 +206,7 @@ Utilisez `on-change` pour contrôler le comportement de la liste de fichiers.
export default {
data() {
return {
fileList3: [{
fileList: [{
name: 'food.jpeg',
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: {
handleChange(file, fileList) {
this.fileList3 = fileList.slice(-3);
this.fileList = fileList.slice(-3);
}
}
}

View File

@ -163,7 +163,7 @@
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList2"
:file-list="fileList"
list-type="picture">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>
@ -172,7 +172,7 @@
export default {
data() {
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: {
@ -198,7 +198,7 @@
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-change="handleChange"
:file-list="fileList3">
:file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>
</el-upload>
@ -206,7 +206,7 @@
export default {
data() {
return {
fileList3: [{
fileList: [{
name: 'food.jpeg',
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
}, {
@ -217,7 +217,7 @@
},
methods: {
handleChange(file, fileList) {
this.fileList3 = fileList.slice(-3);
this.fileList = fileList.slice(-3);
}
}
}