File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
site/client/components/doc Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" components" >
3
3
<h3 >向服务端发送数据</h3 >
4
- <p >你可以设置<code >data</code > 来将一些附带的数据发送给服务端。</p >
4
+ <p >你可以设置<code >data</code > 来将一些附带的数据发送给服务端。
5
+ 当然你也可以将一些数据包含在 header 中传递过去,你只需要绑定到 <code >header</code >即可。</p >
5
6
<h4 >Exmaple:</h4 >
6
7
<p >下面会将输入框的内容一并发送过去</p >
7
8
<div class =" m-form" >
@@ -52,6 +53,7 @@ export default {
52
53
};
53
54
< ; /script> ;
54
55
</code ></pre >
56
+ <p class =" warnning" >你可以设置 <code >isXhr</code > 来取消向服务端上传。</p >
55
57
<a href =" " >查看完整源码</a >
56
58
</div >
57
59
</template >
@@ -81,7 +83,6 @@ export default {
81
83
82
84
methods: {
83
85
imageuploaded (res ) {
84
-
85
86
}
86
87
}
87
88
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" components" >
3
3
<h3 >Send Data to Server</h3 >
4
- <p >Setting <code >data</code > attribute will send some data you bind to the server via ajax</p >
4
+ <p >Setting <code >data</code > attribute will send some data you bind to the server via ajax.
5
+ Of course you could pass data to server via header, just pass data to <code >header</code >. </p >
5
6
<h4 >Exmaple:</h4 >
6
7
<p >You could type some text here and its text will be sended to the server when you upload your image.</p >
7
8
<div class =" m-form" >
@@ -52,6 +53,7 @@ export default {
52
53
};
53
54
< ; /script> ;
54
55
</code ></pre >
56
+ <p class =" warnning" >Set <code >isXhr</code > equal false to cancel default ajax uploading.</p >
55
57
<a href =" " >View code source</a >
56
58
</div >
57
59
</template >
You can’t perform that action at this time.
0 commit comments