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

xgrn-baseview

v0.1.12

Published

RN-基础组件库库

Downloads

3

Readme

XGBaseview

RN容器-基础组件库

功能

基础组件库 提供组件组件: LoadingHub, //loading指示器 ToastView, //toast指示器 AlertView, //alert弹框 // 通用组件 CheckBox, //复选框 EmptyView, //为空页 NullView, //什么都不展示的页面 LoadingView, //加载页面 GeneralButton, //按钮(内置0.5s节流) NetFailedView, //网络加载失败页

安装

私有库操作

nrm ls

如果提示nrm命令不存在,如下操作

npm install -g nrm

然后增加私有库地址并使用:


nrm add xgnpm  http://172.16.2.71:4873/
nrm use xgnpm
npm install

安装依赖

$ yarn add xgrn-baseview

JS使用教程

// 在项目入口根文件处,进行全局配置。
import {XGBaseViewConfig} from 'xgrn-baseview';
XGBaseViewConfig({
    themeColor: '#62BEC5',          //主题色
    highlightBgColor: '#C6E7EA',    //高亮颜色
    disableThemeColor: '#C6E7EA',   //不可用颜色
    loadingGif: null,               //Gif加载图
    netNotConnectImage: null,       //网络未连接图片
    serverErrorImage: null,         //数据异常图片
    checkBoxSelectedIcon: null,     //复选框选中图片
    checkBoxUnSelectedIcon: null,   //复选框非选中图片
});

import {
    CheckBox,
    EmptyView,
    NetFailedView,
    NullView,
    LoadingView,
    GeneralButton,
} from 'xgrn-baseview';

        //渲染按钮
        return (
            <View>
                <GeneralButton
                    withoutFeedback={true}
                    disabled={false}
                    title={'无高亮'}
                    click={this._clickBtn}/>
                <GeneralButton
                    style={{marginTop: 20}}
                    withoutFeedback={false}
                    disabled={false}
                    title={'有高亮'}
                    click={this._clickBtn}/>
                <GeneralButton
                    style={{marginTop: 20}}
                    withoutFeedback={false}
                    disabled={true}
                    title={'无高亮-不可用状态'}
                    click={this._clickBtn}/>

                <GeneralButton
                    style={{marginTop: 20}}
                    withoutFeedback={true}
                    disabled={true}
                    title={'有高亮-不可用状态'}
                    click={this._clickBtn}/>
            </View>);

    // 渲染复选框
    renderCheckBox = ()=>{
        return (<CheckBox isSelected={this.state.isSelected} onClick={()=>{
            this.setState({
                isSelected: !this.state.isSelected
            });
        }}/>)
    };

    // 渲染网络异常页面
    renderNetFailedView = ()=>{
        return (<NetFailedView
            netFailedInfo={new Error('23432')}
            callback={()=>{
                alert('重新加载');
            }}/>);
    };

    // 渲染为空页面
    renderEmptyView = ()=>{
        return (<EmptyView description={'描述信息'} />);
        或者更多配置如下
        return (<EmptyView
            style={'这里是style,可以自定义'}
            source={'自定义图片资源'}
            imageStyle={'这里自定义图片的样式'}
            description={'描述信息'}
            subDescription={'副描述信息,如果有值会显示,没值不显示'}
            isScrollViewContainer={'是否包含下拉刷新组件'}
            isRefresh={'标记是否处于刷新状态'}
            onRefresh={'包含下拉刷新组件时,下拉刷新调用'}
        />);

    };