yc-vep-ui 0.6.3 → 0.6.5

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.
@@ -1745,39 +1745,39 @@ function $n() {
1745
1745
  }
1746
1746
  function er(e) {
1747
1747
  if (e.code !== "ok" && e.message === "无效的token") {
1748
- localStorage.setItem("referrer", window.location.href);
1748
+ console.log("=========== 来到 无效的token 拦截器 ==========="), localStorage.setItem("referrer", window.location.href);
1749
1749
  let e = localStorage.getItem("authUrl") || "";
1750
1750
  if (!e) return;
1751
1751
  window.location.href = `http://mpaas-test.app.yuchai.com/oauth2/oauth/authorize?response_type=code&client_id=cict&scope=all&redirect_uri=${e}`;
1752
1752
  } else localStorage.getItem("referrer") && localStorage.removeItem("referrer");
1753
1753
  }
1754
- async function tr(e, t) {
1755
- let n = `${ir}${e}`;
1754
+ async function tr(e, t, n = {}) {
1755
+ let r = `${ir}${e}`;
1756
1756
  if (t) {
1757
1757
  let e = new URLSearchParams(t).toString();
1758
- e && (n = `${n}?${e}`);
1758
+ e && (r = `${r}?${e}`);
1759
1759
  }
1760
- let r = await fetch(n, {
1761
- headers: $n(),
1762
- method: "GET"
1763
- });
1764
- return er(await r.json()), r.json();
1760
+ let i = await (await fetch(r, {
1761
+ method: "GET",
1762
+ headers: Object.assign({}, $n(), n.headers || {})
1763
+ })).json();
1764
+ return er(i), i;
1765
1765
  }
1766
1766
  async function nr(e, t, n = {}) {
1767
- let r = await fetch(`${ir}${e}`, {
1768
- headers: $n(),
1767
+ let r = await (await fetch(`${ir}${e}`, {
1769
1768
  method: "POST",
1770
1769
  body: JSON.stringify(t),
1771
- ...n
1772
- });
1773
- return er(await r.json()), r.json();
1770
+ ...n,
1771
+ headers: Object.assign({}, $n(), n.headers || {})
1772
+ })).json();
1773
+ return er(r), r;
1774
1774
  }
1775
1775
  async function rr(e, t, n = {}) {
1776
1776
  return (await fetch(`${ir}${e}`, {
1777
- headers: $n(),
1778
1777
  method: "POST",
1779
1778
  body: JSON.stringify(t),
1780
- ...n
1779
+ ...n,
1780
+ headers: Object.assign({}, $n(), n.headers || {})
1781
1781
  })).blob();
1782
1782
  }
1783
1783
  var q = {
@@ -3339,13 +3339,10 @@ var _i = { key: 0 }, vi = /* @__PURE__ */ u({
3339
3339
  function Fi(e) {
3340
3340
  Pi = e;
3341
3341
  }
3342
- function Ii(e) {
3343
- localStorage.setItem("authUrl", e);
3344
- }
3345
3342
  function $() {
3346
3343
  return Pi;
3347
3344
  }
3348
- var Li = { install(e, t) {
3345
+ var Ii = { install(e, t) {
3349
3346
  t?.elementPlus && t.elementPlus.install(e), Pi ||= {
3350
3347
  ...e,
3351
3348
  h: f
@@ -3364,4 +3361,4 @@ var Li = { install(e, t) {
3364
3361
  e.config.globalProperties.$message = Or, e.provide?.("message", Or);
3365
3362
  } };
3366
3363
  //#endregion
3367
- export { mn as A, q as C, Pn as D, Hn as E, Ne as M, de as N, wn as O, or as S, qn as T, gr as _, Di as a, sr as b, ui as c, ri as d, ii as f, X as g, Hr as h, Li as i, dn as j, bn as k, li as l, Z as m, Ii as n, wi as o, ei as p, Fi as r, fi as s, $ as t, oi as u, ir as v, Zn as w, ar as x, cr as y };
3364
+ export { dn as A, Zn as C, wn as D, Pn as E, de as M, bn as O, q as S, Hn as T, ir as _, wi as a, ar as b, li as c, ii as d, ei as f, gr as g, X as h, Di as i, Ne as j, mn as k, oi as l, Hr as m, Fi as n, fi as o, Z as p, Ii as r, ui as s, $ as t, ri as u, cr as v, qn as w, or as x, sr as y };
@@ -1,2 +1,2 @@
1
- import { d as e, f as t, l as n, m as r, p as i, u as a } from "../entry-DYqfR6-W.js";
2
- export { a as useDictionary, r as useFetch, e as useRoute, t as useRouter, i as useTable, n as useUser };
1
+ import { c as e, d as t, f as n, l as r, p as i, u as a } from "../entry-DZ5vOIqN.js";
2
+ export { r as useDictionary, i as useFetch, a as useRoute, t as useRouter, n as useTable, e as useUser };
@@ -1,2 +1,2 @@
1
- import { C as e, S as t, b as n, j as r, v as i, x as a, y as o } from "../entry-DYqfR6-W.js";
2
- export { i as baseUrl, o as formatDate, n as omit, e as request, r as tempToRender, a as uniq, t as uniqBy };
1
+ import { A as e, S as t, _ as n, b as r, v as i, x as a, y as o } from "../entry-DZ5vOIqN.js";
2
+ export { n as baseUrl, i as formatDate, o as omit, t as request, e as tempToRender, r as uniq, a as uniqBy };
@@ -1,4 +1,4 @@
1
- declare function get(url: string, params?: Record<string, any>): Promise<any>;
1
+ declare function get(url: string, params?: Record<string, any>, cfg?: RequestInit): Promise<any>;
2
2
  declare function post(url: string, body: Record<string, any>, cfg?: RequestInit): Promise<any>;
3
3
  declare function blob(url: string, body: Record<string, any>, cfg?: RequestInit): Promise<Blob>;
4
4
  declare const _default: {
package/dist/vep-ui.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as e, D as t, E as n, M as r, N as i, O as a, T as o, _ as s, a as c, c as l, g as u, h as d, i as f, k as p, n as m, o as h, r as g, s as _, t as v, w as y } from "./entry-DYqfR6-W.js";
2
- export { i as UiCard, o as UiDescriptions, y as UiDialog, a as UiEditor, e as UiFilter, p as UiForm, n as UiInfiniteScroll, d as UiStaffSelect, r as UiTable, t as UiTree, _ as UiUpload, s as WcUtils, h as YcApproval, u as YcMessage, c as YcPageAgent, f as default, f as ycPlugin, v as getHostVue, l as hooks, m as setAuthUrl, g as setHostVue };
1
+ import { C as e, D as t, E as n, M as r, O as i, T as a, a as o, g as s, h as c, i as l, j as u, k as d, m as f, n as p, o as m, r as h, s as g, t as _, w as v } from "./entry-DZ5vOIqN.js";
2
+ export { r as UiCard, v as UiDescriptions, e as UiDialog, t as UiEditor, d as UiFilter, i as UiForm, a as UiInfiniteScroll, f as UiStaffSelect, u as UiTable, n as UiTree, m as UiUpload, s as WcUtils, o as YcApproval, c as YcMessage, l as YcPageAgent, h as default, h as ycPlugin, _ as getHostVue, g as hooks, p as setHostVue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yc-vep-ui",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "type": "module",
5
5
  "description": "基于 Vue 3 + Element Plus 的企业级 UI 组件库",
6
6
  "keywords": [