File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import EnEvents from '../components/doc/en/Events.vue';
9
9
import CnCropImage from '../components/doc/cn/CropImage.vue' ;
10
10
import CnMultipleFile from '../components/doc/cn/MultipleFile.vue' ;
11
11
import CnCompressImage from '../components/doc/cn/CompressImage.vue' ;
12
+ import CnPostData from '../components/doc/cn/PostData.vue' ;
12
13
import CnOthers from '../components/doc/cn/Others.vue' ;
13
14
14
15
Vue . use ( Router )
@@ -57,6 +58,10 @@ export default new Router({
57
58
path : '/cn/compress-image' ,
58
59
component : CnCompressImage ,
59
60
} ,
61
+ {
62
+ path : '/cn/post-data' ,
63
+ component : CnPostData
64
+ } ,
60
65
{
61
66
path : '/cn/others' ,
62
67
component : CnOthers ,
You can’t perform that action at this time.
0 commit comments