Skip to content

Commit eed8704

Browse files
committed
add new vue
1 parent bebac3c commit eed8704

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<template>
2+
<div class="components">
3+
<h3>向服务端发送数据</h3>
4+
<p>你可以设置<code>data</code> 来将一些附带的数据发送给服务端。</p>
5+
<h4>Exmaple:</h4>
6+
<p>下面会将输入框的内容一并发送过去</p>
7+
<div class="m-form">
8+
<input type="text" v-model="data.text" placeholder="输入一些内容吧" class="form-control text" />
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/upload.php" >
17+
</vue-core-image-upload>
18+
</div>
19+
</div>
20+
</template>
21+
<style>
22+
.form-control{
23+
display: block;
24+
margin: 20px 0;
25+
padding: 5px 20px;
26+
}
27+
</style>
28+
29+
30+
<script>
31+
import VueCoreImageUpload from '../../../../src/vue-core-image-upload.vue'
32+
export default {
33+
components: {
34+
VueCoreImageUpload,
35+
},
36+
37+
data() {
38+
return {
39+
data: {
40+
text: ''
41+
}
42+
}
43+
}
44+
45+
};
46+
47+
</script>

site/client/router/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import EnEvents from '../components/doc/en/Events.vue';
99
import CnCropImage from '../components/doc/cn/CropImage.vue';
1010
import CnMultipleFile from '../components/doc/cn/MultipleFile.vue';
1111
import CnCompressImage from '../components/doc/cn/CompressImage.vue';
12+
import CnPostData from '../components/doc/cn/PostData.vue';
1213
import CnOthers from '../components/doc/cn/Others.vue';
1314

1415
Vue.use(Router)
@@ -57,6 +58,10 @@ export default new Router({
5758
path: '/cn/compress-image',
5859
component: CnCompressImage,
5960
},
61+
{
62+
path: '/cn/post-data',
63+
component: CnPostData
64+
},
6065
{
6166
path: '/cn/others',
6267
component: CnOthers,

0 commit comments

Comments
 (0)