@cocoar/vue-ui 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,21 @@ type __VLS_Props = {
27
27
  * the user can fire several link items in a row.
28
28
  */
29
29
  to?: RouteLocationRaw | string;
30
+ /**
31
+ * Whether this item is currently active. Used for menu items that
32
+ * represent a current selection (e.g. view-mode toggle: "✓ List view",
33
+ * settings sub-menu: "✓ Light theme", context-menu sort indicators).
34
+ *
35
+ * If `to` is set and `active` is left undefined, the active state is
36
+ * inferred from `RouterLink`'s `isActive` — drift between consumer-
37
+ * computed `route.path === '/x'` and the router's own matching is
38
+ * eliminated. Setting `active` explicitly always wins (use for non-route
39
+ * active states like "current selection").
40
+ *
41
+ * The menu still auto-closes when an active item is clicked (the active
42
+ * state is visible WHILE the menu is open — that's when it matters).
43
+ */
44
+ active?: boolean;
30
45
  /** Disabled state */
31
46
  disabled?: boolean;
32
47
  };
@@ -52,6 +67,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
52
67
  disabled: boolean;
53
68
  to: RouteLocationRaw | string;
54
69
  icon: string;
70
+ active: boolean;
55
71
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
56
72
  itemRef: HTMLDivElement;
57
73
  }, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"CoarMenuItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/menu/CoarMenuItem.vue"],"names":[],"mappings":"AA2WA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAInD,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,YAAY,IAAI,IAAI,CAAC;IACrB,2BAA2B;IAC3B,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,KAAK,WAAW,GAAG;IACf,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,C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