2.3.12 • Published 7 years ago

nuke-cell v2.3.12

Weekly downloads
31
License
Apache-2.0
Repository
gitlab
Last release
7 years ago

Cell

  • category: Components
  • chinese: 列表项
  • type: 基本

Nuke UI

nuke-cell@ALINPM nuke-cell@ALINPM

Design

Cell component implements native row item of a repeatable data list.

Usage

Cell must be used as a sub component of list-like-component , like ListView WaterFall,etc.

Normally, Nuke wraps each list item with a Cell component when using dataSource mode :

// if you use listview datasource like this :
<ListView
  renderRow={(item,index)=>{return (<Text>{item}</Text>)}}
  dataSource={["a","b"]}
/>
// Nuke transform it into :
<ListView>
  {["a","b"].map((item,index)=>{
    return (
      <Cell>
        <Text>{item}</Text>
      </Cell>
      )
  })}
</ListView>

Or you can add Cell component yourself with _autoWrapCell={false}

<ListView _autoWrapCell={false}>
{
  ["a","b"].map((item,index)=>{
    return (
      <Cell key={`id_${item.id}`}>
        //... your code
      </Cell>
    )
  })
}
</ListView>

API

PropsDescriptiontypedefault
appendrender item mode, useful when a cell is really large, can be tree nodeStringtree
keepScrollPositionkeep current scroll position, usefull when you prepend data in a list. Only works in Nativebooleanfalse
keyidentity key of a cellString

demo 参考

扫码预览(手淘、千牛、天猫等)

2.3.12

7 years ago

2.3.11

7 years ago

2.3.10

7 years ago

2.3.9

7 years ago

2.3.8

7 years ago

2.3.7

7 years ago

2.3.6

7 years ago

2.3.5

7 years ago

2.3.4

7 years ago

2.3.3

7 years ago

2.3.2

7 years ago

2.3.0

7 years ago

2.2.29

8 years ago

2.2.28

8 years ago

2.2.26

8 years ago

2.2.24

8 years ago

2.2.23

8 years ago

2.2.21

8 years ago

2.2.19

8 years ago

2.2.18

8 years ago

2.2.17

8 years ago

2.2.16

8 years ago

2.2.14

8 years ago

2.2.13

8 years ago

2.2.11

8 years ago

2.2.10

8 years ago

2.2.8

8 years ago

2.2.7

8 years ago

2.2.6

8 years ago

2.2.4

8 years ago

2.2.3

8 years ago

2.2.2

8 years ago

2.1.10

8 years ago

2.1.6

8 years ago

2.1.4

8 years ago

2.1.3

8 years ago

2.1.1-4.3

8 years ago

2.1.1-4.2

8 years ago

2.1.1-3

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

0.0.4

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago