diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-interpolation-calculation.md b/zh-cn/application-dev/reference/arkui-ts/ts-interpolation-calculation.md index 4c348a725dca9f80c7ba28cd8e27214c7b44f881..f12674493dd658953d876d3f2094ce36e5a5c905 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-interpolation-calculation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-interpolation-calculation.md @@ -24,7 +24,7 @@ initCurve(curve?: Curve):ICurve | 参数名 | 类型 | 必填 | 默认值 | 说明 | | ------ | ------------------------------------------------------------ | ---- | ------------ | ---------- | -| curve | [Curve](#curve枚举说明) | 否 | Curve.Linear | 曲线类型。 | +| curve | [Curve](ts-appendix-enums.md#curve) | 否 | Curve.Linear | 曲线类型。 | **返回值:** @@ -175,7 +175,7 @@ init(curve?: Curve): string | 参数名 | 类型 | 必填 | 默认值 | 说明 | | ------ | ------------------------------------------------------------ | ---- | ------------ | ---------- | -| curve |[Curve](#curve枚举说明) | 否 | Curve.Linear | 曲线类型。 | +| curve |[Curve](ts-appendix-enums.md#curve) | 否 | Curve.Linear | 曲线类型。 | ## Curves.steps(deprecated) @@ -226,26 +226,6 @@ spring(velocity: number, mass: number, stiffness: number, damping: number): stri | stiffness | number | 是 | 刚度。是物体抵抗施加的力而形变的程度。在弹性系统中,刚度越大,抵抗变形的能力越强,恢复到平衡位置的速度就越快。 | | damping | number | 是 | 阻尼。是一个纯数,无真实的物理意义,用于描述系统在受到扰动后震荡及衰减的情形。阻尼越大,弹性运动的震荡次数越少、震荡幅度越小。 | - -## Curve枚举说明 - -| 名称 | 描述 | -| ------------------- | ---------------------------------------- | -| Linear | 表示动画从头到尾的速度都是相同的。 | -| Ease | 表示动画以低速开始,然后加快,在结束前变慢,CubicBezier(0.25, 0.1, 0.25, 1.0)。 | -| EaseIn | 表示动画以低速开始,CubicBezier(0.42, 0.0, 1.0, 1.0)。 | -| EaseOut | 表示动画以低速结束,CubicBezier(0.0, 0.0, 0.58, 1.0)。 | -| EaseInOut | 表示动画以低速开始和结束,CubicBezier(0.42, 0.0, 0.58, 1.0)。 | -| FastOutSlowIn | 标准曲线,cubic-bezier(0.4, 0.0, 0.2, 1.0)。 | -| LinearOutSlowIn | 减速曲线,cubic-bezier(0.0, 0.0, 0.2, 1.0)。 | -| FastOutLinearIn | 加速曲线,cubic-bezier(0.4, 0.0, 1.0, 1.0)。 | -| ExtremeDeceleration | 急缓曲线,cubic-bezier(0.0, 0.0, 0.0, 1.0)。 | -| Sharp | 锐利曲线,cubic-bezier(0.33, 0.0, 0.67, 1.0)。 | -| Rhythm | 节奏曲线,cubic-bezier(0.7, 0.0, 0.2, 1.0)。 | -| Smooth | 平滑曲线,cubic-bezier(0.4, 0.0, 0.4, 1.0)。 | -| Friction | 阻尼曲线,CubicBezier(0.2, 0.0, 0.2, 1.0)。 | - - ## 整体示例 ```ts diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-matrix-transformation.md b/zh-cn/application-dev/reference/arkui-ts/ts-matrix-transformation.md index 366ba2766ef1cbe2688625dc50de078d422a3d44..43d8e5b727ca19041f0c4f9cfdfdfcae59e3f8a6 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-matrix-transformation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-matrix-transformation.md @@ -85,13 +85,13 @@ identity(): Matrix4Transit Matrix的初始化函数,可以返回一个单位矩阵对象。 -**返回值** +**返回值:** | 类型 | 说明 | | -------------- | -------------- | | Matrix4Transit | 单位矩阵对象。 | -**示例** +**示例:** ```ts // matrix1 和 matrix2 效果一致 @@ -128,13 +128,13 @@ copy(): Matrix4Transit Matrix的拷贝函数,可以拷贝一份当前的矩阵对象。 -**返回值** +**返回值:** | 类型 | 说明 | | -------------- | -------------------- | | Matrix4Transit | 当前矩阵的拷贝对象。 | -**示例** +**示例:** ```ts // xxx.ets @@ -180,13 +180,13 @@ Matrix的叠加函数,可以将两个矩阵的效果叠加起来生成一个 | ------ | ------- | ---- | ------------------ | | matrix | Matrix4 | 是 | 待叠加的矩阵对象。 | -**返回值** +**返回值:** | 类型 | 说明 | | -------------- | ------------------ | | Matrix4Transit | 矩阵叠加后的对象。 | -**示例** +**示例:** ```ts // xxx.ets @@ -225,13 +225,13 @@ invert(): Matrix4Transit Matrix的逆函数,可以返回一个当前矩阵对象的逆矩阵,即效果正好相反。 -**返回值** +**返回值:** | 类型 | 说明 | | -------------- | ---------------------- | | Matrix4Transit | 当前矩阵的逆矩阵对象。 | -**示例** +**示例:** ```ts import matrix4 from '@ohos.matrix4' @@ -266,7 +266,7 @@ translate({x?: number, y?: number, z?: number}): Matrix4Transit Matrix的平移函数,可以为当前矩阵增加x轴/Y轴/Z轴平移效果。 -**参数** +**参数:** | 参数名 | 类型 | 必填 | 说明 | | ------ | ------ | ---- | ------------------------------------- | @@ -274,13 +274,13 @@ Matrix的平移函数,可以为当前矩阵增加x轴/Y轴/Z轴平移效果。 | y | number | 否 | y轴的平移距离,单位px。
默认值:0 | | z | number | 否 | z轴的平移距离,单位px。
默认值:0 | -**返回值** +**返回值:** | 类型 | 说明 | | -------------- | ---------------------------- | | Matrix4Transit | 增加好平移效果后的矩阵对象。 | -**示例** +**示例:** ```ts // xxx.ets @@ -320,13 +320,13 @@ Matrix的缩放函数,可以为当前矩阵增加x轴/Y轴/Z轴缩放效果。 | centerX | number | 否 | 变换中心点x轴坐标。
默认值:0 | | centerY | number | 否 | 变换中心点y轴坐标。
默认值:0 | -**返回值** +**返回值:** | 类型 | 说明 | | -------------- | ---------------------------- | | Matrix4Transit | 增加好缩放效果后的矩阵对象。 | -**示例** +**示例:** ```ts // xxx.ets @@ -367,13 +367,13 @@ Matrix的旋转函数,可以为当前矩阵增加x轴/Y轴/Z轴旋转效果。 | centerX | number | 否 | 变换中心点x轴坐标。
默认值:0 | | centerY | number | 否 | 变换中心点y轴坐标。
默认值:0 | -**返回值** +**返回值:** | 类型 | 说明 | | -------------- | ---------------------------- | | Matrix4Transit | 增加好旋转效果后的矩阵对象。 | -**示例** +**示例:** ```ts // xxx.ets @@ -409,13 +409,13 @@ Matrix的坐标点转换函数,可以将当前的变换效果作用到一个 | ------ | ----- | ---- | ------------------ | | point | Point | 是 | 需要转换的坐标点。 | -**返回值** +**返回值:** | 类型 | 说明 | | ----- | ---------------- | | Point | 返回矩阵变换后的Point对象。 | -**示例** +**示例:** ```ts // xxx.ets diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md index bd48e25b3b06f38aeb2713817d23ef9e4a93686a..9f9c8f42383cd699a337eb7f1f17e1a003707ebf 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md @@ -35,7 +35,7 @@ | maskColor | [ResourceColor](ts-types.md#resourcecolor) | 否 | 提示气泡遮障层的颜色。 | | popupColor | [ResourceColor](ts-types.md#resourcecolor) | 否 | 提示气泡的颜色。 | | enableArrow | boolean | 否 | 是否显示箭头。
从API Version 9开始,如果箭头所在方位侧的气泡长度不足以显示下箭头,则会默认不显示箭头。比如:placement设置为Left,但气泡高度小于箭头的宽度(32vp),则实际不会显示箭头。
默认值:true | -| autoCancel | boolean | 否 | 页面有操作时,是否自动关闭气泡
默认值:true | +| autoCancel | boolean | 否 | 页面有操作时,是否自动关闭气泡。
默认值:true | | onStateChange | (event: { isVisible: boolean }) => void | 否 | 弹窗状态变化事件回调,参数为弹窗当前的显示状态。 | diff --git a/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-syntax-css.md b/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-syntax-css.md index 9838ed3a9b2b4ed23312e49a9b608bf59ebbd02d..809c934f24978bb4ef2350a1be405676b9174d34 100644 --- a/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-syntax-css.md +++ b/zh-cn/application-dev/reference/js-service-widget-ui/js-service-widget-syntax-css.md @@ -7,8 +7,8 @@ CSS是描述HML页面结构的样式语言。所有组件均存在系统默认 ## 尺寸单位 1. 逻辑像素px(文档中以<length>表示): - 1. 默认卡片具有的逻辑宽度为150px(配置见[配置文件](js-service-widget-config-file.md#window)中的window小节),实际显示时会将页面布局缩放至屏幕实际宽度,如100px在宽度为300的卡片上,实际渲染为200物理像素(从150px向300物理像素,所有尺寸放大2倍)。 - 2. 额外配置autoDesignWidth为true时(配置见[配置文件](js-service-widget-config-file.md#window)中的window小节),逻辑像素px将按照屏幕密度进行缩放,如100px在屏幕密度为3的设备上,实际渲染为300物理像素。应用需要适配多种设备时,建议采用此方法。 + 1. 默认卡片具有的逻辑宽度为150px,实际显示时会将页面布局缩放至屏幕实际宽度,如100px在宽度为300的卡片上,实际渲染为200物理像素(从150px向300物理像素,所有尺寸放大2倍)。 + 2. 额外配置autoDesignWidth为true时,逻辑像素px将按照屏幕密度进行缩放,如100px在屏幕密度为3的设备上,实际渲染为300物理像素。应用需要适配多种设备时,建议采用此方法。 2. 百分比(文档中以<percentage>表示):表示该组件占父组件尺寸的百分比,如组件的width设置为50%,代表其宽度为父组件的50%。 diff --git a/zh-cn/application-dev/ui/ts-pixel-units.md b/zh-cn/application-dev/ui/ts-pixel-units.md index 519a4322eea0ae221078144e959e0036420bc948..0385cfbf9d1a11bf7adb4ab41a09ccac536634b3 100644 --- a/zh-cn/application-dev/ui/ts-pixel-units.md +++ b/zh-cn/application-dev/ui/ts-pixel-units.md @@ -8,7 +8,7 @@ | px | 屏幕物理像素单位。 | | vp | 屏幕密度相关像素,根据屏幕像素密度转换为屏幕物理像素,当数值不带单位时,默认单位vp。 | | fp | 字体像素,与vp类似适用屏幕密度变化,随系统字体大小设置变化。 | -| lpx | 视窗逻辑像素单位,lpx单位为实际屏幕宽度与逻辑宽度(通过[designWidth](../ui/ts-framework-js-tag.md)配置)的比值,designWidth默认值为720。当designWidth为720时,在实际宽度为1440物理像素的屏幕上,1lpx为2px大小。 | +| lpx | 视窗逻辑像素单位,lpx单位为实际屏幕宽度与逻辑宽度(通过[designWidth](../quick-start/package-structure.md)配置)的比值,designWidth默认值为720。当designWidth为720时,在实际宽度为1440物理像素的屏幕上,1lpx为2px大小。 | ## 像素单位转换