diff --git a/cndocs/flatlist.md b/cndocs/flatlist.md index bc3502f66c4..71df52ee0b7 100644 --- a/cndocs/flatlist.md +++ b/cndocs/flatlist.md @@ -484,6 +484,16 @@ renderItem({ --- +### `ListItemComponent` + +列表中的每个数据项都使用此元素来渲染,作为 `renderItem` 的替代方式。它接收与 `renderItem` 相同的属性;当两者同时提供时,`ListItemComponent` 优先。 + +| 类型 | +| ------------------ | +| component, element | + +--- + ### `columnWrapperStyle` 如果设置了多列布局(即将`numColumns`值设为大于 1 的整数),则可以额外指定此样式作用在每行容器上。 diff --git a/cndocs/text-style-props.md b/cndocs/text-style-props.md index 2c522a81b89..371ad8a4f0f 100644 --- a/cndocs/text-style-props.md +++ b/cndocs/text-style-props.md @@ -825,6 +825,31 @@ iOS 上支持通用字体族 `system-ui`、`ui-sans-serif`、`ui-serif`、`ui-mo --- +### `fontVariationSettings` + +配置可变字体的变化轴。每个变化轴由一个四字符 OpenType 标签标识,例如 `wght`(字重)、`wdth`(字宽)、`opsz`(光学尺寸),或字体支持的自定义轴。可以用对象或与 CSS 兼容的字符串形式来设置。 + +下面对象和字符串两种写法是等价的,都是将 wght 轴设为 500: + +```tsx + + Variable font + +``` + +关于变化轴和 CSS 字符串语法的更多信息,请参阅 MDN 的 font-variation-settings (https://developer.mozilla.org/en-US/docs/Web/CSS/font-variation-settings) 文档。 + +| 类型 | +| -------------------------------------------- | +| string or object: `{[axis: string]: number}` | + +--- + ### `letterSpacing` 增加或减少字符间距。默认没有额外的字母间距。