Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
2c9e6edd
Commit
2c9e6edd
authored
May 20, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拍照组件文档补充
parent
02a38e38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
readme.md
src/components/take/readme.md
+8
-1
No files found.
src/components/take/readme.md
View file @
2c9e6edd
...
...
@@ -17,7 +17,7 @@ uni.hideTabBar()
### Props
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| :-: | :-: | :-: | :-: | :-: |
| up
date
| Boolean | true | true/false | 是否默认上传 true:会自动上传好图片并返回绝对路径 false: 只返回临时路径,需要在父组件做上传动作 |
| up
load
| Boolean | true | true/false | 是否默认上传 true:会自动上传好图片并返回绝对路径 false: 只返回临时路径,需要在父组件做上传动作 |
| num | Number | 10 | 1-10 | 拍照数量,只能传1-10的正整数 |
| currentItem | Object | - | - | 对应的规范数据,用于获取示意图和水印,以及保存图片所需的ID
**格式见下文**
|
...
...
@@ -67,10 +67,12 @@ uni.hideTabBar()
```
javascript
import
takePhoto
from
'@/components/take/index.vue'
import
baseFile
from
'@/components/upload/index'
// upload为false时需加上
export
default
{
components
:
{
'take-photo'
:
takePhoto
},
mixins
:
[
baseFile
],
// upload为false时需加上
data
()
{
return
{
takeStatus
:
false
,
...
...
@@ -86,6 +88,11 @@ export default {
// 拍照完成或关闭相机
closeTake
(
images
)
{
this
.
takeStatus
=
false
// upload为false时处理
const
files
=
images
.
map
(
v
=>
v
.
path
)
const
value
=
await
this
.
saveToTask
(
files
)
console
.
log
(
"value"
,
value
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment