imobile_for_reactnative
Version:
iMobile for ReactNative,是SuperMap iMobile推出的一款基于React-Native框架的移动应用开发工具。基于该开发工具,用户可以使用JavaScript开发语言,开发出在Android和IOS操作系统下运行的原生移动GIS应用,入门门槛低,一次开发,处处运行。
53 lines (38 loc) • 945 B
text/typescript
import { ImageSourcePropType } from "react-native"
import { dp } from '../../utils/size'
export interface ToolbarResource {
text: ToolbarText
image: ToolbarImage
}
interface ToolbarText {
slide_ratio: () => string
apply: () => string
}
interface ToolbarImage {
back: ImageSourcePropType
commit: ImageSourcePropType
dropdown: ImageSourcePropType
dropup: ImageSourcePropType
check: ImageSourcePropType
un_check: ImageSourcePropType
add_round: ImageSourcePropType
option: ImageSourcePropType
toolbar_toggle: ImageSourcePropType
plus: ImageSourcePropType
minus: ImageSourcePropType
}
let text: ToolbarText
let image: ToolbarImage
export function init(param: ToolbarResource) {
text = param.text
image = param.image
}
export function getText(): ToolbarText {
return text
}
export function getImage(): ToolbarImage {
return image
}
export function size(input: number): number {
return dp(input)
}