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

owl-sdk

v1.2.19

Published

0. ```npm install owl-sdk```

Downloads

1

Readme

使用说明

  1. npm install owl-sdk

引入案例

``import { Login, SignUp, if_login, initGlobalConfig } from 'owl-sdk'```

必要配置

为了方便开发和生产时都能方便地使用sdk及其中的接口,请进行以下配置

  1. 引入initGlobalConfig方法
  2. 调用initGlobalConfig方法设置sdk内的环境 initGlobalConfig(process.env.NODE_ENV)
  3. 在本地开发时,请配置代理,将/owl代理到https://alpha-owl.aidigger.com

注册 SignUp

  1. LogIn 设置 已有账号?登陆 点击后的跳转逻辑
<SignUp LogIn={()=>{console.log('LogIn')}} />
  1. afterSignUp 设置 注册成功 后的逻辑
<SignUp afterSignUp={()=>{console.log('afterSignUp')}} />

登录 Login

  1. signUp 设置 注册新用户 点击后的跳转逻辑
<Login signUp={()=>{console.log('signUp')}} />
  1. afterlogin 设置 登录成功 后的逻辑
<Login afterlogin={()=>{console.log('afterlogin')}}>
  1. passwordforgotten 设置 忘记密码 的逻辑
<Login passwordforgotten={()=>{console.log('忘记密码')}} ></Login>

登陆验证 if_login

该函数用于验证 是否可以已经登陆

  1. param if_login 的参数,用来定义验证登陆成功或失败后的逻辑 例子:
<div onClick={()=>{if_login(param)}} >if Login test</div>

const param = {
  success : ()=>{
    console.log('login success')
  },
  fail : ()=>{
    console.log('login fail')
  } 
}

用户搜索选择框 UserSelector

  1. mode="multiple" 切换用户是否可以多选
  2. usershowmode 默认显示用户的realname 可设置为 username 让selector显示为username
  3. handleChange 获得选中的用户ID的方法 function handleChange(value) { console.log(selected ${value}); }

登录用户小菜单 UserPing

  1. styles 设置Menu的样式
  2. navigator 设置第一个子菜单的内容
  3. location 设置第一个子菜单的跳转地址
  4. afterNavClick 设置第一个子菜单点击后的回调函数
  5. infoDisable 禁用第一个小菜单
  6. namecolor 自定义用户名颜色
  7. afterLogout 自定义点击退出后调用的方法