
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
weex-plugin-image-picker
Advanced tools
方便易用的相册多选框架,针对android、ios、web(后续新增)平台下的图片选择器,支持从相册或拍照选择图片,支持动态权限获取、裁剪(单图裁剪)、压缩等功能、适配android 6.0+,ios8+ 系统的开源图片选择框架。
支持的WeexSDK版本: >= 0.16.0
weex plugin add weex-plugin-image-picker
###使用方法
weex plugin add weex-plugin-image-picker
pod 'WeexImagePicker'
weexpack plugin add weex-plugin-image-picker
compile 'org.weex.plugin:imagepicker:{$version}'
npm install image-picker
image-picker:{$version}'
第二步:
代码中调用
chooseImage: function() { //选择图片
let that = this;
plugin.chooseImage({
maxSelectCount: 10, //最大选择数 默认9张,最小 1
allowSelectGif: true, //是否允许选择Gif,只是控制是否选择,并不控制是否显示,如果为NO,则不显示gif标识 默认true
// sourceType: 'camera', //album 从相册选图,camera 使用相机,默认二者都有
allowEditImage: true, //是否允许编辑图片,选择一张时候才允许编辑,默认true
clipRatio:{
x: 16,
y: 9
},
},function (images) {
let image_arr = [];
for (let image of images){
image_arr.push(image['path'])
}
that.images = image_arr;
console.log(JSON.stringify(images));
});
},
previewImage: function () { //预览图片
plugin.previewImage({
urls: [
'http://pic.962.net/up/2013-11/20131111660842029339.jpg',
'http://pic.962.net/up/2013-11/20131111660842034354.jpg'
],
current: 'http://pic.962.net/up/2013-11/20131111660842034354.jpg',
})
},
uploadFile: function () { //上传图片
plugin.uploadFile({
url: 'https://up.qiniup.com',
formData: {
token:""
},
name: 'file',
filePath:this.images[0]
},function (successData) {
console.log(successData)
},function (err) {
console.log(err)
},function (process) {
console.log(process)
})
}
如果您在使用中有好的需求及建议,或者遇到什么bug,欢迎随时issue,我会及时的回复
最低支持:iOS 8.0 android 6.0+
FAQs
image-picker extend for weex
The npm package weex-plugin-image-picker receives a total of 299 weekly downloads. As such, weex-plugin-image-picker popularity was classified as not popular.
We found that weex-plugin-image-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.