diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md index 891e3964deb2a69acc23c0b6811da9bb2c3dbe16..0abe6c163105a3ba5491af3a31affa2c6cee2b09 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-blank.md @@ -1,6 +1,6 @@ # Blank -空白填充组件,在容器主轴方å‘上,空白填充组件具有自动填充容器空余部分的能力。仅当父组件为Row/Column时生效。 +空白填充组件,在容器主轴方å‘上,空白填充组件具有自动填充容器空余部分的能力。仅当父组件为Row/Column/Flex时生效。 > **说明:** > diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md index 20f8cb1d3d6c30faa88b2d0f403c676ddbca11fe..80b9547e59495524790f681f13ca2701af27bbf6 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-size.md @@ -17,10 +17,19 @@ | size | {<br/>width?: [Length](ts-types.md#length),<br/>height?: [Length](ts-types.md#length)<br/>} | 设置高宽尺寸。<br/>从API version 9开始,该接å£æ”¯æŒåœ¨ArkTSå¡ç‰‡ä¸ä½¿ç”¨ã€‚<br />从API version 10开始,该接å£æ”¯æŒcalc计算特性。 | | padding | [Padding](ts-types.md#padding) \| [Length](ts-types.md#length) | 设置内边è·å±žæ€§ã€‚<br/>å‚数为Length类型时,四个方å‘内边è·åŒæ—¶ç”Ÿæ•ˆã€‚<br>默认值:0 <br>padding设置百分比时,上下左å³å†…è¾¹è·å‡ä»¥çˆ¶å®¹å™¨çš„width作为基础值。<br/>从API version 9开始,该接å£æ”¯æŒåœ¨ArkTSå¡ç‰‡ä¸ä½¿ç”¨ã€‚<br />从API version 10开始,该接å£æ”¯æŒcalc计算特性。 | | margin | [Margin](ts-types.md#margin) \| [Length](ts-types.md#length) | 设置外边è·å±žæ€§ã€‚<br/>å‚数为Length类型时,四个方å‘外边è·åŒæ—¶ç”Ÿæ•ˆã€‚<br>默认值:0 <br>margin设置百分比时,上下左å³å¤–è¾¹è·å‡ä»¥çˆ¶å®¹å™¨çš„width作为基础值。<br/>从API version 9开始,该接å£æ”¯æŒåœ¨ArkTSå¡ç‰‡ä¸ä½¿ç”¨ã€‚<br />从API version 10开始,该接å£æ”¯æŒcalc计算特性。 | -| constraintSize | {<br/>minWidth?: [Length](ts-types.md#length),<br/>maxWidth?: [Length](ts-types.md#length),<br/>minHeight?: [Length](ts-types.md#length),<br/>maxHeight?: [Length](ts-types.md#length)<br/>} | 设置约æŸå°ºå¯¸ï¼Œç»„件布局时,进行尺寸范围é™åˆ¶ã€‚constraintSize的优先级高于Widthå’ŒHeight。若设置的minWidth大于maxWidth,则minWidth生效,minHeight与maxHeightåŒç†ã€‚<br>默认值:<br>{<br/>minWidth: 0,<br/>maxWidth: Infinity,<br/>minHeight: 0,<br/>maxHeight: Infinity<br/>}<br/>从API version 9开始,该接å£æ”¯æŒåœ¨ArkTSå¡ç‰‡ä¸ä½¿ç”¨ã€‚<br />从API version 10开始,该接å£æ”¯æŒcalc计算特性。 | +| constraintSize | {<br/>minWidth?: [Length](ts-types.md#length),<br/>maxWidth?: [Length](ts-types.md#length),<br/>minHeight?: [Length](ts-types.md#length),<br/>maxHeight?: [Length](ts-types.md#length)<br/>} | 设置约æŸå°ºå¯¸ï¼Œç»„件布局时,进行尺寸范围é™åˆ¶ã€‚constraintSize的优先级高于Widthå’ŒHeight。å–值结果[å‚考](ts-universal-attributes-size.md##constraintSizeå–值对width/heightå½±å“)。<br>默认值:<br>{<br/>minWidth: 0,<br/>maxWidth: Infinity,<br/>minHeight: 0,<br/>maxHeight: Infinity<br/>}<br/>从API version 9开始,该接å£æ”¯æŒåœ¨ArkTSå¡ç‰‡ä¸ä½¿ç”¨ã€‚<br />从API version 10开始,该接å£æ”¯æŒcalc计算特性。 | | layoutWeight | number \| string | 父容器尺寸确定时,设置了layoutWeight属性的åå…ƒç´ ä¸Žå…„å¼Ÿå…ƒç´ å 主轴尺寸按照æƒé‡è¿›è¡Œåˆ†é…ï¼Œå¿½ç•¥å…ƒç´ æœ¬èº«å°ºå¯¸è®¾ç½®ï¼Œè¡¨ç¤ºè‡ªé€‚åº”å 满剩余空间。<br>默认值:0<br/>从API version 9开始,该接å£æ”¯æŒåœ¨ArkTSå¡ç‰‡ä¸ä½¿ç”¨ã€‚<br/>**说明:**<br/>仅在Row/Column/Flex布局ä¸ç”Ÿæ•ˆã€‚<br/>å¯é€‰å€¼ä¸ºå¤§äºŽç‰äºŽ0çš„æ•°å—,或者å¯ä»¥è½¬æ¢ä¸ºæ•°å—çš„å—符串。 | +## constraintSizeå–值对width/heightå½±å“ +|大å°æŽ’列|结果| +|-----|------| +|minWidth/minHeight < width/height< maxWidth/maxHeight|width/height| +|minWidth/minHeight < maxWidth/maxHeight < width/height| maxWidth/maxHeight| +|maxWidth/maxHeight < minWidth/minHeight < width/height| minWidth/minHeight| +|maxWidth/maxHeight < width/height< minWidth/minHeight| minWidth/minHeight| +|width/height < maxWidth/maxHeight < minWidth/minHeight| minWidth/minHeight| +|width/height < minWidth/minHeight < maxWidth/maxHeight| minWidth/minHeight| ## 示例 ```ts