From d99731e73a0baef26ab8950fd1ab69c97aeca745 Mon Sep 17 00:00:00 2001 From: aisouler Date: Sun, 18 Feb 2024 22:20:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9B=B8=E5=AF=B9=E5=9D=90=E6=A0=87?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/types.ts b/src/types.ts index 51102e61..50b0d3c9 100644 --- a/src/types.ts +++ b/src/types.ts @@ -373,6 +373,22 @@ type RawAppRuleProps = { * top: 'width*0.0852', * } * ``` + * + * 相对坐标计算公式,以width属性为例(选择目标节点某一个属性即可) + * K为系数,需要计算出具体数值或使用字符串类型填写数学表达式 + * W为鼠标悬停在快照截图上时左边的数值,H为鼠标悬停在快照截图上时右边的数值 + + * right : 'width * K', + * K = ( |需要点击的节点W-目标节点right| ) / 目标节点width + + * left : 'width * K', + * K = ( |需要点击的节点W-目标节点left| ) / 目标节点width + + * top : 'width * K', + * K = ( |需要点击的节点H-目标节点top| ) / 目标节点width + + * bottom : 'width * K', + * K = ( |需要点击的节点H-目标节点bottom| ) / 目标节点width */ export type Position = { /**