@airpower/web 1.4.5 → 1.5.0

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/README.md CHANGED
@@ -44,7 +44,7 @@ cnpm install @airpower/web
44
44
 
45
45
  ## 📖 参考文档
46
46
 
47
- 计划中,请稍后。
47
+ 使用前建议阅读我们的 [开发文档](./docs/README.md) 或 [源代码](./src)。
48
48
 
49
49
  ## ⏰ 欢迎反馈
50
50
 
@@ -17,7 +17,7 @@ declare const _default: <E extends RootEntity>(__VLS_props: NonNullable<Awaited<
17
17
  };
18
18
  readonly: boolean;
19
19
  disabledValue: string | number | boolean | unknown[] | Record<string, any>;
20
- tree: ITree[];
20
+ tree: (ITree & E)[];
21
21
  }> & Omit<{
22
22
  readonly disabled: boolean;
23
23
  readonly entity: ITransformerConstructor<E>;
@@ -32,7 +32,7 @@ declare const _default: <E extends RootEntity>(__VLS_props: NonNullable<Awaited<
32
32
  readonly readonly: boolean;
33
33
  readonly list?: IEnum<number>[] | undefined;
34
34
  readonly disabledValue?: string | number | boolean | unknown[] | Record<string, any> | undefined;
35
- readonly tree?: ITree[] | undefined;
35
+ readonly tree?: (ITree & E)[] | undefined;
36
36
  readonly onClear?: (() => any) | undefined;
37
37
  readonly onBlur?: (() => any) | undefined;
38
38
  readonly onChanged?: ((value: E) => any) | undefined;
@@ -2,7 +2,7 @@ import { IEnum } from '@airpower/enum';
2
2
  import { ITransformerConstructor } from '@airpower/transformer';
3
3
  import { ITree } from '../../interface/ITree';
4
4
  import { RootEntity } from '../../model/RootEntity';
5
- declare const _default: <E extends RootEntity, T extends ITree, EM extends IEnum>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ declare const _default: <E extends RootEntity, T extends ITree & E, EM extends IEnum>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: __VLS_PrettifyLocal<Pick<Partial<{
7
7
  disabled: boolean;
8
8
  placeholder: string;
package/dist/index.d.ts CHANGED
@@ -52,7 +52,6 @@ export * from './http/Http';
52
52
  export * from './http/HttpResponse';
53
53
  export * from './http/type';
54
54
  export * from './i18n/WebI18n';
55
- export * from './interface/IEntity';
56
55
  export * from './interface/IFile';
57
56
  export * from './interface/IMenu';
58
57
  export * from './interface/IPayload';
@@ -1,10 +1,9 @@
1
- import { IEntity } from './IEntity';
2
1
  /**
3
2
  * ### 树形结构
4
3
  *
5
4
  * @author Hamm.cn
6
5
  */
7
- export interface ITree extends IEntity {
6
+ export interface ITree {
8
7
  /**
9
8
  * ### 树的子节点
10
9
  * 为了成功的数据转换,请注意自行 `@Type`
@@ -1,11 +1,10 @@
1
- import { IEntity } from '../interface/IEntity';
2
1
  import { RootModel } from './RootModel';
3
2
  /**
4
3
  * ### 实体模型
5
4
  *
6
5
  * @author Hamm.cn
7
6
  */
8
- export declare class RootEntity extends RootModel implements IEntity {
7
+ export declare class RootEntity extends RootModel {
9
8
  id: number;
10
9
  /**
11
10
  * ### 是否禁用
@@ -1,5 +1,6 @@
1
1
  import { Router, RouteRecordRaw } from 'vue-router';
2
2
  import { IMenu } from '../interface/IMenu';
3
+ import { RootEntity } from '../model/RootEntity';
3
4
  /**
4
5
  * ### `Vue` 路由助手
5
6
  * @author Hamm.cn
@@ -25,7 +26,7 @@ export declare class RouterUtil {
25
26
  * @param parentRouter `可选` 父级路由 默认 `admin`
26
27
  * @param menuCacheKey `可选` 缓存Key 默认 `AirPowerMenuList`
27
28
  */
28
- static initVueRouter(menuList: IMenu[], components?: Record<string, () => Promise<unknown>>, componentsDirectory?: string, parentRouter?: string, menuCacheKey?: string): void;
29
+ static initVueRouter(menuList: Array<IMenu & RootEntity>, components?: Record<string, () => Promise<unknown>>, componentsDirectory?: string, parentRouter?: string, menuCacheKey?: string): void;
29
30
  /**
30
31
  * ### 创建 `Vue` 路由实例
31
32
  * @param routes 路由配置文件
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "1.4.5",
4
+ "version": "1.5.0",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",
@@ -1,11 +0,0 @@
1
- /**
2
- * ### 实体接口
3
- *
4
- * @author Hamm.cn
5
- */
6
- export interface IEntity {
7
- /**
8
- * ### 主键 `ID`
9
- */
10
- id: number;
11
- }