npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ibuild-community/app-websdk

v1.5.1

Published

云筑智联 app websdk

Downloads

4

Readme

云筑智联 app-websdk

安装

$ npm i @ibuild-community/app-websdk --save

快速使用

import websdk from "@ibuild-community/app-websdk"

//比如获取当前的位置信息
websdk.getCurrentPosition()
    .then(value=>{
        console.log(value);
    })
    .catch(ex=>{
        console.error(ex);
    })

API

  • close ()=>Promise 关闭当前页面
  • title (title?:string)=>Promise<void|string> 设置或者获取页面的title
  • getCurrentPosition ()=>Promise 获取当前的地理位置
  • openImagePicker (option:ImagePickerOption={multiple:false,mediaType:"photo"})=>Promise<ImagePickerResult | Array<ImagePickerResult> | null> 选择设备上的文件,包括视频,照片等

Modal

  • openScanModal (props?:QRScanModalProps)=>Promise | null> 二维码扫描
  • openCameraModal (props?:CameraProps)=>Promise | null> 拍摄视频/照片
  • openAreaModal (props?:TreeModalProps)=>Promise | null> 区域选择
  • openCheckItemModal (props?:TreeModalProps)=>Promise | null> 分部分项选择
  • openSafetyCheckAreaModal (props?:TreeModalProps)=>Promise | null> 安全检查部位选
  • openQualityCheckAreaModal (props?:TreeModalProps)=>Promise | null> 质量检查部位选择
  • openTaskCheckAreaModal (props?:TreeModalProps)=>Promise | null> 进度任务流水段选择
  • openHiddenDangerModal (props?:TreeModalProps)=>Promise | null> 安全隐患选择
  • openSubContractorModal (props?:TreeModalProps)=>Promise | null> 分包单位选择
  • openMemberModal (props?:MemberModalProps)=>Promise | null> 项目人员选择
  • openRectificationMemberModal (props?:MemberModalProps)=>Promise | null> 整改人选择
  • openOrganizationModal (props?:OrganizationModalProps)=>Promise | null> 组织机构选择

types

ImagePickerOption

  • mediaType "any" | "photo" | "video" 媒体类型
  • multiple boolean 是否可以多选

ImagePickerResult

  • path string
  • width number
  • height number
  • mime string
  • size number
  • modificationDate string

TakePicType

Properties

  • all
  • photo
  • video

QRScanModalProps

  • visible boolean
  • transition?: **$Values<typeof TransitionType> ** modal切换动画
  • barCodeTypes? $Values<typeof QRBarCodeType> [] 识别的二维码类型。默认为空,表示支持所有类型
  • maskColor? string 蒙层背景颜色
  • cornerColor? string扫描区转角线条颜色
  • borderColor? string边线颜色
  • loadingColor? string loading 颜色
  • rectHeight? number 扫描区高度*
  • rectWidth? number 扫描区宽度
  • borderWidth? number 扫描区border宽度
  • cornerBorderWidth? number 扫描区转角线条宽度
  • cornerBorderLength? number 扫描去转角线条长度
  • isLoading? boolean 是否显示loading
  • scanBarAnimateTime? number 扫描线动画时间
  • scanBarColor? string 扫描线颜色
  • scanBarMargin? number 扫描线margin
  • isShowScanBar? boolean 是否显示扫描线
  • topTipText? string 上部分提示文字
  • bottomTipText? string 下部分提示文字

TreeModalProps

  • visible boolean
  • title? string
  • multiple? boolean 是否支持多选
  • selectedDataSouce *Array 已经选择数据
  • lastSelectedPath? Array 已选择数据的全路径
  • historyKey? string 提供一个字符串key用以保存历史选择数据以实现数据分离,如果不传的将使用默认key对历史选择数据进行保存
  • type?: **$Values<typeof CascadeSelectorType> ** 只有当type==0时才支持多选
  • maxLevel?:number 一页最多显示多少列,超过将按单列现实 type==1时,默认为1;type==0时,默认为10
  • initLevel?:number 初始化显示列 type==1时,默认为0;type==0时,默认为2
  • transition? $Values<typeof TransitionType> 默认为horizontal
  • onShown? Function
  • onHidden? Function 禁止在IOS 在onHidden中调用alert

CascadeSelectorType

  • 0 只能选择到最后一层级
  • 1 *可以选择任一层级

MemberModalProps

  • visible boolean
  • title? string
  • multiple? boolean 是否支持多选
  • selectedDataSouce *Array 已经选择数据
  • lastSelectedPath? Array 已选择数据的全路径
  • historyKey? string 提供一个字符串key用以保存历史选择数据以实现数据分离,如果不传的将使用默认key对历史选择数据进行保存
  • onRequestClose function(selectedData?: Object[]|null):void 点击关闭、确定按钮或者选择完数据后触发。点击关闭或者确定按钮时selectedData为空
  • transition? $Values<typeof TransitionType> 默认为horizontal
  • onShown? Function
  • onHidden? Function 禁止在IOS 在onHidden中调用alert

OrganizationModalProps

  • visible boolean
  • type?: **$Values<typeof CascadeSelectorType> ** 只有当type==0时才支持多选
  • title? string
  • lastSelectedPath? Array 已选择数据的全路径
  • onChanged? ***function (path: Object[]) => void ** 每次选择数据改变触发
  • transition? $Values<typeof TransitionType> 默认为horizontal
  • onShown? Function
  • onHidden? Function 禁止在IOS 在onHidden中调用alert