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

@dfeidao/fd-m000017

v4.6.201907081542

Published

滚动视图 ScrollView

Downloads

4

Readme

Installation

yarn add --dev @dfeidao/fd-m000017

fd-m000017 滚动视图ScrollView

import ScrollView from '@dfeidao/fd-m000017';

<ScrollView >
	<Text>1</Text>
	<Text>2</Text>
	<Text>3</Text>
	<Text>4</Text>
	<Text>5</Text>
	<Text>6</Text>
	<Text>7</Text>
	<Text>8</Text>
	<Text>9</Text>
	<Text>10</Text>
	<Text>11</Text>
	<Text>12</Text>
	<Text>13</Text>
	<Text>14</Text>
	<Text>15</Text>
	<Text>16</Text>
	<Text>17</Text>
	<Text>18</Text>
	<Text>19</Text>
	<Text>20</Text>
	<TextInput />
	<Text>21</Text>
	<Text>22</Text>
	<Text>23</Text>
	<Text>24</Text>
	<Text>25</Text>
	<Text>26</Text>
	<Text>27</Text>
	<Text>28</Text>
	<Text>29</Text>
	<Text>30</Text>
	<Text>31</Text>
	<Text>32</Text>
	<Text>33</Text>
	<Text>34</Text>
	<Text>35</Text>
	<Text>36</Text>
	<Text>37</Text>
	<Text>38</Text>
	<Text>39</Text>
	<Text>40</Text>
</ScrollView>

Installation

yarn add --dev @dfeidao/fd-m000017

Attributes

alwaysBounceVertical

当此属性为true时,垂直方向即使内容比滚动视图本身还要小,也可以弹性地拉动一截。当horizontal={true}时默认值为false,否则为true。

contentContainerStyle

这些样式会应用到一个内层的内容容器上,所有的子视图都会包裹在内容容器内

keyboardDismissMode

用户拖拽滚动视图的时候,是否要隐藏软键盘。

通用设置: 'none' (默认值),拖拽时不隐藏软键盘。 'on-drag',当拖拽开始的时候隐藏软键盘。 仅限IOS: 'interactive',软键盘伴随拖拽操作同步地消失,并且如果往上滑动会恢复键盘。安卓设备上不支持这个选项,会表现的和none一样。

onContentSizeChange

此函数会在ScrollView内部可滚动内容的视图发生变化时调用。

onMomentumScrollBegin

滚动动画开始时调用此函数。

onMomentumScrollEnd

滚动动画结束时调用此函数。

onScroll

在滚动的过程中,每帧最多调用一次此回调函数。调用的频率可以用scrollEventThrottle属性来控制。

onScrollBeginDrag

当用户开始拖动此视图时调用此函数。

onScrollEndDrag

当用户停止拖动此视图时调用此函数。

pagingEnabled

当值为true时,滚动条会停在滚动视图的尺寸的整数倍位置。这个可以用在水平分页上。默认值为false。(注意:垂直分页在Android上不支持。)

refreshControl

用于为ScrollView提供下拉刷新功能。只能用于垂直视图

scrollEnabled

当值为false的时候,内容不能滚动,默认值为true

showsHorizontalScrollIndicator

当此属性为true的时候,显示一个水平方向的滚动条。

showsVerticalScrollIndicator

当此属性为true的时候,显示一个垂直方向的滚动条。

scrollsToTop

当此值为true时,点击状态栏的时候视图会滚动到顶部。默认值为true。

详细信息可以查看官方文档 https://reactnative.cn/docs/scrollview/