yxuse 1.0.13 → 1.0.15
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 +10 -2
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +19 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
npm install yxuse@latest
|
|
8
8
|
//pnpm
|
|
9
9
|
pnpm install yxuse@latest
|
|
10
|
+
|
|
11
|
+
//请更新淘宝镜像为 https://registry.npmmirror.com
|
|
12
|
+
|
|
13
|
+
npm set registry https://registry.npmmirror.com
|
|
14
|
+
//或
|
|
15
|
+
pnpm set registry https://registry.npmmirror.com
|
|
16
|
+
|
|
10
17
|
```
|
|
11
18
|
|
|
12
19
|
## 主题
|
|
@@ -133,14 +140,15 @@ green: {
|
|
|
133
140
|
"dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
|
|
134
141
|
"dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
|
|
135
142
|
},
|
|
136
|
-
|
|
143
|
+
//文字颜色
|
|
137
144
|
text: {
|
|
138
145
|
main: "#50A57A",
|
|
139
146
|
deep: "#1D4B34",
|
|
140
147
|
light: "rgba(80, 165, 122, 0.50)",
|
|
141
148
|
paler: "#637B6B",
|
|
142
149
|
warning: "#F8B85A"
|
|
143
|
-
}
|
|
150
|
+
},
|
|
151
|
+
tree:{},
|
|
144
152
|
//布局类
|
|
145
153
|
layout: {},
|
|
146
154
|
//表格类
|
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 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)","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)"},tree:{},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":{}}},o="yxTheme",d="green",b=()=>{const r=c();localStorage.getItem(o)||localStorage.setItem(o,r);const e=document.documentElement,a=n[r].common;Object.keys(a).forEach(g=>{Object.keys(a[g]).forEach(t=>{const l=`--${g}-${t}`;e.style.setProperty(l,a[g][t])})})},i=r=>{localStorage.setItem(o,r),b()},c=()=>localStorage.getItem(o)||d,s=r=>{const e=c();return n[e][r]||{}};exports.changeTheme=i;exports.getCurTheme=c;exports.getSystemThemeConfig=s;exports.install=b;
|
package/lib/theme.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
green: {
|
|
3
3
|
common: {
|
|
4
4
|
//公用颜色
|
|
@@ -85,6 +85,7 @@ const c = {
|
|
|
85
85
|
"dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
|
|
86
86
|
"dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
|
|
87
87
|
},
|
|
88
|
+
tree: {},
|
|
88
89
|
//布局类
|
|
89
90
|
layout: {},
|
|
90
91
|
//表格类
|
|
@@ -113,25 +114,25 @@ const c = {
|
|
|
113
114
|
cloud: {},
|
|
114
115
|
"station-control-center": {}
|
|
115
116
|
}
|
|
116
|
-
},
|
|
117
|
-
const r =
|
|
118
|
-
localStorage.getItem(
|
|
119
|
-
const
|
|
120
|
-
Object.keys(
|
|
121
|
-
Object.keys(
|
|
122
|
-
const
|
|
123
|
-
|
|
117
|
+
}, o = "yxTheme", l = "green", d = () => {
|
|
118
|
+
const r = n();
|
|
119
|
+
localStorage.getItem(o) || localStorage.setItem(o, r);
|
|
120
|
+
const e = document.documentElement, a = t[r].common;
|
|
121
|
+
Object.keys(a).forEach((g) => {
|
|
122
|
+
Object.keys(a[g]).forEach((c) => {
|
|
123
|
+
const b = `--${g}-${c}`;
|
|
124
|
+
e.style.setProperty(b, a[g][c]);
|
|
124
125
|
});
|
|
125
126
|
});
|
|
126
|
-
},
|
|
127
|
-
localStorage.setItem(
|
|
128
|
-
},
|
|
129
|
-
const
|
|
130
|
-
return
|
|
127
|
+
}, i = (r) => {
|
|
128
|
+
localStorage.setItem(o, r), d();
|
|
129
|
+
}, n = () => localStorage.getItem(o) || l, s = (r) => {
|
|
130
|
+
const e = n();
|
|
131
|
+
return t[e][r] || {};
|
|
131
132
|
};
|
|
132
133
|
export {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
i as changeTheme,
|
|
135
|
+
n as getCurTheme,
|
|
136
|
+
s as getSystemThemeConfig,
|
|
137
|
+
d as install
|
|
137
138
|
};
|