yxuse 1.0.95 → 2.0.2
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 +5 -4
- package/lib/api.cjs.js +1 -1
- package/lib/api.es.js +1 -1
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +8 -9
- package/lib/directives.cjs.js +1 -1
- package/lib/directives.es.js +1 -1
- package/lib/icons.cjs.js +1 -1
- package/lib/icons.es.js +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs2.js +5 -3
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs6.js +3 -3
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.es.js +12 -13
- package/lib/index.es2.js +874 -814
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es3.js +66 -45
- package/lib/index.es4.js +5 -5
- package/lib/index.es6.js +2929 -729
- package/lib/index.es6.js.gz +0 -0
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +6 -6
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +9 -8
- package/lib/vue.runtime.esm-bundler.cjs.js +8 -0
- package/lib/vue.runtime.esm-bundler.cjs.js.gz +0 -0
- package/lib/vue.runtime.esm-bundler.es.js +4588 -0
- package/lib/vue.runtime.esm-bundler.es.js.gz +0 -0
- package/package.json +150 -150
- package/types/api/auth/index.d.ts +13 -5
- package/types/components/Toolbar/index.d.ts +4 -0
- package/types/components/YxDialog/index.vue.d.ts +1 -1
- package/types/components/YxDialog/type.d.ts +4 -0
- package/types/components/YxSearchForm/type.d.ts +20 -0
- package/types/components/YxTable/type.d.ts +4 -0
- package/types/theme/config.d.ts +6 -0
- package/types/theme/index.d.ts +9 -9
- package/types/theme/type.d.ts +22 -0
- package/types/utils/common/index.d.ts +5 -0
|
Binary file
|
package/package.json
CHAN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
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "yxuse",
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"private": false,
|
|
5
|
+
"keywords": [
|
|
6
|
+
"yx"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "node ./build/log.ts dev && vite",
|
|
10
|
+
"build": "node ./build/log.ts build && vite build --mode production && node ./build/log.ts end",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"build-only": "vite build",
|
|
13
|
+
"type-check": "vue-tsc --noEmit",
|
|
14
|
+
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
|
|
15
|
+
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
|
|
16
|
+
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
|
|
17
|
+
"prepare": "husky install",
|
|
18
|
+
"lint:lint-staged": "lint-staged",
|
|
19
|
+
"commit": "git pull && git add -A && git-cz && git push",
|
|
20
|
+
"tsc": "tsc --noEmit --watch"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"lib",
|
|
24
|
+
"types"
|
|
25
|
+
],
|
|
26
|
+
"main": "lib/index.es.js",
|
|
27
|
+
"module": "lib/index.es.js",
|
|
28
|
+
"types": "types/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./lib/index.es.js",
|
|
32
|
+
"require": "./lib/index.cls.js",
|
|
33
|
+
"types": "./types/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./utils": {
|
|
36
|
+
"import": "./lib/utils.es.js",
|
|
37
|
+
"require": "./lib/utils.cls.js",
|
|
38
|
+
"types": "./types/utils/index.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"./api": {
|
|
41
|
+
"import": "./lib/api.es.js",
|
|
42
|
+
"require": "./lib/api.cls.js",
|
|
43
|
+
"types": "./types/api/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./theme": {
|
|
46
|
+
"import": "./lib/theme.es.js",
|
|
47
|
+
"require": "./lib/theme.cls.js",
|
|
48
|
+
"types": "./types/theme/index.d.ts"
|
|
49
|
+
},
|
|
50
|
+
"./directives": {
|
|
51
|
+
"import": "./lib/directives.es.js",
|
|
52
|
+
"require": "./lib/directives.cls.js",
|
|
53
|
+
"types": "./types/directives/index.d.ts"
|
|
54
|
+
},
|
|
55
|
+
"./icons": {
|
|
56
|
+
"import": "./lib/icons.es.js",
|
|
57
|
+
"require": "./lib/icons.cls.js",
|
|
58
|
+
"types": "./types/icons/index.d.ts"
|
|
59
|
+
},
|
|
60
|
+
"./components": {
|
|
61
|
+
"import": "./lib/components.es.js",
|
|
62
|
+
"require": "./lib/components.cls.js",
|
|
63
|
+
"types": "./types/components/index.d.ts"
|
|
64
|
+
},
|
|
65
|
+
"./style": {
|
|
66
|
+
"import": "./lib/style.css",
|
|
67
|
+
"require": "./lib/style.css"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"axios": "^1.3.3",
|
|
72
|
+
"element-plus": "^2.4.4",
|
|
73
|
+
"file-saver": "^2.0.5",
|
|
74
|
+
"mqtt": "^4.0.1",
|
|
75
|
+
"nprogress": "^0.2.0",
|
|
76
|
+
"pinia": "^2.0.30",
|
|
77
|
+
"qs": "^6.11.0",
|
|
78
|
+
"sortablejs": "^1.15.0",
|
|
79
|
+
"vue": "^3.3.9",
|
|
80
|
+
"vue-router": "^4.1.6",
|
|
81
|
+
"xlsx": "^0.18.5"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@commitlint/cli": "^17.5.1",
|
|
85
|
+
"@commitlint/config-conventional": "^17.4.4",
|
|
86
|
+
"@rushstack/eslint-patch": "^1.2.0",
|
|
87
|
+
"@types/node": "^18.14.0",
|
|
88
|
+
"@types/nprogress": "^0.2.0",
|
|
89
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
90
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
91
|
+
"@vitejs/plugin-vue": "^5.0.2",
|
|
92
|
+
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
93
|
+
"@vue/eslint-config-prettier": "^7.0.0",
|
|
94
|
+
"@vue/eslint-config-typescript": "^11.0.2",
|
|
95
|
+
"@vue/tsconfig": "^0.1.3",
|
|
96
|
+
"autoprefixer": "^10.4.13",
|
|
97
|
+
"commitizen": "^4.3.0",
|
|
98
|
+
"cssnano": "^5.1.15",
|
|
99
|
+
"cz-git": "^1.6.1",
|
|
100
|
+
"eslint": "^8.56.0",
|
|
101
|
+
"eslint-plugin-vue": "^9.20.1",
|
|
102
|
+
"figlet": "^1.6.0",
|
|
103
|
+
"husky": "^8.0.3",
|
|
104
|
+
"lint-staged": "^13.2.0",
|
|
105
|
+
"npm-run-all": "^4.1.5",
|
|
106
|
+
"pinia-plugin-persistedstate": "^3.1.0",
|
|
107
|
+
"postcss": "^8.4.21",
|
|
108
|
+
"postcss-html": "^1.5.0",
|
|
109
|
+
"postcss-import": "^15.1.0",
|
|
110
|
+
"postcss-nesting": "^11.2.2",
|
|
111
|
+
"postcss-preset-env": "^8.4.2",
|
|
112
|
+
"postcss-px-to-viewport": "^1.1.1",
|
|
113
|
+
"postcss-scss": "^4.0.6",
|
|
114
|
+
"prettier": "^2.8.4",
|
|
115
|
+
"rollup-plugin-visualizer": "^5.9.2",
|
|
116
|
+
"sass": "^1.58.3",
|
|
117
|
+
"stylelint": "^15.6.0",
|
|
118
|
+
"stylelint-config-prettier": "^9.0.3",
|
|
119
|
+
"stylelint-config-recess-order": "^4.0.0",
|
|
120
|
+
"stylelint-config-recommended-scss": "^11.0.0",
|
|
121
|
+
"stylelint-config-recommended-vue": "^1.4.0",
|
|
122
|
+
"stylelint-config-standard": "^33.0.0",
|
|
123
|
+
"stylelint-config-standard-scss": "^9.0.0",
|
|
124
|
+
"tailwindcss": "^3.2.7",
|
|
125
|
+
"typescript": "~5.3.3",
|
|
126
|
+
"unplugin-auto-import": "^0.16.6",
|
|
127
|
+
"unplugin-element-plus": "^0.8.0",
|
|
128
|
+
"unplugin-vue-components": "^0.25.1",
|
|
129
|
+
"vite": "^5.0.10",
|
|
130
|
+
"vite-plugin-compression": "^0.5.1",
|
|
131
|
+
"vite-plugin-dts": "^3.7.0",
|
|
132
|
+
"vite-plugin-remove-console": "^2.1.0",
|
|
133
|
+
"vite-plugin-windicss": "^1.9.3",
|
|
134
|
+
"vite-svg-loader": "^4.0.0",
|
|
135
|
+
"vue-tsc": "^1.1.4"
|
|
136
|
+
},
|
|
137
|
+
"pnpm": {
|
|
138
|
+
"peerDependencyRules": {
|
|
139
|
+
"ignoreMissing": [
|
|
140
|
+
"rollup",
|
|
141
|
+
"webpack"
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"config": {
|
|
146
|
+
"commitizen": {
|
|
147
|
+
"path": "node_modules/cz-git"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
export declare const removeToken: (systemName?: string) => void;
|
|
3
3
|
/**@description 获取token */
|
|
4
4
|
export declare const getToken: (systemName?: string) => any;
|
|
5
|
+
interface LoginParams {
|
|
6
|
+
userName: string;
|
|
7
|
+
password: string;
|
|
8
|
+
}
|
|
5
9
|
/**@description 自动登录 */
|
|
6
|
-
export declare const autoLogin: ({ userName, password }:
|
|
7
|
-
userName: any;
|
|
8
|
-
password: any;
|
|
9
|
-
}, systemName?: string) => Promise<null | undefined>;
|
|
10
|
+
export declare const autoLogin: ({ userName, password }: LoginParams, systemName?: string) => Promise<void>;
|
|
10
11
|
/**@description 获取用户信息 */
|
|
11
12
|
export declare const getUserInfo: (systemName?: string) => any;
|
|
12
13
|
export declare const getUserRouteList: () => Promise<any>;
|
|
@@ -15,7 +16,13 @@ export declare const jumpToLogin: () => void;
|
|
|
15
16
|
/**@description 自动跳转home */
|
|
16
17
|
export declare const jumpToHome: () => void;
|
|
17
18
|
/**获取当前部署的系统前缀 */
|
|
18
|
-
export declare const getHomeUrl: () =>
|
|
19
|
+
export declare const getHomeUrl: () => any;
|
|
20
|
+
/**设置系统配置信息 */
|
|
21
|
+
export declare const setSystemConfig: (config: any) => void;
|
|
22
|
+
/**获取系统配置信息 */
|
|
23
|
+
export declare const getSystemConfig: (key: string) => any;
|
|
24
|
+
/**当前系统环境是否是生产环境 */
|
|
25
|
+
export declare const isProduction: () => boolean;
|
|
19
26
|
/**
|
|
20
27
|
*
|
|
21
28
|
* @param systemName 系统名称
|
|
@@ -48,3 +55,4 @@ export declare const getUserRouter: (userMenuList: any, viewModules: any, viewCo
|
|
|
48
55
|
* @param routeTag
|
|
49
56
|
*/
|
|
50
57
|
export declare const getUserIsHaveBtnPower: (routeTag: string) => boolean;
|
|
58
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DialogOptions } from "./type";
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
|
3
|
-
show: ({ width, title, submit, cancel, showFooter, autoClose }: DialogOptions) => void;
|
|
3
|
+
show: ({ width, title, submit, cancel, showFooter, autoClose, beforeOpen, beforeSubmit }: DialogOptions) => void;
|
|
4
4
|
close: () => void;
|
|
5
5
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
|
6
6
|
default?(_: {}): any;
|
|
@@ -3,6 +3,14 @@ export interface YxFormProps {
|
|
|
3
3
|
searchParams: Record<string, any>;
|
|
4
4
|
showSearchBtn?: boolean;
|
|
5
5
|
showAddBtn?: boolean;
|
|
6
|
+
/** 设置样式 */
|
|
7
|
+
style?: Record<string, any>;
|
|
8
|
+
/** label样式 */
|
|
9
|
+
labelStyle?: Record<string, any>;
|
|
10
|
+
/** class */
|
|
11
|
+
className?: string[];
|
|
12
|
+
/** label样式 */
|
|
13
|
+
classLabelName?: string[];
|
|
6
14
|
}
|
|
7
15
|
export interface SearchFormConfig {
|
|
8
16
|
label: string;
|
|
@@ -14,6 +22,18 @@ export interface SearchFormConfig {
|
|
|
14
22
|
/**控制表单显示或隐藏的方法 */
|
|
15
23
|
show?: () => boolean;
|
|
16
24
|
change?: () => void;
|
|
25
|
+
/** 组件类样式 */
|
|
26
|
+
componentClassName?: string[];
|
|
27
|
+
/** 组件样式 */
|
|
28
|
+
componentStyle?: Record<string, any>;
|
|
29
|
+
/** 设置样式 */
|
|
30
|
+
style?: Record<string, any>;
|
|
31
|
+
/** label样式 */
|
|
32
|
+
labelStyle?: Record<string, any>;
|
|
33
|
+
/** class */
|
|
34
|
+
className?: string[];
|
|
35
|
+
/** label样式 */
|
|
36
|
+
classLabelName?: string[];
|
|
17
37
|
}
|
|
18
38
|
export interface FormConfig {
|
|
19
39
|
label: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type YxTable from "./index.vue";
|
|
2
|
+
import type { TableColumnCtx } from "element-plus";
|
|
2
3
|
export type YxTableInstance = InstanceType<typeof YxTable>;
|
|
3
4
|
export interface TableProps {
|
|
4
5
|
tableData: any[];
|
|
@@ -42,6 +43,8 @@ export interface TableColumn {
|
|
|
42
43
|
render?: (scope: any) => any;
|
|
43
44
|
/** 操作栏 */
|
|
44
45
|
operate?: Operate[];
|
|
46
|
+
/** 是否显示 */
|
|
47
|
+
show?: (row: any) => boolean;
|
|
45
48
|
/** 固定栏 */
|
|
46
49
|
fixed?: string;
|
|
47
50
|
/** 对数据进行格式化 */
|
|
@@ -55,3 +58,4 @@ export interface TableColumn {
|
|
|
55
58
|
/**多级表头 */
|
|
56
59
|
children?: TableColumn[];
|
|
57
60
|
}
|
|
61
|
+
export type YxTableColumn<T> = TableColumn & TableColumnCtx<T>;
|
package/types/theme/config.d.ts
CHANGED
package/types/theme/index.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
id: number;
|
|
3
|
-
defaultTheme: number;
|
|
4
|
-
theme: string;
|
|
5
|
-
themeUrl: string;
|
|
6
|
-
}
|
|
1
|
+
import type { ThemeDTO, YxuseOptions } from "./type.ts";
|
|
7
2
|
/**
|
|
8
3
|
* @description:注册主题下的css变量
|
|
9
|
-
* @
|
|
4
|
+
* @options isRenderToolbar :是否需要渲染Toolbar
|
|
10
5
|
* @param isJumpLogin :是否在没有token或token过期时自动跳转至登录页
|
|
11
6
|
*/
|
|
12
|
-
export declare const install: (
|
|
7
|
+
export declare const install: (config: YxuseOptions) => Promise<void>;
|
|
13
8
|
/**
|
|
14
9
|
* @description:修改主题
|
|
15
10
|
* @param theme 主题
|
|
@@ -36,7 +31,12 @@ export declare const getCurThemeCssVar: () => any;
|
|
|
36
31
|
* @param groupName 名称
|
|
37
32
|
*/
|
|
38
33
|
export declare const getGroupColor: (groupName: string) => object;
|
|
39
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @description:判断当前色值是否在当前主题中
|
|
36
|
+
* @param key 色值变量
|
|
37
|
+
* @param color 名称
|
|
38
|
+
*/
|
|
39
|
+
export declare const findColorByTheme: (key: string, color: string) => boolean;
|
|
40
40
|
/**
|
|
41
41
|
* @description:注册当前系统私有css变量
|
|
42
42
|
* @param systemName 系统名称
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ThemeDTO {
|
|
2
|
+
id: number;
|
|
3
|
+
defaultTheme: number;
|
|
4
|
+
theme: string;
|
|
5
|
+
themeUrl: string;
|
|
6
|
+
}
|
|
7
|
+
export interface YxuseOptions {
|
|
8
|
+
/** 是否渲染悬浮球*/
|
|
9
|
+
isRenderToolbar?: boolean;
|
|
10
|
+
/** 是否加载工单*/
|
|
11
|
+
isRenderIssue?: boolean;
|
|
12
|
+
/** 是否加载语言切换*/
|
|
13
|
+
isRenderLang?: boolean;
|
|
14
|
+
/** 登录页地址*/
|
|
15
|
+
loginUrl?: string;
|
|
16
|
+
/** 首页地址*/
|
|
17
|
+
homeUrl?: string;
|
|
18
|
+
/** 系统语言*/
|
|
19
|
+
lang?: string;
|
|
20
|
+
/** 当前环境*/
|
|
21
|
+
environment: "development" | "production";
|
|
22
|
+
}
|
|
@@ -30,4 +30,9 @@ export declare const enumToArray: <T extends Record<string, string | number>>(en
|
|
|
30
30
|
label: string;
|
|
31
31
|
value: string | number;
|
|
32
32
|
}[];
|
|
33
|
+
/**
|
|
34
|
+
* @description 判断该色值是否是深色
|
|
35
|
+
* @param color 色值
|
|
36
|
+
*/
|
|
37
|
+
export declare const isDarkColor: (color: string) => boolean | null;
|
|
33
38
|
export {};
|