agile-core 3.0.8 → 3.0.9

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.
@@ -1,80 +1,80 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module '*.vue' {
4
- import type { DefineComponent } from 'vue'
5
- const component: DefineComponent<{}, {}, any>
6
- export default component
7
- }
8
-
9
- // 为 Vite define 配置的全局变量添加类型声明
10
- declare const __AUI_CONFIG__: {
11
- tagPrefix: string;
12
- buildTime: string;
13
- [key: string]: any;
14
- };
15
-
16
- declare module '@auicore' {
17
-
18
- interface Component {
19
- name?: string;
20
-
21
- // 数据和属性
22
- data?: () => Record<string, any>;
23
- props?: string[] | Record<string, any>;
24
- computed?: Record<string, any>;
25
- methods?: Record<string, Function>;
26
- watch?: Record<string, any>;
27
-
28
- // 生命周期钩子
29
- beforeCreate?(): void;
30
- created?(): void;
31
- beforeMount?(): void;
32
- mounted?(): void;
33
- beforeUpdate?(): void;
34
- updated?(): void;
35
- beforeUnmount?(): void;
36
- unmounted?(): void;
37
- activated?(): void;
38
- deactivated?(): void;
39
-
40
- // 组件选项
41
- components?: Record<string, any>;
42
- directives?: Record<string, any>;
43
- filters?: Record<string, any>;
44
- mixins?: any[];
45
- extends?: any;
46
-
47
- // 模板选项
48
- template?: string;
49
- render?: Function;
50
-
51
- // AUI 特有的钩子
52
- auiInit?(): void;
53
-
54
- // 允许任意属性
55
- [key: string]: any;
56
- }
57
-
58
- type HookHandler = (c: Component) => void | Component;
59
-
60
- export { HookHandler, Component };
61
-
62
- interface AuiCoreType {
63
- /**
64
- * 对现有组件进行hook
65
- * @param name 组件完整标签名,比如aui-my-comp
66
- * @param handle hook处理函数
67
- */
68
- hookStructure(tagName: string, handle: HookHandler): void;
69
- /**
70
- * 定义组件,如果force为true,则如果组件已经定义过,则会强制重新定义
71
- * @param v
72
- * @param force
73
- */
74
- define(v: Component, force?: boolean): Component;
75
- // 其他方法可以根据需要添加
76
- }
77
-
78
- const AuiCore: AuiCoreType;
79
- export default AuiCore;
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue'
5
+ const component: DefineComponent<{}, {}, any>
6
+ export default component
7
+ }
8
+
9
+ // 为 Vite define 配置的全局变量添加类型声明
10
+ declare const __AUI_CONFIG__: {
11
+ tagPrefix: string;
12
+ buildTime: string;
13
+ [key: string]: any;
14
+ };
15
+
16
+ declare module '@auicore' {
17
+
18
+ interface Component {
19
+ name?: string;
20
+
21
+ // 数据和属性
22
+ data?: () => Record<string, any>;
23
+ props?: string[] | Record<string, any>;
24
+ computed?: Record<string, any>;
25
+ methods?: Record<string, Function>;
26
+ watch?: Record<string, any>;
27
+
28
+ // 生命周期钩子
29
+ beforeCreate?(): void;
30
+ created?(): void;
31
+ beforeMount?(): void;
32
+ mounted?(): void;
33
+ beforeUpdate?(): void;
34
+ updated?(): void;
35
+ beforeUnmount?(): void;
36
+ unmounted?(): void;
37
+ activated?(): void;
38
+ deactivated?(): void;
39
+
40
+ // 组件选项
41
+ components?: Record<string, any>;
42
+ directives?: Record<string, any>;
43
+ filters?: Record<string, any>;
44
+ mixins?: any[];
45
+ extends?: any;
46
+
47
+ // 模板选项
48
+ template?: string;
49
+ render?: Function;
50
+
51
+ // AUI 特有的钩子
52
+ auiInit?(): void;
53
+
54
+ // 允许任意属性
55
+ [key: string]: any;
56
+ }
57
+
58
+ type HookHandler = (c: Component) => void | Component;
59
+
60
+ export { HookHandler, Component };
61
+
62
+ interface AuiCoreType {
63
+ /**
64
+ * 对现有组件进行hook
65
+ * @param name 组件完整标签名,比如aui-my-comp
66
+ * @param handle hook处理函数
67
+ */
68
+ hookStructure(tagName: string, handle: HookHandler): void;
69
+ /**
70
+ * 定义组件,如果force为true,则如果组件已经定义过,则会强制重新定义
71
+ * @param v
72
+ * @param force
73
+ */
74
+ define(v: Component, force?: boolean): Component;
75
+ // 其他方法可以根据需要添加
76
+ }
77
+
78
+ const AuiCore: AuiCoreType;
79
+ export default AuiCore;
80
80
  }
@@ -1,36 +1,36 @@
1
- import { ComponentCustomProperties } from 'vue';
2
- import { AuiComponent } from '../core/aui';
3
-
4
- declare module '@vue/runtime-core' {
5
- interface ComponentCustomProperties {
6
- /**
7
- * 设置或者获取原生DOM的value值,当没有参数时是获取,否则为设置
8
- * @param v 要设置的value值
9
- * @returns 原生DOM的value值
10
- */
11
- $value: (v?: any) => any;
12
-
13
- /**
14
- * 将任意数据转为字符串数组
15
- * @param s 要转为数组的数据
16
- * @returns 字符串数组
17
- */
18
- $anyToArray: (s: any) => string[];
19
-
20
- /**
21
- * VUE组件对应的AUI原生DOM对象
22
- * @returns AUI原生DOM对象;
23
- */
24
- $aui: () => AuiComponent | null;
25
-
26
- /**
27
- * 调用AUI原生DOM的方法
28
- * @param name 方法名
29
- * @param args 参数
30
- * @returns 方法返回值
31
- */
32
- $xcall: (name?: string, ...args: any[]) => any;
33
- }
34
- }
35
-
1
+ import { ComponentCustomProperties } from 'vue';
2
+ import { AuiComponent } from '../core/aui';
3
+
4
+ declare module '@vue/runtime-core' {
5
+ interface ComponentCustomProperties {
6
+ /**
7
+ * 设置或者获取原生DOM的value值,当没有参数时是获取,否则为设置
8
+ * @param v 要设置的value值
9
+ * @returns 原生DOM的value值
10
+ */
11
+ $value: (v?: any) => any;
12
+
13
+ /**
14
+ * 将任意数据转为字符串数组
15
+ * @param s 要转为数组的数据
16
+ * @returns 字符串数组
17
+ */
18
+ $anyToArray: (s: any) => string[];
19
+
20
+ /**
21
+ * VUE组件对应的AUI原生DOM对象
22
+ * @returns AUI原生DOM对象;
23
+ */
24
+ $aui: () => AuiComponent | null;
25
+
26
+ /**
27
+ * 调用AUI原生DOM的方法
28
+ * @param name 方法名
29
+ * @param args 参数
30
+ * @returns 方法返回值
31
+ */
32
+ $xcall: (name?: string, ...args: any[]) => any;
33
+ }
34
+ }
35
+
36
36
  export { };