多个重复单元的命名

item 的含义

英: [countable] a single thing, especially one thing in a list, group, or set of things. An item is one of a collection or list of objects.
汉: [可数名词] (系列物品或清单中的)一件

四层重复单元

1
2
3
4
5
6
7
8
9
10
11
12
13
section ❶
section-item ❷
section-item ❷
cell ❸
cell ❸
.cell-item ❹
.cell-item ❹
.cell-item ❹
cell ❸
.cell-item ❹
.cell-item ❹
.cell-item ❹
section ❶

三层重复单元

1
2
3
4
5
6
7
section ❶
section-item ❷
section-item ❷
cell ❸
cell ❸
cell ❸
section ❶

两层层重复单元

大块性 区间内容
1
2
3
4
section ❶
section-item ❷
section-item ❷
section ❶
小的细胞性 区间性重复
1
2
3
4
cell ❶
cell-item ❷
cell-item ❷
cell ❶
列表项重复
1
2
3
4
list ❶
list-item ❷
list-item ❷
list ❶

一层重复单元

大块性 区间内容
1
2
3
section
section
section

使用

  1. 根据ui视图,定义好最外层所需使用的类名。 section 或者 cell 等等。
  2. 下级遇到重复单元的时候,逐次使用以上定义好的类名即可

-l -c -r -t -m -b 短划线后缀

左中右 上中下
sectionsection-l section-m section-r 同级

如果 section 下的 section-item 中 有其它元素,可以将 section-itemsection-box 包裹起来

*-box 命名方式

1
2
3
4
5
6
cell ❶
some other things...
cell-box cell 与 其 item 之间 夹杂 其它内容时, item 以 *-box 容器包裹起来
cell-item ❷
cell-item ❷
cell ❶

多个重复单元的命名 示例图片