yxuse 1.0.8 → 1.0.9

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
@@ -2,11 +2,112 @@
2
2
  * @Author: WangXin
3
3
  * @Date: 2023-08-16 14:24:55
4
4
  * @LastEditors: WangXin
5
- * @LastEditTime: 2023-08-16 16:20:30
5
+ * @LastEditTime: 2023-08-18 11:28:26
6
6
  * @FilePath: \yxUse\README.md
7
7
  * @Description:
8
8
  *
9
9
  * Copyright (c) 2023 by YuXing, All Rights Reserved.
10
10
  -->
11
11
 
12
- yxuse
12
+ ```
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
+
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)",
30
+
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)",
37
+
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)",
44
+
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
+ },
113
+ ```
package/lib/theme.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n={green:{common:{color:{"main-100":"rgba(80, 165, 122, 1)","main-50":"rgba(80, 165, 122, 0.5)","main-25":"rgba(80, 165, 122, 0.25)","main-15":"rgba(80, 165, 122, 0.15)","main-5":"rgba(80, 165, 122, 0.05)","error-100":"rgba(255, 152, 146, 1)","error-50":"rgba(255, 152, 146, 0.5)","error-25":"rgba(255, 152, 146, 0.25)","error-15":"rgba(255, 152, 146, 0.15)","error-5":"rgba(255, 152, 146, 0.05)","warning-100":"rgba(249, 162, 33, 1)","warning-50":"rgba(249, 162, 33, 0.5)","warning-25":"rgba(249, 162, 33, 0.25)","warning-15":"rgba(249, 162, 33, 0.15)","warning-5":"rgba(249, 162, 33, 0.05)","info-100":"rgba(133, 233, 183, 1)","info-50":"rgba(133, 233, 183, 0.5)","info-25":"rgba(133, 233, 183, 0.25)","info-15":"rgba(133, 233, 183, 0.15)","info-5":"rgba(133, 233, 183, 0.05)","neutral-100":"rgba(85, 221, 221, 1)","neutral-50":"rgba(85, 221, 221, 0.5)","neutral-25":"rgba(85, 221, 221, 0.25)","neutral-15":"rgba(85, 221, 221, 0.15)","neutral-5":"rgba(85, 221, 221, 0.05)"},background:{"error-gradual":"linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)","warning-gradual":"linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)","success-gradual":"linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)"},button:{background:"rgba(103, 186, 145, 0.10)","border-color":"rgba(80, 165, 122, 1)","text-color":"rgba(80, 165, 122, 1)","active-background-color":"rgba(80, 165, 122, 1)","active-border-color":"rgba(154, 209, 162, 1)","active-text-color":"#fff"},checkbox:{background:"rgba(216, 233, 219, 1)","icon-color":"rgba(80, 165, 122, 0)","border-color":"rgba(154, 209, 162, 1)","checked-background":"rgba(216, 233, 219, 1)","checked-icon-color":"rgba(80, 165, 122, 1)","checked-border-color":"rgba(154, 209, 162, 1)"},input:{background:"rgba(237, 246, 239, 1)","border-color":"rgba(80, 165, 122, 1)",color:"rgba(29, 75, 52, 1)","placeholder-color":"rgba(80, 165, 122, 1)","hover-background":"rgba(237, 246, 239, 0.30)","hover-border-color":"rgba(80, 165, 122, 1)","hover-color":"rgba(80, 165, 122, 1)","active-background":"rgba(237, 246, 239, 0.30)","active-border-color":"rgba(80, 165, 122, 1)","active-color":"rgba(80, 165, 122, 1)","disabled-background":"rgba(237, 246, 239, 1)","disabled-border-color":"rgba(237, 246, 239, 1)","disabled-color":"rgba(83, 83, 83, 1)"},select:{"dropdown-background":"rgba(237, 246, 239, 1)","dropdown-border-color":"rgba(80, 165, 122, 1)","dropdown-item-color":"rgba(80, 165, 122, 1)","dropdown-item-hover-background":"rgba(178, 220, 198, 1)","dropdown-item-hover-color":"rgba(29, 75, 52, 1)","dropdown-item-selected-background":"rgba(178, 220, 198, 1)","dropdown-item-selected-color":"rgba(29, 75, 52, 1)"},layout:{},table:{},chart:{},message:{}},cloud:{},"station-control-center":{}},blue:{common:{"--test1":"#fff","--test2":"#ccc"},cloud:{},"station-control-center":{}}},t=()=>{const r=e();localStorage.getItem("yxTheme")||localStorage.setItem("yxTheme",r);const o=document.documentElement,a=n[r].common;Object.keys(a).forEach(g=>{Object.keys(a[g]).forEach(c=>{const b=`--${g}-${c}`;o.style.setProperty(c,b)})})},l=r=>{localStorage.setItem("yxTheme",r),t()},e=()=>localStorage.getItem("yxTheme")||"green",d=r=>{const o=e();return n[o][r]||{}};exports.changeTheme=l;exports.getCurTheme=e;exports.getSystemThemeConfig=d;exports.install=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n={green:{common:{color:{"main-100":"rgba(80, 165, 122, 1)","main-50":"rgba(80, 165, 122, 0.5)","main-25":"rgba(80, 165, 122, 0.25)","main-15":"rgba(80, 165, 122, 0.15)","main-5":"rgba(80, 165, 122, 0.05)","error-100":"rgba(255, 152, 146, 1)","error-50":"rgba(255, 152, 146, 0.5)","error-25":"rgba(255, 152, 146, 0.25)","error-15":"rgba(255, 152, 146, 0.15)","error-5":"rgba(255, 152, 146, 0.05)","warning-100":"rgba(249, 162, 33, 1)","warning-50":"rgba(249, 162, 33, 0.5)","warning-25":"rgba(249, 162, 33, 0.25)","warning-15":"rgba(249, 162, 33, 0.15)","warning-5":"rgba(249, 162, 33, 0.05)","info-100":"rgba(133, 233, 183, 1)","info-50":"rgba(133, 233, 183, 0.5)","info-25":"rgba(133, 233, 183, 0.25)","info-15":"rgba(133, 233, 183, 0.15)","info-5":"rgba(133, 233, 183, 0.05)","neutral-100":"rgba(85, 221, 221, 1)","neutral-50":"rgba(85, 221, 221, 0.5)","neutral-25":"rgba(85, 221, 221, 0.25)","neutral-15":"rgba(85, 221, 221, 0.15)","neutral-5":"rgba(85, 221, 221, 0.05)"},background:{"error-gradual":"linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)","warning-gradual":"linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)","success-gradual":"linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)"},button:{background:"rgba(103, 186, 145, 0.10)","border-color":"rgba(80, 165, 122, 1)","text-color":"rgba(80, 165, 122, 1)","active-background-color":"rgba(80, 165, 122, 1)","active-border-color":"rgba(154, 209, 162, 1)","active-text-color":"#fff"},checkbox:{background:"rgba(216, 233, 219, 1)","icon-color":"rgba(80, 165, 122, 0)","border-color":"rgba(154, 209, 162, 1)","checked-background":"rgba(216, 233, 219, 1)","checked-icon-color":"rgba(80, 165, 122, 1)","checked-border-color":"rgba(154, 209, 162, 1)"},input:{background:"rgba(237, 246, 239, 1)","border-color":"rgba(80, 165, 122, 1)",color:"rgba(29, 75, 52, 1)","placeholder-color":"rgba(80, 165, 122, 1)","hover-background":"rgba(237, 246, 239, 0.30)","hover-border-color":"rgba(80, 165, 122, 1)","hover-color":"rgba(80, 165, 122, 1)","active-background":"rgba(237, 246, 239, 0.30)","active-border-color":"rgba(80, 165, 122, 1)","active-color":"rgba(80, 165, 122, 1)","disabled-background":"rgba(237, 246, 239, 1)","disabled-border-color":"rgba(237, 246, 239, 1)","disabled-color":"rgba(83, 83, 83, 1)"},select:{"dropdown-background":"rgba(237, 246, 239, 1)","dropdown-border-color":"rgba(80, 165, 122, 1)","dropdown-item-color":"rgba(80, 165, 122, 1)","dropdown-item-hover-background":"rgba(178, 220, 198, 1)","dropdown-item-hover-color":"rgba(29, 75, 52, 1)","dropdown-item-selected-background":"rgba(178, 220, 198, 1)","dropdown-item-selected-color":"rgba(29, 75, 52, 1)"},layout:{},table:{},chart:{},message:{}},cloud:{},"station-control-center":{}},blue:{common:{"--test1":"#fff","--test2":"#ccc"},cloud:{},"station-control-center":{}}},t=()=>{const r=g();localStorage.getItem("yxTheme")||localStorage.setItem("yxTheme",r);const o=document.documentElement,e=n[r].common;Object.keys(e).forEach(a=>{Object.keys(e[a]).forEach(c=>{const b=`--${a}-${c}`;o.style.setProperty(b,e[a][c])})})},l=r=>{localStorage.setItem("yxTheme",r),t()},g=()=>localStorage.getItem("yxTheme")||"green",d=r=>{const o=g();return n[o][r]||{}};exports.changeTheme=l;exports.getCurTheme=g;exports.getSystemThemeConfig=d;exports.install=t;
package/lib/theme.es.js CHANGED
@@ -110,18 +110,18 @@ const c = {
110
110
  Object.keys(e).forEach((a) => {
111
111
  Object.keys(e[a]).forEach((g) => {
112
112
  const n = `--${a}-${g}`;
113
- o.style.setProperty(g, n);
113
+ o.style.setProperty(n, e[a][g]);
114
114
  });
115
115
  });
116
- }, l = (r) => {
116
+ }, d = (r) => {
117
117
  localStorage.setItem("yxTheme", r), t();
118
- }, b = () => localStorage.getItem("yxTheme") || "green", d = (r) => {
118
+ }, b = () => localStorage.getItem("yxTheme") || "green", l = (r) => {
119
119
  const o = b();
120
120
  return c[o][r] || {};
121
121
  };
122
122
  export {
123
- l as changeTheme,
123
+ d as changeTheme,
124
124
  b as getCurTheme,
125
- d as getSystemThemeConfig,
125
+ l as getSystemThemeConfig,
126
126
  t as install
127
127
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yxuse",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "yx"