Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-syan-image-picker
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
JIRA
JIRA
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
OpenSource
react-native-syan-image-picker
Commits
6dd4a738
Commit
6dd4a738
authored
Oct 12, 2018
by
Syan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.1.9
parent
37b14d5c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
index.js
index.js
+2
-1
RNSyanImagePicker.m
ios/RNSyanImagePicker.m
+6
-0
package.json
package.json
+1
-1
No files found.
index.js
View file @
6dd4a738
...
...
@@ -23,7 +23,8 @@ const defaultOptions = {
showCropGrid
:
false
,
// 是否隐藏裁剪区域网格,默认false
quality
:
90
,
// 压缩质量
enableBase64
:
false
,
// 是否返回base64编码,默认不返回
allowPickingOriginalPhoto
:
false
allowPickingOriginalPhoto
:
false
,
sortAscendingByModificationDate
:
true
// 对照片排序,按修改时间升序,默认是YES。如果设置为NO,最新的照片会显示在最前面,内部的拍照按钮会排在第一个
};
export
default
{
...
...
ios/RNSyanImagePicker.m
View file @
6dd4a738
...
...
@@ -99,6 +99,7 @@ RCT_EXPORT_METHOD(removeAllPhoto) {
BOOL
showCropCircle
=
[
self
.
cameraOptions
sy_boolForKey
:
@"showCropCircle"
];
BOOL
isRecordSelected
=
[
self
.
cameraOptions
sy_boolForKey
:
@"isRecordSelected"
];
BOOL
allowPickingOriginalPhoto
=
[
self
.
cameraOptions
sy_boolForKey
:
@"allowPickingOriginalPhoto"
];
BOOL
sortAscendingByModificationDate
=
[
self
.
cameraOptions
sy_boolForKey
:
@"sortAscendingByModificationDate"
];
NSInteger
CropW
=
[
self
.
cameraOptions
sy_integerForKey
:
@"CropW"
];
NSInteger
CropH
=
[
self
.
cameraOptions
sy_integerForKey
:
@"CropH"
];
NSInteger
circleCropRadius
=
[
self
.
cameraOptions
sy_integerForKey
:
@"circleCropRadius"
];
...
...
@@ -111,9 +112,14 @@ RCT_EXPORT_METHOD(removeAllPhoto) {
imagePickerVc
.
allowTakePicture
=
isCamera
;
// 允许用户在内部拍照
imagePickerVc
.
allowPickingVideo
=
NO
;
// 不允许视频
imagePickerVc
.
allowPickingOriginalPhoto
=
allowPickingOriginalPhoto
;
// 允许原图
imagePickerVc
.
sortAscendingByModificationDate
=
sortAscendingByModificationDate
;
imagePickerVc
.
alwaysEnableDoneBtn
=
YES
;
imagePickerVc
.
allowCrop
=
isCrop
;
// 裁剪
if
(
isRecordSelected
)
{
imagePickerVc
.
selectedAssets
=
self
.
selectedAssets
;
// 当前已选中的图片
}
if
(
imageCount
==
1
)
{
// 单选模式
imagePickerVc
.
showSelectBtn
=
NO
;
...
...
package.json
View file @
6dd4a738
{
"name"
:
"react-native-syan-image-picker"
,
"version"
:
"0.1.
8
"
,
"version"
:
"0.1.
9
"
,
"description"
:
"React-Native 多图片选择 支持裁剪 压缩"
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
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