@ithinkdt/ui 4.0.0 → 4.0.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.
package/dist/index.js CHANGED
@@ -546,7 +546,7 @@ const AppMenu = /* @__PURE__ */ defineComponent({
546
546
  _: o,
547
547
  key: o.key,
548
548
  label: () => e.renderLabel?.(o) ?? o.name,
549
- icon: n === 0 || o.icon ? e.getIcon?.(o.icon) ?? IBookmark : void 0,
549
+ icon: n === 0 || o.icon ? typeof o.icon == "string" ? e.getIcon?.(o.icon, o) ?? IBookmark : o.icon : void 0,
550
550
  children: r ? void 0 : t,
551
551
  path: o.path || (r ? t?.[0]?.path : void 0),
552
552
  depth: n
package/esm/design.d.ts CHANGED
@@ -96,9 +96,9 @@ interface ModuleOptionBase {
96
96
  export interface ModuleOptionGroup extends ModuleOptionBase {
97
97
  type: 'group'
98
98
  /** 图标 */
99
- icon?: string
99
+ icon?: string | Component | undefined
100
100
  /** 子模块 */
101
- children?: (ModuleOptionGroup | ModuleOptionView)[]
101
+ children?: (ModuleOptionGroup | ModuleOptionView)[] | undefined
102
102
  }
103
103
  /** 应用视图模块 */
104
104
  export interface ModuleOptionView extends ModuleOptionBase {
@@ -106,7 +106,7 @@ export interface ModuleOptionView extends ModuleOptionBase {
106
106
  /** 路径 */
107
107
  path: string
108
108
  /** 图标 */
109
- icon?: string
109
+ icon?: string | Component | undefined
110
110
  }
111
111
 
112
112
  export type ModuleOption = ModuleOptionGroup | ModuleOptionView
@@ -116,7 +116,7 @@ export declare const AppMenu: (
116
116
  menus?: ModuleOption[] | undefined
117
117
  collapsed?: boolean | undefined
118
118
  accordion?: boolean | undefined
119
- getIcon?: ((key: string | undefined) => FunctionalComponent) | undefined
119
+ getIcon?: ((key: string | undefined, menu: ModuleOption) => FunctionalComponent) | undefined
120
120
  horizontal?: boolean | undefined
121
121
  single?: boolean | undefined
122
122
  width?: number | undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ithinkdt/ui",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "iThinkDT UI",