yxuse 1.0.9 → 1.0.10

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.
Files changed (2) hide show
  1. package/README.md +142 -106
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,113 +1,149 @@
1
- <!--
2
- * @Author: WangXin
3
- * @Date: 2023-08-16 14:24:55
4
- * @LastEditors: WangXin
5
- * @LastEditTime: 2023-08-18 11:28:26
6
- * @FilePath: \yxUse\README.md
7
- * @Description:
8
- *
9
- * Copyright (c) 2023 by YuXing, All Rights Reserved.
10
- -->
1
+ # yxuse
11
2
 
3
+ - 起步
4
+
5
+ ```javascript
6
+ npm install yxuse@latest
12
7
  ```
13
- green: {
14
- common: {
15
- //公用颜色
16
- color: {
17
- //主题色
18
- "main-100": "rgba(80, 165, 122, 1)",
19
- "main-50": "rgba(80, 165, 122, 0.5)",
20
- "main-25": "rgba(80, 165, 122, 0.25)",
21
- "main-15": "rgba(80, 165, 122, 0.15)",
22
- "main-5": "rgba(80, 165, 122, 0.05)",
23
8
 
24
- //故障色
25
- "error-100": "rgba(255, 152, 146, 1)",
26
- "error-50": "rgba(255, 152, 146, 0.5)",
27
- "error-25": "rgba(255, 152, 146, 0.25)",
28
- "error-15": "rgba(255, 152, 146, 0.15)",
29
- "error-5": "rgba(255, 152, 146, 0.05)",
9
+ ## 主题
10
+
11
+ - 使用方式
12
+
13
+ ```javascript
14
+ import { install } from "yxuse/theme";
15
+ ```
16
+
17
+ - 内置方法
18
+
19
+ ```javascript
20
+ /**
21
+ * @description:注册主题下的css变量
22
+ */
23
+ install;
24
+ /**
25
+ * @description:修改主题
26
+ * @param themeName 主题名称
27
+ */
28
+ changeTheme;
29
+ /**
30
+ * @description:获取当前主题
31
+ */
32
+ getCurTheme;
33
+ /**
34
+ * @description:获取当前主题下的系统配置
35
+ * @param systemName 系统名称
36
+ */
37
+ getSystemThemeConfig;
38
+ ```
39
+
40
+ - css 变量 json 配置
41
+
42
+ > 下方各类组件颜色变量配置,需要大家一起丰富
43
+
44
+ ```json
45
+ green: {
46
+ common: {
47
+ //公用颜色
48
+ color: {
49
+ //主题色
50
+ "main-100": "rgba(80, 165, 122, 1)",
51
+ "main-50": "rgba(80, 165, 122, 0.5)",
52
+ "main-25": "rgba(80, 165, 122, 0.25)",
53
+ "main-15": "rgba(80, 165, 122, 0.15)",
54
+ "main-5": "rgba(80, 165, 122, 0.05)",
55
+
56
+ //故障色
57
+ "error-100": "rgba(255, 152, 146, 1)",
58
+ "error-50": "rgba(255, 152, 146, 0.5)",
59
+ "error-25": "rgba(255, 152, 146, 0.25)",
60
+ "error-15": "rgba(255, 152, 146, 0.15)",
61
+ "error-5": "rgba(255, 152, 146, 0.05)",
62
+
63
+ //预警色
64
+ "warning-100": "rgba(249, 162, 33, 1)",
65
+ "warning-50": "rgba(249, 162, 33, 0.5)",
66
+ "warning-25": "rgba(249, 162, 33, 0.25)",
67
+ "warning-15": "rgba(249, 162, 33, 0.15)",
68
+ "warning-5": "rgba(249, 162, 33, 0.05)",
30
69
 
31
- //预警色
32
- "warning-100": "rgba(249, 162, 33, 1)",
33
- "warning-50": "rgba(249, 162, 33, 0.5)",
34
- "warning-25": "rgba(249, 162, 33, 0.25)",
35
- "warning-15": "rgba(249, 162, 33, 0.15)",
36
- "warning-5": "rgba(249, 162, 33, 0.05)",
70
+ //信息色
71
+ "info-100": "rgba(133, 233, 183, 1)",
72
+ "info-50": "rgba(133, 233, 183, 0.5)",
73
+ "info-25": "rgba(133, 233, 183, 0.25)",
74
+ "info-15": "rgba(133, 233, 183, 0.15)",
75
+ "info-5": "rgba(133, 233, 183, 0.05)",
37
76
 
38
- //信息色
39
- "info-100": "rgba(133, 233, 183, 1)",
40
- "info-50": "rgba(133, 233, 183, 0.5)",
41
- "info-25": "rgba(133, 233, 183, 0.25)",
42
- "info-15": "rgba(133, 233, 183, 0.15)",
43
- "info-5": "rgba(133, 233, 183, 0.05)",
77
+ //中性色
78
+ "neutral-100": "rgba(85, 221, 221, 1)",
79
+ "neutral-50": "rgba(85, 221, 221, 0.5)",
80
+ "neutral-25": "rgba(85, 221, 221, 0.25)",
81
+ "neutral-15": "rgba(85, 221, 221, 0.15)",
82
+ "neutral-5": "rgba(85, 221, 221, 0.05)"
83
+ },
84
+ //背景色类
85
+ background: {
86
+ "error-gradual": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
87
+ "warning-gradual": "linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)",
88
+ "success-gradual": "linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)"
89
+ },
90
+ //按钮类
91
+ button: {
92
+ background: "rgba(103, 186, 145, 0.10)",
93
+ "border-color": "rgba(80, 165, 122, 1)",
94
+ "text-color": "rgba(80, 165, 122, 1)",
95
+ "active-background-color": "rgba(80, 165, 122, 1)",
96
+ "active-border-color": "rgba(154, 209, 162, 1)",
97
+ "active-text-color": "#fff"
98
+ },
99
+ checkbox: {
100
+ background: "rgba(216, 233, 219, 1)",
101
+ "icon-color": "rgba(80, 165, 122, 0)",
102
+ "border-color": "rgba(154, 209, 162, 1)",
103
+ "checked-background": "rgba(216, 233, 219, 1)",
104
+ "checked-icon-color": "rgba(80, 165, 122, 1)",
105
+ "checked-border-color": "rgba(154, 209, 162, 1)"
106
+ },
107
+ //input
108
+ input: {
109
+ background: "rgba(237, 246, 239, 1)",
110
+ "border-color": "rgba(80, 165, 122, 1)",
111
+ color: "rgba(29, 75, 52, 1)",
112
+ "placeholder-color": "rgba(80, 165, 122, 1)",
113
+ "hover-background": "rgba(237, 246, 239, 0.30)",
114
+ "hover-border-color": "rgba(80, 165, 122, 1)",
115
+ "hover-color": "rgba(80, 165, 122, 1)",
116
+ "active-background": "rgba(237, 246, 239, 0.30)",
117
+ "active-border-color": "rgba(80, 165, 122, 1)",
118
+ "active-color": "rgba(80, 165, 122, 1)",
119
+ "disabled-background": "rgba(237, 246, 239, 1)",
120
+ "disabled-border-color": "rgba(237, 246, 239, 1)",
121
+ "disabled-color": "rgba(83, 83, 83, 1)"
122
+ },
123
+ // select
124
+ select: {
125
+ "dropdown-background": "rgba(237, 246, 239, 1)",
126
+ "dropdown-border-color": "rgba(80, 165, 122, 1)",
127
+ "dropdown-item-color": "rgba(80, 165, 122, 1)",
128
+ "dropdown-item-hover-background": "rgba(178, 220, 198, 1)",
129
+ "dropdown-item-hover-color": "rgba(29, 75, 52, 1)",
130
+ "dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
131
+ "dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
132
+ },
133
+ //布局类
134
+ layout: {},
135
+ //表格类
136
+ table: {},
137
+ //曲线类
138
+ chart: {},
139
+ //提示类
140
+ message: {}
141
+ },
44
142
 
45
- //中性色
46
- "neutral-100": "rgba(85, 221, 221, 1)",
47
- "neutral-50": "rgba(85, 221, 221, 0.5)",
48
- "neutral-25": "rgba(85, 221, 221, 0.25)",
49
- "neutral-15": "rgba(85, 221, 221, 0.15)",
50
- "neutral-5": "rgba(85, 221, 221, 0.05)"
51
- },
52
- //背景色类
53
- background: {
54
- "error-gradual": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
55
- "warning-gradual": "linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)",
56
- "success-gradual": "linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)"
57
- },
58
- //按钮类
59
- button: {
60
- background: "rgba(103, 186, 145, 0.10)",
61
- "border-color": "rgba(80, 165, 122, 1)",
62
- "text-color": "rgba(80, 165, 122, 1)",
63
- "active-background-color": "rgba(80, 165, 122, 1)",
64
- "active-border-color": "rgba(154, 209, 162, 1)",
65
- "active-text-color": "#fff"
66
- },
67
- checkbox: {
68
- background: "rgba(216, 233, 219, 1)",
69
- "icon-color": "rgba(80, 165, 122, 0)",
70
- "border-color": "rgba(154, 209, 162, 1)",
71
- "checked-background": "rgba(216, 233, 219, 1)",
72
- "checked-icon-color": "rgba(80, 165, 122, 1)",
73
- "checked-border-color": "rgba(154, 209, 162, 1)"
74
- },
75
- //input
76
- input: {
77
- background: "rgba(237, 246, 239, 1)",
78
- "border-color": "rgba(80, 165, 122, 1)",
79
- color: "rgba(29, 75, 52, 1)",
80
- "placeholder-color": "rgba(80, 165, 122, 1)",
81
- "hover-background": "rgba(237, 246, 239, 0.30)",
82
- "hover-border-color": "rgba(80, 165, 122, 1)",
83
- "hover-color": "rgba(80, 165, 122, 1)",
84
- "active-background": "rgba(237, 246, 239, 0.30)",
85
- "active-border-color": "rgba(80, 165, 122, 1)",
86
- "active-color": "rgba(80, 165, 122, 1)",
87
- "disabled-background": "rgba(237, 246, 239, 1)",
88
- "disabled-border-color": "rgba(237, 246, 239, 1)",
89
- "disabled-color": "rgba(83, 83, 83, 1)"
90
- },
91
- // select
92
- select: {
93
- "dropdown-background": "rgba(237, 246, 239, 1)",
94
- "dropdown-border-color": "rgba(80, 165, 122, 1)",
95
- "dropdown-item-color": "rgba(80, 165, 122, 1)",
96
- "dropdown-item-hover-background": "rgba(178, 220, 198, 1)",
97
- "dropdown-item-hover-color": "rgba(29, 75, 52, 1)",
98
- "dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
99
- "dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
100
- },
101
- //布局类
102
- layout: {},
103
- //表格类
104
- table: {},
105
- //曲线类
106
- chart: {},
107
- //提示类
108
- message: {}
109
- },
110
- cloud: {},
111
- "station-control-center": {}
112
- },
143
+ //各系统个性化配置
144
+ cloud: {},//运管系统
145
+ "station-control-center": {}, //站控
146
+ "traceplan-client":{} //任务计划
147
+ ...
148
+ },
113
149
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yxuse",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "yx"