From 2e6a77e86b664bb4474f534afa1582718be9cffd Mon Sep 17 00:00:00 2001 From: lisonge Date: Sat, 27 Jan 2024 21:32:30 +0800 Subject: [PATCH] feat: order --- src/types.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/types.ts b/src/types.ts index 80ddb1a1e..b6f0af26b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -6,7 +6,7 @@ type RawCommonProps = { * * 当前规则的冷却时间, 或者执行 action 最小间隔 * - * 默认值: 1000 + * @default 1000 */ actionCd?: number; @@ -83,10 +83,10 @@ type RawCommonProps = { actionMaximum?: number; /** - * 默认值: `activity` - * * 当规则因为 matchTime/actionMaximum 而休眠时, 如何唤醒此规则 * + * @default 'activity' + * * @example * 'activity' * // 当 activity 刷新时, 唤醒规则 @@ -117,6 +117,18 @@ type RawCommonProps = { */ actionMaximumKey?: number; + /** + * 规则参与匹配的顺序, 数字越小越先匹配 + * + * 如果两个规则 order 相同, 按照 groups 中的声明顺序匹配, app 类型规则顺序优先于 global 类型规则 + * + * 属于不同订阅的规则按照订阅列表中顺序执行, 长按订阅卡片可以拖动排序 + * + * @default 0 + * + */ + order?: number; + /** * 当前 规则/规则组 的快照链接, 增强订阅可维护性 */