x-next 0.0.0-alpha.53 → 0.0.0-alpha.55

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
@@ -27,32 +27,43 @@ app.mount('#app')
27
27
  ### 目前已完成的组件
28
28
 
29
29
  ```
30
- XButton: (typeof import('x-next'))['Button'];
31
- XDialog: (typeof import('x-next'))['Dialog'];
32
- XMessage: (typeof import('x-next'))['Message'];
33
- XMessageBox: (typeof import('x-next'))['MessageBox'];
34
- XNotification: (typeof import('x-next'))['Notification'];
35
- XSpace: (typeof import('x-next'))['Space'];
36
- XPopconfirm: (typeof import('x-next'))['Popconfirm'];
37
- XTrendChart: (typeof import('x-next'))['TrendChart'];
38
- XTimeline: (typeof import('x-next'))['Timeline'];
39
- XTimelineItem: (typeof import('x-next'))['TimelineItem'];
40
- XPopup: (typeof import('x-next'))['Popup'];
41
- XScrollbar: (typeof import('x-next'))['Scrollbar'];
42
- XDrawer: (typeof import('x-next'))['Drawer'];
43
- XTag: (typeof import('x-next'))['Tag'];
44
- XTooltip: (typeof import('x-next'))['Tooltip'];
45
- XImage: (typeof import('x-next'))['Image'];
46
- XImagePreview: (typeof import('x-next'))['ImagePreview'];
47
- XImagePreviewGroup: (typeof import('x-next'))['ImagePreviewGroup'];
48
- XImagePreviewAction: (typeof import('x-next'))['ImagePreviewAction'];
49
- XTabPane: (typeof import('x-next'))['TabPane'];
50
- XTabs: (typeof import('x-next'))['Tabs'];
51
- XButtonGroup: (typeof import('x-next'))['ButtonGroup'];
52
- XDropdown: (typeof import('x-next'))['Dropdown'];
53
- XDropdownButton: (typeof import('x-next'))['DropdownButton'];
54
- XEmpty: (typeof import('x-next'))['Empty'];
55
- XDropdownOption: (typeof import('x-next'))['DropdownOption'];
56
- XDropdownGroup: (typeof import('x-next'))['DropdownGroup'];
57
- XDropdownSubmenu: (typeof import('x-next'))['DropdownSubmenu'];
30
+ XButton: (typeof import('x-next'))['Button'];
31
+ XDialog: (typeof import('x-next'))['Dialog'];
32
+ XMessage: (typeof import('x-next'))['Message'];
33
+ XMessageBox: (typeof import('x-next'))['MessageBox'];
34
+ XNotification: (typeof import('x-next'))['Notification'];
35
+ XSpace: (typeof import('x-next'))['Space'];
36
+ XPopconfirm: (typeof import('x-next'))['Popconfirm'];
37
+ XTrendChart: (typeof import('x-next'))['TrendChart'];
38
+ XTimeline: (typeof import('x-next'))['Timeline'];
39
+ XTimelineItem: (typeof import('x-next'))['TimelineItem'];
40
+ XPopup: (typeof import('x-next'))['Popup'];
41
+ XScrollbar: (typeof import('x-next'))['Scrollbar'];
42
+ XDrawer: (typeof import('x-next'))['Drawer'];
43
+ XTag: (typeof import('x-next'))['Tag'];
44
+ XTooltip: (typeof import('x-next'))['Tooltip'];
45
+ XImage: (typeof import('x-next'))['Image'];
46
+ XImagePreview: (typeof import('x-next'))['ImagePreview'];
47
+ XImagePreviewGroup: (typeof import('x-next'))['ImagePreviewGroup'];
48
+ XImagePreviewAction: (typeof import('x-next'))['ImagePreviewAction'];
49
+ XTabPane: (typeof import('x-next'))['TabPane'];
50
+ XTabs: (typeof import('x-next'))['Tabs'];
51
+ XButtonGroup: (typeof import('x-next'))['ButtonGroup'];
52
+ XDropdown: (typeof import('x-next'))['Dropdown'];
53
+ XDropdownButton: (typeof import('x-next'))['DropdownButton'];
54
+ XEmpty: (typeof import('x-next'))['Empty'];
55
+ XDropdownOption: (typeof import('x-next'))['DropdownOption'];
56
+ XDropdownGroup: (typeof import('x-next'))['DropdownGroup'];
57
+ XDropdownSubmenu: (typeof import('x-next'))['DropdownSubmenu'];
58
+ XInput: (typeof import('x-next'))['Input'];
59
+ XInputGroup: (typeof import('x-next'))['InputGroup'];
60
+ XInputPassword: (typeof import('x-next'))['InputPassword'];
61
+ XInputSearch: (typeof import('x-next'))['InputSearch'];
62
+ XCol: (typeof import('x-next'))['Col'];
63
+ XGrid: (typeof import('x-next'))['Grid'];
64
+ XGridItem: (typeof import('x-next'))['GridItem'];
65
+ XRow: (typeof import('x-next'))['Row'];
66
+ XForm: (typeof import('x-next'))['Form'];
67
+ XFormItem: (typeof import('x-next'))['FormItem'];
68
+ XNetwork: (typeof import('x-next'))['Network'];
58
69
  ```
@@ -9,6 +9,7 @@ export * from './image';
9
9
  export * from './input';
10
10
  export * from './message';
11
11
  export * from './message-box';
12
+ export * from './network';
12
13
  export * from './notification';
13
14
  export * from './popconfirm';
14
15
  export * from './popup';
@@ -0,0 +1,54 @@
1
+ import { PropType } from 'vue';
2
+ import { NetworkSize } from './props';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ size: {
5
+ type: PropType<NetworkSize>;
6
+ default: string;
7
+ };
8
+ /**
9
+ * @zh 信号强度颜色
10
+ * @description 强|中|弱
11
+ */
12
+ signalStrengthColor: {
13
+ type: PropType<string[]>;
14
+ default: () => string[];
15
+ };
16
+ ping: {
17
+ type: PropType<`https://${string}` | `http://${string}`>;
18
+ };
19
+ interval: {
20
+ type: NumberConstructor;
21
+ };
22
+ }>, {
23
+ className: {
24
+ block: string;
25
+ element: (className: string) => string;
26
+ modifier: (className: string) => string;
27
+ is: (className: string) => string;
28
+ };
29
+ cls: import('vue').ComputedRef<string[]>;
30
+ lines: import('vue').Ref<any[], any[]>;
31
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
32
+ size: {
33
+ type: PropType<NetworkSize>;
34
+ default: string;
35
+ };
36
+ /**
37
+ * @zh 信号强度颜色
38
+ * @description 强|中|弱
39
+ */
40
+ signalStrengthColor: {
41
+ type: PropType<string[]>;
42
+ default: () => string[];
43
+ };
44
+ ping: {
45
+ type: PropType<`https://${string}` | `http://${string}`>;
46
+ };
47
+ interval: {
48
+ type: NumberConstructor;
49
+ };
50
+ }>> & Readonly<{}>, {
51
+ size: NetworkSize;
52
+ signalStrengthColor: string[];
53
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
54
+ export default _default;
@@ -0,0 +1,97 @@
1
+ export declare const Network: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
3
+ size: {
4
+ type: import('vue').PropType<import('./props').NetworkSize>;
5
+ default: string;
6
+ };
7
+ signalStrengthColor: {
8
+ type: import('vue').PropType<string[]>;
9
+ default: () => string[];
10
+ };
11
+ ping: {
12
+ type: import('vue').PropType<`https://${string}` | `http://${string}`>;
13
+ };
14
+ interval: {
15
+ type: NumberConstructor;
16
+ };
17
+ }>> & Readonly<{}>, {
18
+ className: {
19
+ block: string;
20
+ element: (className: string) => string;
21
+ modifier: (className: string) => string;
22
+ is: (className: string) => string;
23
+ };
24
+ cls: import('vue').ComputedRef<string[]>;
25
+ lines: import('vue').Ref<any[], any[]>;
26
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
27
+ size: import('./props').NetworkSize;
28
+ signalStrengthColor: string[];
29
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
30
+ P: {};
31
+ B: {};
32
+ D: {};
33
+ C: {};
34
+ M: {};
35
+ Defaults: {};
36
+ }, Readonly<import('vue').ExtractPropTypes<{
37
+ size: {
38
+ type: import('vue').PropType<import('./props').NetworkSize>;
39
+ default: string;
40
+ };
41
+ signalStrengthColor: {
42
+ type: import('vue').PropType<string[]>;
43
+ default: () => string[];
44
+ };
45
+ ping: {
46
+ type: import('vue').PropType<`https://${string}` | `http://${string}`>;
47
+ };
48
+ interval: {
49
+ type: NumberConstructor;
50
+ };
51
+ }>> & Readonly<{}>, {
52
+ className: {
53
+ block: string;
54
+ element: (className: string) => string;
55
+ modifier: (className: string) => string;
56
+ is: (className: string) => string;
57
+ };
58
+ cls: import('vue').ComputedRef<string[]>;
59
+ lines: import('vue').Ref<any[], any[]>;
60
+ }, {}, {}, {}, {
61
+ size: import('./props').NetworkSize;
62
+ signalStrengthColor: string[];
63
+ }>;
64
+ __isFragment?: never;
65
+ __isTeleport?: never;
66
+ __isSuspense?: never;
67
+ } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
68
+ size: {
69
+ type: import('vue').PropType<import('./props').NetworkSize>;
70
+ default: string;
71
+ };
72
+ signalStrengthColor: {
73
+ type: import('vue').PropType<string[]>;
74
+ default: () => string[];
75
+ };
76
+ ping: {
77
+ type: import('vue').PropType<`https://${string}` | `http://${string}`>;
78
+ };
79
+ interval: {
80
+ type: NumberConstructor;
81
+ };
82
+ }>> & Readonly<{}>, {
83
+ className: {
84
+ block: string;
85
+ element: (className: string) => string;
86
+ modifier: (className: string) => string;
87
+ is: (className: string) => string;
88
+ };
89
+ cls: import('vue').ComputedRef<string[]>;
90
+ lines: import('vue').Ref<any[], any[]>;
91
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
92
+ size: import('./props').NetworkSize;
93
+ signalStrengthColor: string[];
94
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
95
+ install(app: import('vue').App): void;
96
+ };
97
+ export { Network as default };
@@ -0,0 +1,4 @@
1
+ export type NetworkSize = 'small' | 'medium' | 'large';
2
+ export type ButtonStatus = 'default' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
3
+ export type ButtonTypes = 'primary' | 'default' | 'dashed' | 'outline' | 'text';
4
+ export type ButtonShape = 'round' | 'circle' | 'square';
@@ -0,0 +1,25 @@
1
+ type NetworkEventListenerCallback = (status: string) => void;
2
+ type NetworkOptions = {
3
+ interval?: number;
4
+ ping?: `https://${string}` | `http://${string}`;
5
+ };
6
+ export declare class Network {
7
+ private static instance;
8
+ private callback;
9
+ private timestamp;
10
+ private timer;
11
+ constructor(callback: NetworkEventListenerCallback, options?: NetworkOptions);
12
+ private updateTimestamp;
13
+ /**
14
+ * 仅内部使用
15
+ * @param callback
16
+ */
17
+ private addEventListener;
18
+ private emitCallback;
19
+ checkNetworkQuality(): 'good' | 'medium' | 'poor' | 'offline';
20
+ private pingNetworkQuality;
21
+ private networkQuality;
22
+ private boot;
23
+ destroy(): void;
24
+ }
25
+ export {};