提交 1a22fee5 编写于 作者: 雪洛's avatar 雪洛

docs: 样式调整

上级 0fd5ec83
......@@ -11,4 +11,4 @@
云函数修改后,需上传到云端,方可生效。
更多云函数介绍参考[规范](../cf-functions)
\ No newline at end of file
更多云函数介绍参考[规范](uniCloud/cf-functions)
\ No newline at end of file
......@@ -9,4 +9,4 @@
|行 row |记录 record / doc|
|列 column |字段 field |
更多云数据库介绍参考[规范](../cf-database)
\ No newline at end of file
更多云数据库介绍参考[规范](uniCloud/cf-database)
\ No newline at end of file
......@@ -12,7 +12,7 @@
|参数名 |类型 |必填 |默认值 |说明 |平台差异说明 |
|:-: |:-: |:-: |:-: |:-: |:-: |
|filePath |String |是 |- |要上传的文件对象 | |
|filePath |String |是 |- |要上传的文件对象 |- |
<!-- |cloudPath |String |是 |- |文件的绝对路径,包含文件名 |仅腾讯云侧支持 | -->
<!-- |onUploadProgress |Function |否 |- |上传进度回调 |仅腾讯云侧支持 | -->
......@@ -32,6 +32,17 @@
#### 示例代码
<!--
cloudPath: 'test-admin.jpeg',
filePath: filePath,
onUploadProgress: function(progressEvent) {
console.log(progressEvent);
var percentCompleted = Math.round(
(progressEvent.loaded * 100) / progressEvent.total
);
}
-->
```javascript
uni.chooseImage({
count: 1,
......@@ -43,25 +54,12 @@ uni.chooseImage({
// promise
const result = await uniClient.uploadFile({
cloudPath: 'test-admin.jpeg',
filePath: filePath,
onUploadProgress: function(progressEvent) {
console.log(progressEvent);
var percentCompleted = Math.round(
(progressEvent.loaded * 100) / progressEvent.total
);
}
filePath: filePath
});
// callback
uniClient.uploadFile({
cloudPath: 'test-admin.jpeg',
filePath: filePath,
onUploadProgress: function(progressEvent) {
console.log(progressEvent);
var percentCompleted = Math.round(
(progressEvent.loaded * 100) / progressEvent.total
);
filePath: filePath
},
success() {},
fail() {},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册