Skip to content

Commit bf77d82

Browse files
committed
add new englsh document
1 parent 92b7547 commit bf77d82

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

site/client/components/doc/en/CropImage.vue

Whitespace-only changes.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<template>
2+
<div class="components">
3+
<h3>Upload multiple files</h3>
4+
<p>Set <code>multiple</code> equal <code>true</code>, and you could select more than one file. And your server will recieved an array of files.</p>
5+
<h4>multiple-size</h4>
6+
<p><code>multiple-size</code> is a number which limits your count of the files you selected.</p>
7+
<h4>演示</h4>
8+
<div class="center">
9+
<vue-core-image-upload
10+
:class="['btn', 'btn-primary']"
11+
:crop="false"
12+
@imageuploaded="imageUploded"
13+
:max-file-size="5242880"
14+
:multiple="true"
15+
:multiple-size="4"
16+
url="http://101.198.151.190/api/upload2.php" >
17+
</vue-core-image-upload>
18+
</div>
19+
<table class="m-table bordered">
20+
<thead>
21+
<tr>
22+
<th>File Name</th>
23+
<th>File Size</th>
24+
</tr>
25+
</thead>
26+
<tbody>
27+
<tr v-for="item in fileList" :key="item.name">
28+
<td>{{item.name}}</td>
29+
<td>{{item.size}}</td>
30+
</tr>
31+
</tbody>
32+
</table>
33+
<p>Click the button and you will see the file name and size above the table</p>
34+
<h4>Code Example</h4>
35+
<pre v-highlightjs><code class="javascript">&lt;vue-core-image-upload
36+
:class="['btn', 'btn-primary']"
37+
:crop="false"
38+
@imageuploaded="imageUploded"
39+
:max-file-size="5242880"
40+
:multiple="true"
41+
:multiple-size="4"
42+
url="http://101.198.151.190/api/upload2.php" &gt;
43+
&lt;/vue-core-image-upload&gt;</code></pre>
44+
<a href="">View code source</a>
45+
</div>
46+
</template>
47+
48+
<script>
49+
import VueCoreImageUpload from '../../../../src/vue-core-image-upload.vue'
50+
export default {
51+
components: {
52+
VueCoreImageUpload,
53+
},
54+
data() {
55+
return {
56+
fileList: [],
57+
}
58+
},
59+
60+
methods: {
61+
imageUploded(res) {
62+
if(res.errcode == 0) {
63+
this.fileList = res.data;
64+
}
65+
}
66+
}
67+
68+
};
69+
70+
</script>

site/client/router/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import CnEvents from '../components/doc/cn/Events.vue';
1010
import EnEvents from '../components/doc/en/Events.vue';
1111
import CnCropImage from '../components/doc/cn/CropImage.vue';
1212
import CnMultipleFile from '../components/doc/cn/MultipleFile.vue';
13+
import EnMultipleFile from '../components/doc/en/MultipleFile.vue';
1314
import CnCompressImage from '../components/doc/cn/CompressImage.vue';
1415
import CnPostData from '../components/doc/cn/PostData.vue';
1516
import EnPostData from '../components/doc/en/PostData.vue';
@@ -66,6 +67,10 @@ export default new Router({
6667
path: '/cn/multiple-file',
6768
component: CnMultipleFile
6869
},
70+
{
71+
path: '/en/multiple-file',
72+
component: EnMultipleFile
73+
},
6974
{
7075
path: '/cn/compress-image',
7176
component: CnCompressImage,

0 commit comments

Comments
 (0)