
Research
/Security News
Chrome and Firefox Extensions Posing as Free VPNs Add Clipboard Stealers via Malicious Updates
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.
@react-native-pure/ibuild-modal
Advanced tools
| Modal | 属性 | 说明 |
|---|---|---|
| PageModal | PageModalProps | 页码切换modal |
| TreeModal | TreeModalProps | 层级选择modal |
| TreeSelector | TreeSelectorProps | 层级选择组件 |
| PopModal | PopModalProps | 底部弹出modal组件 |
| ActionSheetModal | ActionSheetModalProps | |
| CameraModal | CameraProps | 拍照modal,支持拍照和拍摄视频 |
| GalleryViewerModal | [GalleryViewerModalProps](#calleryviewermodalprops | 画廊组件,支持视频和图片以及自定义Item |
| ImageEditModal | ImageEditModalProps | 图片编辑 |
| ListViewModel | ListViewModelProps | |
| QRScanModal | QRScanModalProps | 二维码扫描 |
| ShareModal | ShareModalProps | 分享 |
| WheelModal | WheelModalProps | 滚轮选择 |
$ npm i @react-native-pure/ibuild-modal --save
Quite easy to use TreeModal:

import React from 'react'
import {View,TouchableOpacity,Text,Alert} from 'react-native'
import {TreeModal,TreeSelectorModel} from '@react-native-pure/ibuild-modal'
import update from "immutability-helper";
constructor(props){
super(props)
this.state = {
show:false,
data:{
"sysNo": 1,
"organizationCode": "1",
"organizationFullName": "组织机构1",
children:[{
"sysNo": 11,
"organizationCode": "11",
"organizationFullName": "组织机构11",
}]
},
{
"sysNo": 2,
"organizationCode": "2",
"organizationFullName": "组织机构2",
}],
selectedData:[],
model:TreeSelectorModel.singleSelectAny
}
}
updateState = (state: ImmutableHelperObject, callback: Function) => {
if (this.state) {
this.setState(
update(this.state, state),
callback
);
}
}
render(){
return(<View style={{flex:1}}>
<TouchableOpacity style={{justifyContent: 'center',alignItems: 'center',flex:1}}
onPress={()=>{
this.setState({
show:true
})
}}>
<Text>show</Text>
</TouchableOpacity>
<TreeModal visible={this.state.show}
dataSource={this.state.data}
storageKey={"Key1"}
selectedDataSouce = {this.state.selectedData}
keyExtractor={(data)=>data.sysNo}
labelExtractor={(data)=>data.organizationFullName}
model={this.state.model}
onRequestClose={(info)=>{
this.setState({
show:false
})
}}
onChange={(currentItem,path)=>{
Alert.alert("change")
}}
onSelected={(currentItem,path)=>{
Alert.alert("选中")
this.updateState({
selectedData: {$push:[currentItem]}
})
}}
onUnSelected={(currentItem,path)=>{
Alert.alert(" 取消选中")
let index = this.state.selectedData.findIndex(x=>x.sysNo === currentItem.sysNo)
this.updateState({
selectedData: {$splice: [[index, 1]]}
})
}}
/>
</View>)
}
}
dataSource Array
selectedDataSouce Array
loadDataFuc? (selectedItem:Object)=>Object 点击网络数据keyExtractor? (item: object) => string 数据唯一标识,默认为 sysNolabelExtractor? (item: object) => string 显示文字的key,默认为namemodel? ()=>$Values<typeof TreeSelectorModel> 选择模式,默认singleSelectToEndonChange? ()=>(currentItem: Object,path:Array) => void 选择改变时触发
onSelected? (currentItem: Object,path:Array) => void 选中时触发
onUnSelected? (currentItem: Object,path:Array) => void 取消选择时触发
lastSelectedPath? Array 最后选择的全路径,如果提供将自动跳到上次选择的位置maxLevel? number 页最多显示多少列,默认为10initLevel? number 初始化显示列,默认为 2storageKey? string 提供一个字符串key用以保存历史选择数据以实现数据分离,如果不传的将使用默认key对历史选择数据进行保存style? ObjectonError? (message:string)=>voidhiddenHomeIcon? boolean 是否隐藏header上home IconhomeTitle? string 初始化header 第一个位置的内容showFullValue? boolean Item内容是否显示全路径navbarStyle? NavigationBarStyletitle? stringonPressLeft? ()=>voidonPressRight? ()=>voidhiddenLeft? booleanhiddenRight? booleanrenderLeft? React.ReactElement < any >renderRight? React.ReactElement < any >renderEmpty? React.ReactElement < any >dataSource Array
selectedDataSouce Array
loadDataFuc? (selectedItem:Object)=>Object 点击网络数据keyExtractor? (item: object) => string 数据唯一标识,默认为 sysNolabelExtractor? (item: object) => string 显示文字的key,默认为namemodel? ()=>$Values<typeof TreeSelectorModel> 选择模式,默认singleSelectToEndonChange? ()=>(currentItem: Object,path:Array) => void 选择改变时触发
onSelected? (currentItem: Object,path:Array) => void 选中时触发
onUnSelected? (currentItem: Object,path:Array) => void 取消选择时触发
lastSelectedPath? Array 最后选择的全路径,如果提供将自动跳到上次选择的位置maxLevel? number 页最多显示多少列,默认为10initLevel? number 初始化显示列,默认为 2storageKey? string 提供一个字符串key用以保存历史选择数据以实现数据分离,如果不传的将使用默认key对历史选择数据进行保存style? ObjectonError? (message:string)=>voidhiddenHomeIcon? boolean 是否隐藏header上home IconhomeTitle? string 初始化header 第一个位置的内容showFullValue? boolean Item内容是否显示全路径navbarStyle? NavigationBarStyletitle? stringonPressLeft? ()=>voidonPressRight? ()=>voidhiddenLeft? booleanhiddenRight? booleanrenderLeft? React.ReactElement < any >renderRight? React.ReactElement < any >transition? $Values<typeof TransitionType>####导航栏样式
title Object title样式leftButton Object 左边按钮样式rightButton Object 右边按钮样式contaner Object 导航栏外层view样式####层级选择组件模式
multiSelectToEnd:"multiSelectToEnd" 多选,只有到最后一级multiSelectAny:"multiSelectAny" 每一级都可以多选singleSelectToEnd:"singleSelectToEnd" 单选,只有到最后一级singleSelectAny:"singleSelectAny" 每一级都可以单选####页面切换动画
none:"none" 没有动画horizontal:"horizontal" 从右往左推出页面vertical:"vertical" 从下往上推出页面visible boolean
onRequestClose ()=>void
onShown? ()=>void
onHidden? ()=>void
children? *any
visible boolean
onRequestClose ()=>void
onShown? ()=>void
onHidden? ()=>void
children? *any
title? string
buttons? Array< ActionSheetModalButton>
style? any
cancelType? $Values< typeof ActionSheetCancelButtonEnum>
text booleanonPress (index:number)=>voidcancel: "cancel"delete: "delete"`visible boolean
onRequestClose (ImagePickerResult)=>void
onShown? ()=>void
onHidden? ()=>void
children? *any
onError? (err: Object) => void
type $Values<typeof ImagePickerMediaEnum> 视频/拍照/视频和拍照
transition? $Values<typeof TransitionType>
path stringwidth numberheight numbermime stringsize numbermodificationDate stringany: "any"photo: "photo"`video: "video"visible booleanonRequestClose (ImagePickerResult)=>voidonShown? ()=>voidonHidden? ()=>voiddata Array<ImageListPickerData>initIndex? number 初始化显示第几张style? Objecttitle? stringrenderFooter? (index: number) => React.ReactElementrenderHeader? (index: number) => React.ReactElementrenderIndicator? (data: Object, index: number) => React.ReactElementonChange? (index: number) => voidshowIndicator? booleantransition? $Values<typeof TransitionType>url String 图片/视频url地址type $Values< typeof GalleryFileType> 数据源类型coverImageUrl? String 视频封面图地址other: -1image: 0 图片video: 1 视频path string 本地图片地址sourceType $Values < typepf ImageSourceEnum> 本地图片地址visible booleanonRequestClose (data: ImagePickerResult | null)=>voidonShown? ()=>voidonHidden? ()=>voidonPressBack? ()=>voidonError? (error: Object)=>voidaddress? string 水印地址transition? $Values<typeof TransitionType>none: "none"album: "album" 相册camera: "camera" 相机visible booleanonRequestClose (data:any)=>voidonShown? ()=>voidonHidden? ()=>voiddata ()=>ArrayrenderItem () => React.ReactElementtotal numberpageIndex numberstartPageNum? numberonPageChange? (pageIndex:number)=>voidvisible booleanonRequestClose (data:any)=>voidonShown? ()=>voidonHidden? ()=>voidtransition? $Values< typeof TransitionType>renderNavBar? () => React.ReactElementbarCodeTypes? Array<$Values<typeof QRBarCodeEnum>>aztec: "aztec"code128: "code128"code39: "code39"code39mod43: "code39mod43"code93: "code93"ean13: "ean13"ean8: "ean8"pdf417: "pdf417"qr: "qr"upce: "upce"interleaved2of5: "interleaved2of5"itf14: "itf14"datamatrix: "datamatrix"visible booleanonRequestClose (data:any)=>voidonShown? ()=>voidonHidden? ()=>voiddata ShareDatatype $Values< typeof ShareDataType>desc string 必填,页面的描述title string 页面的标题url string 页面的链接地址image string 图片地址,可以是本地图片,也可以是远程图片text:"text"url:"url"key stringvalue anyvisible booleanonRequestClose (selectedValue?:any)=>voidonShown? ()=>voidonHidden? ()=>voidtransition? $Values<typeof TransitionType>data PickerDatafontSize? numbertextOffset numberselectedIndex numberonIndexChange? (index: number, data: PickerData) => voidFAQs
The npm package @react-native-pure/ibuild-modal receives a total of 40 weekly downloads. As such, @react-native-pure/ibuild-modal popularity was classified as not popular.
We found that @react-native-pure/ibuild-modal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.