imobile_for_reactnative
Version:
iMobile for ReactNative,是SuperMap iMobile推出的一款基于React-Native框架的移动应用开发工具。基于该开发工具,用户可以使用JavaScript开发语言,开发出在Android和IOS操作系统下运行的原生移动GIS应用,入门门槛低,一次开发,处处运行。
25 lines (18 loc) • 683 B
text/typescript
import { ImageRequireSource } from 'react-native'
import { ToolbarOption } from './ToolbarOption'
export type ToolbarModuleData<ModuleList> = ModuleData<ModuleList, keyof ModuleList>
interface ModuleData<ModuleList, key extends keyof ModuleList> {
name: key
image: ImageRequireSource
/** functiontoolbar 点击事件 */
action: () => void
/** 获取名称 */
getTitle: () => string
/** 根据 key 获取内部数据 */
getData(key: ModuleList[key]): ToolbarOption<unknown>
customView?: React.ComponentType<any>
customViewBottom?: React.ComponentType<any>
}
/** toolbar 的自定义回调,toolbar module 实现 */
// export interface ToolBarActions {
// }