yxuse 1.0.55 → 1.0.57

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/lib/index.es5.js CHANGED
@@ -1,4 +1,4 @@
1
- const g = {
1
+ const t = {
2
2
  green: {
3
3
  common: {
4
4
  color: {
@@ -197,51 +197,213 @@ const g = {
197
197
  },
198
198
  blue: {
199
199
  common: {
200
- "--test1": "#fff",
201
- "--test2": "#ccc"
200
+ color: {
201
+ "main-100": "#0A2F52",
202
+ "main-50": "#5477CF",
203
+ "main-25": "#3E75CF",
204
+ "main-15": "#E4EDFF",
205
+ "main-5": "#5477CF",
206
+ "error-100": "#FF9892",
207
+ "error-50": "#FFF4F3",
208
+ "error-25": "#F9EACE",
209
+ "error-15": "rgba(255, 152, 146, 0.15)",
210
+ "error-5": "rgba(255, 152, 146, 0.05)",
211
+ "warning-100": "#F9A221",
212
+ "warning-50": "#F8B85A",
213
+ "warning-25": "#F9EACE",
214
+ "warning-15": "rgba(249, 162, 33, 0.15)",
215
+ "warning-5": "rgba(249, 162, 33, 0.05)",
216
+ "info-100": "rgba(133, 233, 183, 1)",
217
+ "info-50": "rgba(133, 233, 183, 0.5)",
218
+ "info-25": "rgba(133, 233, 183, 0.25)",
219
+ "info-15": "rgba(133, 233, 183, 0.15)",
220
+ "info-5": "rgba(133, 233, 183, 0.05)",
221
+ "neutral-100": "rgba(85, 221, 221, 1)",
222
+ "neutral-50": "rgba(85, 221, 221, 0.5)",
223
+ "neutral-25": "rgba(85, 221, 221, 0.25)",
224
+ "neutral-15": "rgba(85, 221, 221, 0.15)",
225
+ "neutral-5": "rgba(85, 221, 221, 0.05)"
226
+ },
227
+ background: {
228
+ "error-gradual": "#FF9892",
229
+ "warning-gradual": "#F8B85A",
230
+ "success-gradual": "linear-gradient(90deg, #D5ECBE 0%, rgba(234,255,233,0.35) 100%)",
231
+ "success-gradient": "#D5ECBE 0%, rgba(234,255,233,0.35) 100%",
232
+ "warning-gradient": "#FFE4BC 0%, rgba(255,250,233,0.35) 100%",
233
+ "error-gradient": "#FFCECB 0%, rgba(255,235,233,0.35) 100%",
234
+ page: "rgba(241, 243, 242, 1)",
235
+ "main-content-special": "rgba(103, 186, 145, 0.10)",
236
+ section: "rgba(252, 255, 253, 1)",
237
+ success: "rgba(80, 165, 122, 1)",
238
+ warning: "#F9A221",
239
+ error: "#FF9892"
240
+ },
241
+ button: {
242
+ background: "rgba(103, 186, 145, 0.10)",
243
+ "border-color": "rgba(80, 165, 122, 1)",
244
+ "text-color": "rgba(80, 165, 122, 1)",
245
+ "active-background-color": "rgba(80, 165, 122, 1)",
246
+ "active-border-color": "rgba(154, 209, 162, 1)",
247
+ "active-text-color": "#fff"
248
+ },
249
+ checkbox: {
250
+ background: "rgba(216, 233, 219, 1)",
251
+ "icon-color": "rgba(80, 165, 122, 0)",
252
+ "border-color": "rgba(154, 209, 162, 1)",
253
+ "text-color": "#9AD1A2",
254
+ "checked-text-color": "#1D4B34",
255
+ "checked-background": "rgba(216, 233, 219, 1)",
256
+ "checked-icon-color": "rgba(80, 165, 122, 1)",
257
+ "checked-border-color": "rgba(154, 209, 162, 1)"
258
+ },
259
+ radio: {
260
+ background: "rgba(191, 225, 209, 1)",
261
+ "icon-border-color": "rgba(191, 225, 209, 1)",
262
+ "icon-checked-background": "rgba(103, 186, 145, 1)",
263
+ "icon-checked-point-background": "rgba(210, 255, 218, 1)"
264
+ },
265
+ switch: {
266
+ background: "#637B6B",
267
+ "icon-point-background": "#fff",
268
+ "icon-checked-point-background": "#90E6BA",
269
+ "checked-background": "#9BE9C2"
270
+ },
271
+ input: {
272
+ background: "rgba(237, 246, 239, 1)",
273
+ "border-color": "rgba(80, 165, 122, 1)",
274
+ color: "rgba(29, 75, 52, 1)",
275
+ "placeholder-color": "rgba(80, 165, 122, 1)",
276
+ "hover-background": "rgba(237, 246, 239, 0.30)",
277
+ "hover-border-color": "rgba(80, 165, 122, 1)",
278
+ "hover-color": "rgba(80, 165, 122, 1)",
279
+ "active-background": "rgba(237, 246, 239, 0.30)",
280
+ "active-border-color": "rgba(80, 165, 122, 1)",
281
+ "active-color": "rgba(80, 165, 122, 1)",
282
+ "disabled-background": "rgba(219, 232, 221, 1)",
283
+ "disabled-border-color": "#fff",
284
+ "disabled-color": "rgba(80, 165, 122, 0.5)",
285
+ "append-background": "transparent",
286
+ "append-color": "#50A57A"
287
+ },
288
+ select: {
289
+ "dropdown-background": "rgba(237, 246, 239, 1)",
290
+ "dropdown-border-color": "rgba(80, 165, 122, 1)",
291
+ "dropdown-item-color": "rgba(80, 165, 122, 1)",
292
+ "dropdown-item-hover-background": "rgba(178, 220, 198, 1)",
293
+ "dropdown-item-hover-color": "rgba(29, 75, 52, 1)",
294
+ "dropdown-item-selected-background": "rgba(178, 220, 198, 1)",
295
+ "dropdown-item-selected-color": "rgba(29, 75, 52, 1)"
296
+ },
297
+ tree: {
298
+ text: "rgba(99,123,107,0.50)"
299
+ },
300
+ layout: {
301
+ "nav-background": "#fff",
302
+ "view-background": "#F1F3F2"
303
+ },
304
+ table: {
305
+ "header-background": "#5477CF",
306
+ "header-text-color": "#fff",
307
+ "row-background": "#F9FBFF",
308
+ "row-odd-background": "#F9FBFF",
309
+ //奇数行色值
310
+ "row-border-bottom-color": "#E4EDFF",
311
+ "row-text-color": "#0A2F52",
312
+ "row-error-background": "linear-gradient(90deg, #FFCECB 0%, rgba(255,235,233,0.35) 100%)",
313
+ "row-warning-background": "linear-gradient(90deg, #FFE4BC 0%, rgba(255,250,233,0.35) 100%)",
314
+ "row-hover-background": "rgba(62,117,207,0.2)",
315
+ "row-hover-text-color": "rgba(29, 75, 52, 1)"
316
+ },
317
+ chart: {
318
+ pie_color_1: "#50A57A",
319
+ pie_color_2: "#F8B85A",
320
+ pie_color_3: "#FF9892",
321
+ pie_color_4: "#55DDDD",
322
+ pie_color_5: "#85E9B7",
323
+ line_color_1: "#50A57A",
324
+ line_color_2: "#F8B85A",
325
+ line_color_3: "#FF9892",
326
+ line_color_4: "#55DDDD",
327
+ line_color_5: "#85E9B7",
328
+ line_title_color: "#637B6B",
329
+ line_xAxis_color: "#50A57A",
330
+ line_yAxis_color: "#50A57A",
331
+ line_markLine_color: "#FF9892",
332
+ line_splitLine_color: "#DBEEE3"
333
+ },
334
+ message: {},
335
+ text: {
336
+ main: "#50A57A",
337
+ deep: "#1D4B34",
338
+ light: "rgba(80, 165, 122, 0.50)",
339
+ paler: "#637B6B",
340
+ success: "#8FF59E",
341
+ warning: "#F8B85A",
342
+ error: "#FF9892",
343
+ white: "#fff",
344
+ light_gray: "#B0BDB4"
345
+ },
346
+ //弹窗
347
+ dialog: {
348
+ "header-background": "#fff",
349
+ "body-background": "#fff",
350
+ "footer-background": "#fff"
351
+ },
352
+ //进度条
353
+ progress: {
354
+ background: "#CADFD3",
355
+ "active-background": "#67BA91"
356
+ },
357
+ icon: {
358
+ "title-main": "#DAF1E5",
359
+ "title-assist": "#F9A221",
360
+ "title-assist-2": "#50A57A",
361
+ "active-color": "rgba(80,165,122,1)",
362
+ "active-light-color": "#F9A221"
363
+ }
202
364
  },
203
365
  cloud: {},
204
366
  "station-control-center": {}
205
367
  }
206
- }, c = "yxTheme", l = "green", i = () => {
207
- const r = t();
208
- localStorage.getItem(c) || localStorage.setItem(c, r);
209
- const e = document.documentElement, o = g[r].common;
210
- Object.keys(o).forEach((a) => {
211
- Object.keys(o[a]).forEach((n) => {
368
+ }, g = "yxTheme", l = "blue", i = () => {
369
+ const r = c();
370
+ localStorage.getItem(g) || localStorage.setItem(g, r);
371
+ const o = document.documentElement, e = t[r].common;
372
+ Object.keys(e).forEach((a) => {
373
+ Object.keys(e[a]).forEach((n) => {
212
374
  const b = `--${a}-${n}`;
213
- e.style.setProperty(b, o[a][n]);
375
+ o.style.setProperty(b, e[a][n]);
214
376
  });
215
377
  });
216
378
  }, d = (r) => {
217
- localStorage.setItem(c, r), i();
218
- }, t = () => localStorage.getItem(c) || l, u = (r) => {
219
- const e = t();
220
- return g[e][r] || {};
221
- }, s = (r) => {
222
- const e = t();
223
- return g[e].common[r] || {};
379
+ localStorage.setItem(g, r), i();
380
+ }, c = () => localStorage.getItem(g) || l, u = (r) => {
381
+ const o = c();
382
+ return t[o][r] || {};
224
383
  }, F = (r) => {
225
- const e = t(), o = g[e][r], a = document.documentElement;
226
- Object.keys(o).forEach((n) => {
384
+ const o = c();
385
+ return t[o].common[r] || {};
386
+ }, s = (r) => {
387
+ const o = c(), e = t[o][r], a = document.documentElement;
388
+ Object.keys(e).forEach((n) => {
227
389
  const b = `--${n}`;
228
- a.style.setProperty(b, o[n]);
390
+ a.style.setProperty(b, e[n]);
229
391
  });
230
- }, m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
392
+ }, k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
231
393
  __proto__: null,
232
394
  changeTheme: d,
233
- getCurTheme: t,
234
- getGroupColor: s,
395
+ getCurTheme: c,
396
+ getGroupColor: F,
235
397
  getSystemThemeConfig: u,
236
398
  install: i,
237
- installSystemTheme: F
399
+ installSystemTheme: s
238
400
  }, Symbol.toStringTag, { value: "Module" }));
239
401
  export {
240
402
  u as a,
241
- s as b,
403
+ F as b,
242
404
  d as c,
243
- F as d,
244
- t as g,
405
+ s as d,
406
+ c as g,
245
407
  i,
246
- m as t
408
+ k as t
247
409
  };
Binary file
package/lib/index.es6.js CHANGED
@@ -1,56 +1,27 @@
1
- import { d as g, o as m, c, w, m as d, r as f, a as v, b as k, F as x, e as S, f as l, g as b, i as T } from "./vue.runtime.esm-bundler.es.js";
2
- const C = {
3
- tableData: {
4
- type: Array,
5
- require: !0
6
- },
7
- rowKey: {
8
- type: String,
9
- require: !0
10
- },
11
- columns: {
12
- type: Array,
13
- require: !0,
14
- default: () => []
15
- },
16
- sortHandle: {
17
- type: String,
18
- default: "",
19
- require: !1
20
- },
21
- border: {
22
- type: Boolean,
23
- default: !1
24
- },
25
- align: {
26
- type: String,
27
- default: "center",
28
- require: !1
29
- }
30
- }, j = /* @__PURE__ */ g({
31
- __name: "DynamicComponents",
1
+ import { d as v, o as g, c as l, w as C, m as w, r as T, a as N, b as O, F as V, e as S, f as P, g as d, h as x, i as B, j as Y } from "./vue.runtime.esm-bundler.es.js";
2
+ const D = /* @__PURE__ */ v({
3
+ __name: "index",
32
4
  props: {
33
- col: null,
34
- row: null
5
+ conf: null,
6
+ model: null
35
7
  },
36
- setup(t) {
37
- const a = t;
38
- return (u, s) => {
39
- var i, n, p;
40
- return m(), c(f(`el-${(i = a.col) == null ? void 0 : i.type}`), d({
41
- modelValue: t.row[(n = a.col) == null ? void 0 : n.prop],
42
- "onUpdate:modelValue": s[0] || (s[0] = (e) => {
43
- var r;
44
- return t.row[(r = a.col) == null ? void 0 : r.prop] = e;
8
+ setup(r) {
9
+ return (m, u) => {
10
+ var p, b, f;
11
+ return g(), l(T(`el-${(p = r.conf) == null ? void 0 : p.renderType}`), w({
12
+ modelValue: r.model[(b = r.conf) == null ? void 0 : b.prop],
13
+ "onUpdate:modelValue": u[0] || (u[0] = (s) => {
14
+ var t;
15
+ return r.model[(t = r.conf) == null ? void 0 : t.prop] = s;
45
16
  })
46
- }, (p = a.col) == null ? void 0 : p.config), {
47
- default: w(() => {
48
- var e;
17
+ }, (f = r.conf) == null ? void 0 : f.config), {
18
+ default: C(() => {
19
+ var s, t, y;
49
20
  return [
50
- a.col.type === "select" ? (m(!0), v(x, { key: 0 }, k((e = a.col) == null ? void 0 : e.config.options, (r) => (m(), c(f("el-option"), {
51
- key: r.value,
52
- label: r.label,
53
- value: r.value
21
+ r.conf.renderType === "select" ? (g(!0), N(V, { key: 0 }, O((y = (t = (s = r.conf) == null ? void 0 : s.config) == null ? void 0 : t.options) != null ? y : [], (i) => (g(), l(T("el-option"), {
22
+ key: i.value,
23
+ label: i.label,
24
+ value: i.value
54
25
  }, null, 8, ["label", "value"]))), 128)) : S("", !0)
55
26
  ];
56
27
  }),
@@ -59,54 +30,85 @@ const C = {
59
30
  };
60
31
  }
61
32
  });
62
- function N(t) {
63
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !T(t);
33
+ function E(r) {
34
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Y(r);
64
35
  }
65
- const V = {
66
- "operate-handle": (t, a) => !!(t || a)
67
- }, _ = /* @__PURE__ */ g({
36
+ const F = {
37
+ "operate-handle": (r, m) => !!(r || m)
38
+ }, M = /* @__PURE__ */ v({
68
39
  name: "YxTable",
69
- props: C,
70
- emits: V,
71
- setup(t, {
72
- attrs: a,
40
+ props: {
41
+ tableProps: {
42
+ type: Object,
43
+ required: !0
44
+ }
45
+ },
46
+ emits: F,
47
+ setup(r, {
48
+ attrs: m,
73
49
  slots: u,
74
- emit: s
50
+ emit: p,
51
+ expose: b
75
52
  }) {
76
- return () => {
77
- const i = (e, r) => {
53
+ const f = P();
54
+ return b({
55
+ tableRef: f
56
+ }), () => {
57
+ const {
58
+ columns: s,
59
+ align: t,
60
+ rowKey: y,
61
+ tableData: i,
62
+ border: h
63
+ } = r.tableProps, j = (e, n) => {
78
64
  var o;
79
- return e.slotName && ((o = u[e.slotName]) == null ? void 0 : o.call(u, r));
80
- }, n = t.columns.map((e) => l(b("el-table-column"), d(e, {
81
- align: t.align
65
+ return e.slotName && ((o = u[e.slotName]) == null ? void 0 : o.call(u, n));
66
+ }, c = s.map((e) => d(x("el-table-column"), w(e, {
67
+ align: t
82
68
  }), {
83
- default: (r) => (e == null ? void 0 : e.renderType) === "operate" ? p(e, r) : e != null && e.renderType && (e == null ? void 0 : e.renderType) !== "operate" ? l(j, {
84
- col: e,
85
- row: r.row
86
- }, null) : (e == null ? void 0 : e.slotName) && i(e, r)
87
- })), p = (e, r) => {
69
+ default: (n) => {
70
+ if ((e == null ? void 0 : e.renderType) === "operate")
71
+ return k(e, n);
72
+ if (e != null && e.renderType && (e == null ? void 0 : e.renderType) !== "operate") {
73
+ const o = {
74
+ renderType: e.renderType,
75
+ prop: e.prop,
76
+ config: e.config
77
+ };
78
+ return d(D, {
79
+ conf: o,
80
+ model: n.row
81
+ }, null);
82
+ }
83
+ return e != null && e.render ? e == null ? void 0 : e.render(n) : (e == null ? void 0 : e.slotName) && j(e, n);
84
+ }
85
+ })), k = (e, n) => {
88
86
  var o;
89
- return l("div", {
87
+ return d("div", {
90
88
  class: "flex justify-center cursor-pointer"
91
- }, [(o = e.operate) == null ? void 0 : o.map((y) => l("span", {
92
- onClick: () => s("operate-handle", y.key, r.row),
89
+ }, [(o = e.operate) == null ? void 0 : o.filter((a) => (a == null ? void 0 : a.show) || a.show == null).map((a) => d("span", {
90
+ onClick: B(() => p("operate-handle", a.key, n.row), ["stop"]),
93
91
  class: "mr-10 whitespace-nowrap"
94
- }, [y.label]))]);
92
+ }, [a.label]))]);
95
93
  };
96
- return l("div", null, [l(b("el-table"), d(a, {
97
- "row-key": t.rowKey,
98
- data: t.tableData,
99
- border: t.border
100
- }), N(n) ? n : {
101
- default: () => [n]
94
+ return d("div", {
95
+ class: "w-full h-full flex flex-col"
96
+ }, [d(x("el-table"), w({
97
+ ref: f
98
+ }, m, {
99
+ "row-key": y,
100
+ data: i,
101
+ border: h
102
+ }), E(c) ? c : {
103
+ default: () => [c]
102
104
  })]);
103
105
  };
104
106
  }
105
- }), O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
107
+ }), z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
106
108
  __proto__: null,
107
- YxTable: _
109
+ YxTable: M
108
110
  }, Symbol.toStringTag, { value: "Module" }));
109
111
  export {
110
- _ as Y,
111
- O as c
112
+ M as Y,
113
+ z as c
112
114
  };