py-test-component 1.0.10 → 1.0.11
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/package.json +1 -1
- package/index.d.ts +0 -80
package/package.json
CHANGED
package/index.d.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// ============================================
|
|
2
|
-
// py-test-component - TypeScript 类型定义
|
|
3
|
-
// ============================================
|
|
4
|
-
|
|
5
|
-
declare module 'py-test-component' {
|
|
6
|
-
export interface PyComponentStore {
|
|
7
|
-
set(config: Record<string, any>): void;
|
|
8
|
-
get(key?: string): any;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const store: PyComponentStore;
|
|
12
|
-
export function init(config?: Record<string, any>): void;
|
|
13
|
-
|
|
14
|
-
const _default: {
|
|
15
|
-
init: typeof init;
|
|
16
|
-
store: PyComponentStore;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare module 'py-test-component/vue' {
|
|
22
|
-
import { Component } from 'vue';
|
|
23
|
-
|
|
24
|
-
/** 表格组件 - Vue 版本 */
|
|
25
|
-
export const PyTable: Component;
|
|
26
|
-
/** 天气组件 - Vue 版本 */
|
|
27
|
-
export const PyWeather: Component;
|
|
28
|
-
|
|
29
|
-
const _default: {
|
|
30
|
-
PyTable: typeof PyTable;
|
|
31
|
-
PyWeather: typeof PyWeather;
|
|
32
|
-
};
|
|
33
|
-
export default _default;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare module 'py-test-component/react' {
|
|
37
|
-
import { ReactNode, Ref, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
38
|
-
|
|
39
|
-
export interface PyTableProps {
|
|
40
|
-
/** 表格数据 */
|
|
41
|
-
data?: Record<string, any>[];
|
|
42
|
-
/** 加载中的占位内容 */
|
|
43
|
-
loading?: ReactNode;
|
|
44
|
-
/** 其他 HTML 属性 */
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface PyWeatherProps {
|
|
49
|
-
/** 城市名称 */
|
|
50
|
-
city?: string;
|
|
51
|
-
/** 加载中的占位内容 */
|
|
52
|
-
loading?: ReactNode;
|
|
53
|
-
/** 其他 HTML 属性 */
|
|
54
|
-
[key: string]: any;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface PyComponentRef {
|
|
58
|
-
/** 获取 DOM 元素 */
|
|
59
|
-
getElement: () => HTMLElement | null;
|
|
60
|
-
/** 是否已加载完成 */
|
|
61
|
-
loaded: boolean;
|
|
62
|
-
/** 加载错误信息 */
|
|
63
|
-
error: Error | null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/** 表格组件 - React 版本 */
|
|
67
|
-
export const PyTable: ForwardRefExoticComponent<PyTableProps & RefAttributes<PyComponentRef>>;
|
|
68
|
-
|
|
69
|
-
/** 天气组件 - React 版本 */
|
|
70
|
-
export const PyWeather: ForwardRefExoticComponent<PyWeatherProps & RefAttributes<PyComponentRef>>;
|
|
71
|
-
|
|
72
|
-
/** 初始化组件库 */
|
|
73
|
-
export function initPyComponent(config?: Record<string, any>): Promise<any>;
|
|
74
|
-
|
|
75
|
-
/** 获取全局 store */
|
|
76
|
-
export function getStore(): Record<string, any> | null;
|
|
77
|
-
|
|
78
|
-
/** 预加载组件库(可提前调用以加速渲染) */
|
|
79
|
-
export function preloadPyComponent(): Promise<any>;
|
|
80
|
-
}
|