2.3.12 • Published 5 years ago

nuke-cell v2.3.12

Weekly downloads
31
License
Apache-2.0
Repository
gitlab
Last release
5 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

5 years ago

2.3.11

5 years ago

2.3.10

5 years ago

2.3.9

5 years ago

2.3.8

5 years ago

2.3.7

5 years ago

2.3.6

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.0

6 years ago

2.2.29

6 years ago

2.2.28

6 years ago

2.2.26

6 years ago

2.2.24

6 years ago

2.2.23

6 years ago

2.2.21

6 years ago

2.2.19

6 years ago

2.2.18

6 years ago

2.2.17

6 years ago

2.2.16

6 years ago

2.2.14

6 years ago

2.2.13

6 years ago

2.2.11

6 years ago

2.2.10

6 years ago

2.2.8

6 years ago

2.2.7

6 years ago

2.2.6

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.1.10

6 years ago

2.1.6

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.1-4.3

6 years ago

2.1.1-4.2

6 years ago

2.1.1-3

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

0.0.4

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago