@witlink/components 0.0.3 → 0.0.4

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
@@ -1,5 +1,32 @@
1
- # Vue 3 + TypeScript + Vite
1
+ ## @witlink/components 库介绍
2
+ > Witlink公共组件库,仅包含与业务无关的组件、指令、勾子、工具方法等。持续完善中。。。
2
3
 
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+ ### 如何使用@witlink/components
5
+ ##### 1. 安装@witlink/components
4
6
 
5
- Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
7
+ ```bash
8
+ npm install @witlink/components
9
+ ```
10
+ ##### 2. 使用@witlink/components
11
+
12
+ + 全局引入
13
+
14
+ ```js
15
+ import WitlinkComponents from '@witlink/components'
16
+
17
+ const app = createApp(App)
18
+ app.use(WitlinkComponents)
19
+ ```
20
+
21
+ + 按需引入
22
+
23
+ ```js
24
+ import { WlSplitter, permission, useComponentRef, useRequire, isNullOrUndef, exportFile } from '@witlink/components'
25
+
26
+ ```
27
+ + 工具类方法也可以从utils目录引入
28
+
29
+ ```js
30
+ import { isNullOrUndef, exportFile } from '@witlink/components/utils'
31
+
32
+ ```
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .m-xs{margin:4px}.p-xs{padding:4px}.mt-xs{margin-top:4px}.mr-xs{margin-right:4px}.mb-xs{margin-bottom:4px}.ml-xs{margin-left:4px}.mx-xs{margin-left:4px;margin-right:4px}.my-xs{margin-top:4px;margin-bottom:4px}.pt-xs{padding-top:4px}.pr-xs{padding-right:4px}.pb-xs{padding-bottom:4px}.pl-xs{padding-left:4px}.px-xs{padding-left:4px;padding-right:4px}.py-xs{padding-top:4px;padding-bottom:4px}.br-xs{border-radius:4px}.brtl-xs{border-top-left-radius:4px}.brtr-xs{border-top-right-radius:4px}.brbl-xs{border-bottom-left-radius:4px}.brbr-xs{border-bottom-right-radius:4px}.m-sm{margin:8px}.p-sm{padding:8px}.mt-sm{margin-top:8px}.mr-sm{margin-right:8px}.mb-sm{margin-bottom:8px}.ml-sm{margin-left:8px}.mx-sm{margin-left:8px;margin-right:8px}.my-sm{margin-top:8px;margin-bottom:8px}.pt-sm{padding-top:8px}.pr-sm{padding-right:8px}.pb-sm{padding-bottom:8px}.pl-sm{padding-left:8px}.px-sm{padding-left:8px;padding-right:8px}.py-sm{padding-top:8px;padding-bottom:8px}.br-sm{border-radius:8px}.brtl-sm{border-top-left-radius:8px}.brtr-sm{border-top-right-radius:8px}.brbl-sm{border-bottom-left-radius:8px}.brbr-sm{border-bottom-right-radius:8px}.m-nm{margin:16px}.p-nm{padding:16px}.mt-nm{margin-top:16px}.mr-nm{margin-right:16px}.mb-nm{margin-bottom:16px}.ml-nm{margin-left:16px}.mx-nm{margin-left:16px;margin-right:16px}.my-nm{margin-top:16px;margin-bottom:16px}.pt-nm{padding-top:16px}.pr-nm{padding-right:16px}.pb-nm{padding-bottom:16px}.pl-nm{padding-left:16px}.px-nm{padding-left:16px;padding-right:16px}.py-nm{padding-top:16px;padding-bottom:16px}.br-nm{border-radius:16px}.brtl-nm{border-top-left-radius:16px}.brtr-nm{border-top-right-radius:16px}.brbl-nm{border-bottom-left-radius:16px}.brbr-nm{border-bottom-right-radius:16px}.m-lg{margin:24px}.p-lg{padding:24px}.mt-lg{margin-top:24px}.mr-lg{margin-right:24px}.mb-lg{margin-bottom:24px}.ml-lg{margin-left:24px}.mx-lg{margin-left:24px;margin-right:24px}.my-lg{margin-top:24px;margin-bottom:24px}.pt-lg{padding-top:24px}.pr-lg{padding-right:24px}.pb-lg{padding-bottom:24px}.pl-lg{padding-left:24px}.px-lg{padding-left:24px;padding-right:24px}.py-lg{padding-top:24px;padding-bottom:24px}.br-lg{border-radius:24px}.brtl-lg{border-top-left-radius:24px}.brtr-lg{border-top-right-radius:24px}.brbl-lg{border-bottom-left-radius:24px}.brbr-lg{border-bottom-right-radius:24px}.m-auto{margin:auto}.p-auto{padding:auto}.mt-auto{margin-top:auto}.mr-auto{margin-right:auto}.mb-auto{margin-bottom:auto}.ml-auto{margin-left:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.pt-auto{padding-top:auto}.pr-auto{padding-right:auto}.pb-auto{padding-bottom:auto}.pl-auto{padding-left:auto}.px-auto{padding-left:auto;padding-right:auto}.py-auto{padding-top:auto;padding-bottom:auto}.br-auto{border-radius:auto}.brtl-auto{border-top-left-radius:auto}.brtr-auto{border-top-right-radius:auto}.brbl-auto{border-bottom-left-radius:auto}.brbr-auto{border-bottom-right-radius:auto}.b-none{border:none}.bl-none{border-left:none}.br-none{border-right:none}.bt-none{border-top:none}.bb-none{border-bottom:none}.b-none-important{border:none!important}.bl-none-important{border-left:none!important}.br-none-important{border-right:none!important}.bt-none-important{border-top:none!important}.bb-none-important{border-bottom:none!important}.position-r{position:relative}.position-a{position:absolute}.position-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.float-left{float:left}.float-right{float:right}.clearfix{zoom:1}.clearfix:after{display:table;clear:both;content:""}.ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis-2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.width-100{width:100%}.max-width-100{max-width:100%}.pointer{cursor:pointer}.pointer-none{pointer-events:none}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-underline{text-decoration:underline}.nowrap{white-space:nowrap}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.flex{display:flex}.flex-1{flex:1}.flex-auto{flex:auto}.flex-none{flex:none}.flex-sc{display:flex;justify-content:flex-start;align-items:center}.flex-ac{display:flex;justify-content:space-around;align-items:center}.flex-bc{display:flex;justify-content:space-between;align-items:center}.flex-cc{display:flex;justify-content:center;align-items:center}.flex-evenly{display:flex;justify-content:space-evenly;align-items:center}.flex-ce{display:flex;justify-content:center;align-items:flex-end}.flex-cs{display:flex;justify-content:center;align-items:flex-start}.flex-ec{display:flex;justify-content:flex-end;align-items:center}.flex-wrap{flex-flow:wrap}.flex-column{flex-direction:column}.font-bold{font-weight:700}::-webkit-scrollbar{width:5px;height:8px}::-webkit-scrollbar-thumb{background-color:#aaaaaa69;border-radius:6px}::-webkit-scrollbar-track{background-color:transparent;transition:background-color .2s linear,width .2s ease-in-out}::-webkit-scrollbar-corner{background-color:#0000}.icon{display:inline-block;width:16px;height:16px;vertical-align:-3px}.icon.icon-sm{width:14px;height:14px}.icon:focus{outline:none}.icon.icon-lg{width:20px;height:20px}.icon.icon-xl{width:24px;height:24px}.icon.icon-xxl{width:32px;height:32px}.icon.icon-xxxl{width:48px;height:48px}.splitter[data-v-385ad393]{width:100%;height:100%;display:flex;flex-direction:row}.my-left[data-v-385ad393],.my-right[data-v-385ad393]{height:100%;z-index:1}.my-spliter[data-v-385ad393]{cursor:col-resize;position:relative;z-index:2;-webkit-user-select:none;user-select:none}.my-spliter[data-v-385ad393]:before{content:"";position:absolute;top:50%;left:50%;width:2px;height:100%;transform:translate(-50%,-50%);background-color:#0000000a}.my-spliter[data-v-385ad393]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:30px;transform:translate(-50%,-50%);background-color:#00000026}.my-spliter[data-v-385ad393]:hover:before{background-color:#00000026}
package/dist/index.d.ts CHANGED
@@ -1,51 +1,198 @@
1
+ import { App } from 'vue';
1
2
  import { ComponentOptionsMixin } from 'vue';
2
3
  import { ComponentProvideOptions } from 'vue';
3
- import { default as default_2 } from 'bpmn-js/lib/Modeler';
4
4
  import { DefineComponent } from 'vue';
5
+ import { ObjectDirective } from 'vue';
5
6
  import { PublicProps } from 'vue';
6
7
 
7
- declare const _default: {
8
- Bpmn: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
9
- BpmnPropertiesPanel: DefineComponent<globalThis.ExtractPropTypes<{
10
- modeler: {
11
- type: default_2;
12
- };
13
- isEdit: {
14
- type: BooleanConstructor;
15
- };
16
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
17
- modeler: {
18
- type: default_2;
19
- };
20
- isEdit: {
21
- type: BooleanConstructor;
8
+ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
9
+ leftMin: {
10
+ type: NumberConstructor;
11
+ default: number;
12
+ };
13
+ leftMax: {
14
+ type: NumberConstructor;
15
+ default: number;
16
+ };
17
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
18
+ leftMin: {
19
+ type: NumberConstructor;
20
+ default: number;
21
+ };
22
+ leftMax: {
23
+ type: NumberConstructor;
24
+ default: number;
25
+ };
26
+ }>> & Readonly<{}>, {
27
+ leftMin: number;
28
+ leftMax: number;
29
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
30
+ container: HTMLDivElement;
31
+ spliter: HTMLDivElement;
32
+ }, HTMLDivElement>;
33
+
34
+ declare function __VLS_template(): {
35
+ attrs: Partial<{}>;
36
+ slots: {
37
+ left?(_: {}): any;
38
+ right?(_: {}): any;
22
39
  };
23
- }>> & Readonly<{}>, {
24
- isEdit: boolean;
25
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
26
- BpmnToolbar: DefineComponent<globalThis.ExtractPropTypes<{
27
- modeler: {
28
- type: default_2;
40
+ refs: {
41
+ container: HTMLDivElement;
42
+ spliter: HTMLDivElement;
29
43
  };
30
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
31
- save: (...args: any[]) => void;
32
- }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
33
- modeler: {
34
- type: default_2;
44
+ rootEl: HTMLDivElement;
45
+ };
46
+
47
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
48
+
49
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
35
52
  };
36
- }>> & Readonly<{
37
- onSave?: (...args: any[]) => any;
38
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
53
+ };
54
+
55
+ declare const _default: {
39
56
  install: typeof install;
40
- setHttpConfig: typeof setHttpConfig;
41
57
  };
42
58
  export default _default;
43
59
 
44
- declare function install(app: any, options: any): void;
60
+ /**
61
+ * 下载文件
62
+ */
63
+ export declare function exportFile(options: {
64
+ fileData: any;
65
+ name: string;
66
+ }): void;
67
+
68
+ export declare function getButtonPermissions(): any;
69
+
70
+ export declare function getLocale(): string | null;
71
+
72
+ export declare function getMenuInfo(): any;
73
+
74
+ export declare function getToken(): string | null;
75
+
76
+ export declare function getUserCenterParams(): UserCenterParams;
77
+
78
+ export declare function getUserCenterParamsByUrl(): Record<string, string>;
79
+
80
+ export declare function getUserInfo(key?: string | Array<string> | null): any;
81
+
82
+ export declare function hasPermission(id: string): boolean;
83
+
84
+ declare function install(app: App): void;
85
+
86
+ /**
87
+ * @description: 判断值是否未某个类型
88
+ */
89
+ export declare function is(val: unknown, type: string): boolean;
90
+
91
+ /**
92
+ * @description: 是否为数组
93
+ */
94
+ export declare function isArray(val: any): val is Array<any>;
95
+
96
+ /**
97
+ * @description: 是否为AsyncFunction
98
+ */
99
+ export declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
100
+
101
+ /**
102
+ * @description: 是否为boolean类型
103
+ */
104
+ export declare function isBoolean(val: unknown): val is boolean;
105
+
106
+ /**
107
+ * @description: 是否客户端
108
+ */
109
+ export declare const isClient: () => boolean;
45
110
 
46
- declare function setHttpConfig(config: {
47
- baseUrl?: string;
111
+ /**
112
+ * @description: 是否为时间
113
+ */
114
+ export declare function isDate(val: unknown): val is Date;
115
+
116
+ /**
117
+ * @description: 是否已定义
118
+ */
119
+ export declare const isDef: <T = unknown>(val?: T) => val is T;
120
+
121
+ export declare const isElement: (val: unknown) => val is Element;
122
+
123
+ /**
124
+ * @description: 是否为函数
125
+ */
126
+ export declare function isFunction<T = Function>(val: unknown): val is T;
127
+
128
+ export declare function isImageDom(o: Element): boolean;
129
+
130
+ export declare function isNull(val: unknown): val is null;
131
+
132
+ export declare function isNullOrUndef(val: unknown): val is null | undefined;
133
+
134
+ /**
135
+ * @description: 是否为数值
136
+ */
137
+ export declare function isNumber(val: unknown): val is number;
138
+
139
+ /**
140
+ * @description: 是否为对象
141
+ */
142
+ export declare const isObject: (val: any) => val is Record<any, any>;
143
+
144
+ /**
145
+ * @description: 是否为promise
146
+ */
147
+ export declare function isPromise<T = any>(val: any): val is Promise<T>;
148
+
149
+ export declare const isServer: boolean;
150
+
151
+ /**
152
+ * @description: 是否为字符串
153
+ */
154
+ export declare function isString(val: unknown): val is string;
155
+
156
+ export declare const isUndef: <T = unknown>(val?: T) => val is T;
157
+
158
+ /**
159
+ * @description: 是否为浏览器
160
+ */
161
+ export declare const isWindow: (val: any) => val is Window;
162
+
163
+ export declare function logoutToUserCenter(): void;
164
+
165
+ /**
166
+ * 按钮级权限控制指令
167
+ */
168
+ export declare const permission: ObjectDirective;
169
+
170
+ export declare function removeAll(): void;
171
+
172
+ export declare function removeLocale(): void;
173
+
174
+ export declare function removeToken(): void;
175
+
176
+ export declare function setLocale(locale: string): void;
177
+
178
+ export declare function setMenuInfo(menuInfo: any): void;
179
+
180
+ export declare function setToken(token: string): void;
181
+
182
+ export declare function setUserCenterParams(params: UserCenterParams): void;
183
+
184
+ export declare function setUserInfo(userInfo?: any): void;
185
+
186
+ export declare function toUserCenterConsole(): void;
187
+
188
+ export declare const UserCenterKey = "Witlink-Usercenter";
189
+
190
+ export declare type UserCenterParams = {
48
191
  token?: string;
49
- }): void;
192
+ lang?: string;
193
+ usercenterUrl?: string;
194
+ };
195
+
196
+ export declare const WlSplitter: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
50
197
 
51
198
  export { }
package/dist/index.js ADDED
@@ -0,0 +1,136 @@
1
+ import { defineComponent as x, ref as c, onMounted as C, onUnmounted as E, createElementBlock as L, openBlock as O, createElementVNode as m, normalizeStyle as _, unref as h, renderSlot as S } from "vue";
2
+ import { hasPermission as P } from "./utils.js";
3
+ import { UserCenterKey as z, exportFile as X, getButtonPermissions as A, getLocale as R, getMenuInfo as Y, getToken as K, getUserCenterParams as V, getUserCenterParamsByUrl as q, getUserInfo as G, is as H, isArray as J, isAsyncFunction as Q, isBoolean as Z, isClient as ee, isDate as te, isDef as ne, isElement as oe, isFunction as se, isImageDom as ie, isNull as re, isNullOrUndef as le, isNumber as ce, isObject as ae, isPromise as ue, isServer as me, isString as fe, isUndef as de, isWindow as ve, logoutToUserCenter as pe, removeAll as ge, removeLocale as ye, removeToken as _e, setLocale as he, setMenuInfo as Se, setToken as be, setUserCenterParams as Me, setUserInfo as Ue, toUserCenterConsole as xe } from "./utils.js";
4
+ const k = /* @__PURE__ */ x({
5
+ __name: "index",
6
+ props: {
7
+ leftMin: {
8
+ type: Number,
9
+ default: 0.1
10
+ },
11
+ leftMax: {
12
+ type: Number,
13
+ default: 0.3
14
+ }
15
+ },
16
+ setup(t) {
17
+ const e = t, o = c(), s = c(), i = c({}), f = c({}), d = c(0.2);
18
+ function v(n) {
19
+ i.value = { width: `calc(${n * 100}% - 5px)` }, f.value = { width: `calc(${(1 - n) * 100}% - 5px)` };
20
+ }
21
+ function p() {
22
+ const n = o.value;
23
+ if (!n)
24
+ return;
25
+ const g = n.clientWidth, l = n.getBoundingClientRect(), U = l.left;
26
+ function y(r) {
27
+ r.preventDefault(), (r.clientX < l.left || r.clientX > l.right || r.clientY < l.top || r.clientY > l.bottom) && u();
28
+ const a = (r.clientX - U) / g;
29
+ a > e.leftMin && a < e.leftMax && (d.value = a, v(a));
30
+ }
31
+ function u() {
32
+ document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", u);
33
+ }
34
+ document.addEventListener("mousemove", y), document.addEventListener("mouseup", u);
35
+ }
36
+ return C(() => {
37
+ v(d.value), s.value && s.value.addEventListener("mousedown", p, !1);
38
+ }), E(() => {
39
+ s.value && s.value.removeEventListener("mousedown", p);
40
+ }), (n, g) => (O(), L("div", {
41
+ ref_key: "container",
42
+ ref: o,
43
+ class: "splitter"
44
+ }, [
45
+ m("div", {
46
+ class: "my-left",
47
+ style: _(h(i))
48
+ }, [
49
+ S(n.$slots, "left", {}, void 0, !0)
50
+ ], 4),
51
+ m("div", {
52
+ ref_key: "spliter",
53
+ ref: s,
54
+ style: { height: "100%", width: "10px" },
55
+ class: "my-spliter"
56
+ }, null, 512),
57
+ m("div", {
58
+ class: "my-right",
59
+ style: _(h(f))
60
+ }, [
61
+ S(n.$slots, "right", {}, void 0, !0)
62
+ ], 4)
63
+ ], 512));
64
+ }
65
+ }), j = (t, e) => {
66
+ const o = t.__vccOpts || t;
67
+ for (const [s, i] of e)
68
+ o[s] = i;
69
+ return o;
70
+ }, N = /* @__PURE__ */ j(k, [["__scopeId", "data-v-385ad393"]]), b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
71
+ __proto__: null,
72
+ WlSplitter: N
73
+ }, Symbol.toStringTag, { value: "Module" })), T = {
74
+ beforeMount(t, e) {
75
+ const { value: o } = e;
76
+ o && (P(o) || setTimeout(() => {
77
+ var i;
78
+ (i = t.parentNode) == null || i.removeChild(t);
79
+ }, 50));
80
+ }
81
+ }, M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
+ __proto__: null,
83
+ permission: T
84
+ }, Symbol.toStringTag, { value: "Module" }));
85
+ function w(t) {
86
+ Object.keys(b).forEach((e) => {
87
+ t.component(e, b[e]);
88
+ }), Object.keys(M).forEach((e) => {
89
+ t.directive(e, M[e]);
90
+ });
91
+ }
92
+ const F = { install: w };
93
+ export {
94
+ z as UserCenterKey,
95
+ N as WlSplitter,
96
+ F as default,
97
+ X as exportFile,
98
+ A as getButtonPermissions,
99
+ R as getLocale,
100
+ Y as getMenuInfo,
101
+ K as getToken,
102
+ V as getUserCenterParams,
103
+ q as getUserCenterParamsByUrl,
104
+ G as getUserInfo,
105
+ P as hasPermission,
106
+ H as is,
107
+ J as isArray,
108
+ Q as isAsyncFunction,
109
+ Z as isBoolean,
110
+ ee as isClient,
111
+ te as isDate,
112
+ ne as isDef,
113
+ oe as isElement,
114
+ se as isFunction,
115
+ ie as isImageDom,
116
+ re as isNull,
117
+ le as isNullOrUndef,
118
+ ce as isNumber,
119
+ ae as isObject,
120
+ ue as isPromise,
121
+ me as isServer,
122
+ fe as isString,
123
+ de as isUndef,
124
+ ve as isWindow,
125
+ pe as logoutToUserCenter,
126
+ T as permission,
127
+ ge as removeAll,
128
+ ye as removeLocale,
129
+ _e as removeToken,
130
+ he as setLocale,
131
+ Se as setMenuInfo,
132
+ be as setToken,
133
+ Me as setUserCenterParams,
134
+ Ue as setUserInfo,
135
+ xe as toUserCenterConsole
136
+ };
@@ -0,0 +1,130 @@
1
+ /**
2
+ * 下载文件
3
+ */
4
+ export declare function exportFile(options: {
5
+ fileData: any;
6
+ name: string;
7
+ }): void;
8
+
9
+ export declare function getButtonPermissions(): any;
10
+
11
+ export declare function getLocale(): string | null;
12
+
13
+ export declare function getMenuInfo(): any;
14
+
15
+ export declare function getToken(): string | null;
16
+
17
+ export declare function getUserCenterParams(): UserCenterParams;
18
+
19
+ export declare function getUserCenterParamsByUrl(): Record<string, string>;
20
+
21
+ export declare function getUserInfo(key?: string | Array<string> | null): any;
22
+
23
+ export declare function hasPermission(id: string): boolean;
24
+
25
+ /**
26
+ * @description: 判断值是否未某个类型
27
+ */
28
+ export declare function is(val: unknown, type: string): boolean;
29
+
30
+ /**
31
+ * @description: 是否为数组
32
+ */
33
+ export declare function isArray(val: any): val is Array<any>;
34
+
35
+ /**
36
+ * @description: 是否为AsyncFunction
37
+ */
38
+ export declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
39
+
40
+ /**
41
+ * @description: 是否为boolean类型
42
+ */
43
+ export declare function isBoolean(val: unknown): val is boolean;
44
+
45
+ /**
46
+ * @description: 是否客户端
47
+ */
48
+ export declare const isClient: () => boolean;
49
+
50
+ /**
51
+ * @description: 是否为时间
52
+ */
53
+ export declare function isDate(val: unknown): val is Date;
54
+
55
+ /**
56
+ * @description: 是否已定义
57
+ */
58
+ export declare const isDef: <T = unknown>(val?: T) => val is T;
59
+
60
+ export declare const isElement: (val: unknown) => val is Element;
61
+
62
+ /**
63
+ * @description: 是否为函数
64
+ */
65
+ export declare function isFunction<T = Function>(val: unknown): val is T;
66
+
67
+ export declare function isImageDom(o: Element): boolean;
68
+
69
+ export declare function isNull(val: unknown): val is null;
70
+
71
+ export declare function isNullOrUndef(val: unknown): val is null | undefined;
72
+
73
+ /**
74
+ * @description: 是否为数值
75
+ */
76
+ export declare function isNumber(val: unknown): val is number;
77
+
78
+ /**
79
+ * @description: 是否为对象
80
+ */
81
+ export declare const isObject: (val: any) => val is Record<any, any>;
82
+
83
+ /**
84
+ * @description: 是否为promise
85
+ */
86
+ export declare function isPromise<T = any>(val: any): val is Promise<T>;
87
+
88
+ export declare const isServer: boolean;
89
+
90
+ /**
91
+ * @description: 是否为字符串
92
+ */
93
+ export declare function isString(val: unknown): val is string;
94
+
95
+ export declare const isUndef: <T = unknown>(val?: T) => val is T;
96
+
97
+ /**
98
+ * @description: 是否为浏览器
99
+ */
100
+ export declare const isWindow: (val: any) => val is Window;
101
+
102
+ export declare function logoutToUserCenter(): void;
103
+
104
+ export declare function removeAll(): void;
105
+
106
+ export declare function removeLocale(): void;
107
+
108
+ export declare function removeToken(): void;
109
+
110
+ export declare function setLocale(locale: string): void;
111
+
112
+ export declare function setMenuInfo(menuInfo: any): void;
113
+
114
+ export declare function setToken(token: string): void;
115
+
116
+ export declare function setUserCenterParams(params: UserCenterParams): void;
117
+
118
+ export declare function setUserInfo(userInfo?: any): void;
119
+
120
+ export declare function toUserCenterConsole(): void;
121
+
122
+ export declare const UserCenterKey = "Witlink-Usercenter";
123
+
124
+ export declare type UserCenterParams = {
125
+ token?: string;
126
+ lang?: string;
127
+ usercenterUrl?: string;
128
+ };
129
+
130
+ export { }