yxuse 1.0.11 → 1.0.13
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 +12 -3
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +15 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
- 起步
|
|
4
4
|
|
|
5
5
|
```javascript
|
|
6
|
-
npm
|
|
6
|
+
//npm
|
|
7
|
+
npm install yxuse@latest
|
|
8
|
+
//pnpm
|
|
9
|
+
pnpm install yxuse@latest
|
|
7
10
|
```
|
|
8
11
|
|
|
9
12
|
## 主题
|
|
@@ -130,6 +133,14 @@ green: {
|
|
|
130
133
|
"dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
|
|
131
134
|
"dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
|
|
132
135
|
},
|
|
136
|
+
//文字颜色
|
|
137
|
+
text: {
|
|
138
|
+
main: "#50A57A",
|
|
139
|
+
deep: "#1D4B34",
|
|
140
|
+
light: "rgba(80, 165, 122, 0.50)",
|
|
141
|
+
paler: "#637B6B",
|
|
142
|
+
warning: "#F8B85A"
|
|
143
|
+
}
|
|
133
144
|
//布局类
|
|
134
145
|
layout: {},
|
|
135
146
|
//表格类
|
|
@@ -147,5 +158,3 @@ green: {
|
|
|
147
158
|
...
|
|
148
159
|
},
|
|
149
160
|
```
|
|
150
|
-
|
|
151
|
-
- 主题内置方法
|
package/lib/theme.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={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)","text-color":"#9AD1A2","checked-text-color":"#1D4B34","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:{},text:{main:"#50A57A",deep:"#1D4B34",light:"rgba(80, 165, 122, 0.50)",paler:"#637B6B",warning:"#F8B85A"}},cloud:{},"station-control-center":{}},blue:{common:{"--test1":"#fff","--test2":"#ccc"},cloud:{},"station-control-center":{}}},n=()=>{const r=g();localStorage.getItem("yxTheme")||localStorage.setItem("yxTheme",r);const o=document.documentElement,e=t[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),n()},g=()=>localStorage.getItem("yxTheme")||"green",d=r=>{const o=g();return t[o][r]||{}};exports.changeTheme=l;exports.getCurTheme=g;exports.getSystemThemeConfig=d;exports.install=n;
|
package/lib/theme.es.js
CHANGED
|
@@ -53,6 +53,8 @@ const c = {
|
|
|
53
53
|
background: "rgba(216, 233, 219, 1)",
|
|
54
54
|
"icon-color": "rgba(80, 165, 122, 0)",
|
|
55
55
|
"border-color": "rgba(154, 209, 162, 1)",
|
|
56
|
+
"text-color": "#9AD1A2",
|
|
57
|
+
"checked-text-color": "#1D4B34",
|
|
56
58
|
"checked-background": "rgba(216, 233, 219, 1)",
|
|
57
59
|
"checked-icon-color": "rgba(80, 165, 122, 1)",
|
|
58
60
|
"checked-border-color": "rgba(154, 209, 162, 1)"
|
|
@@ -90,7 +92,15 @@ const c = {
|
|
|
90
92
|
//曲线类
|
|
91
93
|
chart: {},
|
|
92
94
|
//提示类
|
|
93
|
-
message: {}
|
|
95
|
+
message: {},
|
|
96
|
+
//文字颜色
|
|
97
|
+
text: {
|
|
98
|
+
main: "#50A57A",
|
|
99
|
+
deep: "#1D4B34",
|
|
100
|
+
light: "rgba(80, 165, 122, 0.50)",
|
|
101
|
+
paler: "#637B6B",
|
|
102
|
+
warning: "#F8B85A"
|
|
103
|
+
}
|
|
94
104
|
},
|
|
95
105
|
cloud: {},
|
|
96
106
|
"station-control-center": {}
|
|
@@ -113,15 +123,15 @@ const c = {
|
|
|
113
123
|
o.style.setProperty(n, e[a][g]);
|
|
114
124
|
});
|
|
115
125
|
});
|
|
116
|
-
},
|
|
126
|
+
}, l = (r) => {
|
|
117
127
|
localStorage.setItem("yxTheme", r), t();
|
|
118
|
-
}, b = () => localStorage.getItem("yxTheme") || "green",
|
|
128
|
+
}, b = () => localStorage.getItem("yxTheme") || "green", d = (r) => {
|
|
119
129
|
const o = b();
|
|
120
130
|
return c[o][r] || {};
|
|
121
131
|
};
|
|
122
132
|
export {
|
|
123
|
-
|
|
133
|
+
l as changeTheme,
|
|
124
134
|
b as getCurTheme,
|
|
125
|
-
|
|
135
|
+
d as getSystemThemeConfig,
|
|
126
136
|
t as install
|
|
127
137
|
};
|