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

react-native-uking-fast-image

v0.0.1

Published

Native QRCode and barcode and QRScanner component for React Native SDK

Downloads

13

Readme

react-native-uking-fast-image

npm package npm download

##Introduction

原生图片加载组件,,集成到 iOS 和 Android 。

原生图片加载组件是基于

SDWebImage(IOS) GIT: https://github.com/rs/SDWebImage.git

Glide(android) GIT: https://github.com/bumptech/glide.git

##注:

如果有不对的地方请提交到issues以便解决。

##Installation

###npm or yarn

npm install react-native-uking-fast-image or yarn add react-native-uking-fast-image

##FastImage

image

###IOS:

在你的项目ios目录下面新建一个Profile文件:

    platform :ios, '8.0'
    target '你的项目名称' do
        pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga/'    
        pod 'React', :path => '../node_modules/react-native', :subspecs => [
            'Core',
            'DevSupport'
        ]
        pod 'RCTFastImageView', path: '../node_modules/react-native-uking-fast-image/ios/'
    end

然后在ios目录下 执行 pod install 然后把ios/Pods录下 Pods.xcodeproj添加到 Libraries下

  1. 如果是 iOS 中请求图片为http请求,请在Info.plist中添加http请求权限:

Android

make the following additions to the given files manually:

android/settings.gradle

include ':react-native-uking-fast-image'
project(':react-native-uking-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-uking-fast-image/android')

android/app/build.gradle

dependencies {
    ...
    compile project(':react-native-uking-fast-image')
}

MainApplication.java

On top, where imports are:

import net.muding.uking.rctfastimageview.RCTFastImageViewPackage;

Add the RCTFastImageViewPackage class to your list of exported packages.

@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
            new MainReactPackage(),
            new RCTFastImageViewPackage()
    );
}

##Usage

import FastImage from 'react-native-uking-fast-image';

<FastImage 
    src="url" 
    placeholder="占位图片" //占位图片 ios请添加占位图片到项目的资源管理里面,android请添加到你项目的drawable里,占位图片名称最好统一
    resizeMode="填充方式"
/>