wlwy-package 3.2.2 → 3.2.3-httpOnlyCookie.0
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/dist/editor/index.es.js +1 -1
- package/dist/{editor-core-D9MSA0yc.js → editor-core-C7ZO3umt.js} +2 -2
- package/dist/{index-DbAXWdHe.js → index-BPPIVUm2.js} +1 -1
- package/dist/{index-D4mQXwMj.js → index-DtK1XQdW.js} +17 -18
- package/dist/style.css +1 -1
- package/dist/types/packages/axios/service.d.ts +2 -2
- package/dist/types/packages/axios/types/index.d.ts +4 -1
- package/dist/types/packages/components/form/default/type.d.ts +1 -1
- package/dist/wlwy-package.es.js +8 -7
- package/package.json +2 -2
package/dist/editor/index.es.js
CHANGED
|
@@ -2,8 +2,8 @@ import { defineComponent, createElementBlock, openBlock, ref, shallowRef, onMoun
|
|
|
2
2
|
import "xe-utils";
|
|
3
3
|
import { theme, message } from "ant-design-vue";
|
|
4
4
|
import "vue-router";
|
|
5
|
-
import { u as useI18n, b as useLocale, A as API } from "./index-
|
|
6
|
-
import { _ as _export_sfc$1 } from "./index-
|
|
5
|
+
import { u as useI18n, b as useLocale, A as API } from "./index-DtK1XQdW.js";
|
|
6
|
+
import { _ as _export_sfc$1 } from "./index-BPPIVUm2.js";
|
|
7
7
|
var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
|
|
8
8
|
function t(e10) {
|
|
9
9
|
return e10 && e10.__esModule && Object.prototype.hasOwnProperty.call(e10, "default") ? e10.default : e10;
|
|
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
}),
|
|
23
23
|
emits: /* @__PURE__ */ mergeModels(["change", "focus", "blur"], ["update:html", "update:text"]),
|
|
24
24
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
25
|
-
const EditorCore = defineAsyncComponent(() => import("./editor-core-
|
|
25
|
+
const EditorCore = defineAsyncComponent(() => import("./editor-core-C7ZO3umt.js"));
|
|
26
26
|
const html = useModel(__props, "html");
|
|
27
27
|
const text = useModel(__props, "text");
|
|
28
28
|
const props = __props;
|
|
@@ -181,7 +181,7 @@ const useTabsNavStoreWithOut = () => {
|
|
|
181
181
|
function getConfig() {
|
|
182
182
|
return window._CONFIG ?? {};
|
|
183
183
|
}
|
|
184
|
-
function getCookie
|
|
184
|
+
function getCookie(key) {
|
|
185
185
|
return cookie.get(key) || "";
|
|
186
186
|
}
|
|
187
187
|
function setCookie(key, value, options = {}) {
|
|
@@ -207,7 +207,7 @@ function getTopLevelDomain(url) {
|
|
|
207
207
|
}
|
|
208
208
|
function useCookie() {
|
|
209
209
|
return {
|
|
210
|
-
getCookie
|
|
210
|
+
getCookie,
|
|
211
211
|
setCookie,
|
|
212
212
|
removeCookie,
|
|
213
213
|
getCookieAll
|
|
@@ -2705,7 +2705,6 @@ const {
|
|
|
2705
2705
|
mergeConfig
|
|
2706
2706
|
} = axios;
|
|
2707
2707
|
const DEFAULT_LOADING = false;
|
|
2708
|
-
const { getCookie } = useCookie();
|
|
2709
2708
|
const { getLanguage: getLanguage$1 } = useLocale();
|
|
2710
2709
|
class service {
|
|
2711
2710
|
constructor(config2) {
|
|
@@ -2714,40 +2713,40 @@ class service {
|
|
|
2714
2713
|
__publicField(this, "interceptors");
|
|
2715
2714
|
__publicField(this, "showLoading");
|
|
2716
2715
|
__publicField(this, "spinning");
|
|
2717
|
-
__publicField(this, "
|
|
2718
|
-
var _a, _b, _c, _d;
|
|
2716
|
+
__publicField(this, "systemType");
|
|
2717
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2719
2718
|
this.interceptors = config2.interceptors;
|
|
2720
2719
|
this.showLoading = config2.showLoading || DEFAULT_LOADING;
|
|
2721
|
-
|
|
2720
|
+
const headerSystemType = ((_a = config2.headers) == null ? void 0 : _a["System-Type"]) ?? ((_b = config2.headers) == null ? void 0 : _b["system-type"]);
|
|
2721
|
+
this.systemType = config2.systemType || (typeof headerSystemType === "string" ? headerSystemType : "T");
|
|
2722
2722
|
delete config2.interceptors;
|
|
2723
2723
|
delete config2.showLoading;
|
|
2724
2724
|
delete config2.tokenKey;
|
|
2725
|
+
delete config2.systemType;
|
|
2726
|
+
config2.withCredentials = true;
|
|
2725
2727
|
this.instance = axios.create(config2);
|
|
2726
|
-
this.instance.interceptors.request.use((_a = this.interceptors) == null ? void 0 : _a.requestInterceptor, (_b = this.interceptors) == null ? void 0 : _b.requestInterceptorCatch);
|
|
2727
2728
|
this.instance.interceptors.response.use((_c = this.interceptors) == null ? void 0 : _c.responseInterceptor, (_d = this.interceptors) == null ? void 0 : _d.responseInterceptorCatch);
|
|
2728
2729
|
this.instance.interceptors.request.use(
|
|
2729
2730
|
(config22) => {
|
|
2731
|
+
var _a2;
|
|
2730
2732
|
if (this.spinning ?? this.showLoading) {
|
|
2731
2733
|
const commonStore = useCommonStoreWithOut();
|
|
2732
2734
|
commonStore.setLoading(true);
|
|
2733
2735
|
}
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
// 添加时区
|
|
2742
|
-
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
2743
|
-
...config22.headers
|
|
2744
|
-
});
|
|
2736
|
+
config22.headers.delete("satoken");
|
|
2737
|
+
config22.headers.set("language", getLanguage$1());
|
|
2738
|
+
config22.headers.set("System-Type", this.systemType);
|
|
2739
|
+
config22.headers.set("timezone", Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
2740
|
+
if (["POST", "PUT", "PATCH", "DELETE"].includes(((_a2 = config22.method) == null ? void 0 : _a2.toUpperCase()) || "")) {
|
|
2741
|
+
config22.headers.set("X-CSRF-Protection", "1");
|
|
2742
|
+
}
|
|
2745
2743
|
return config22;
|
|
2746
2744
|
},
|
|
2747
2745
|
(error) => {
|
|
2748
2746
|
return error;
|
|
2749
2747
|
}
|
|
2750
2748
|
);
|
|
2749
|
+
this.instance.interceptors.request.use((_e = this.interceptors) == null ? void 0 : _e.requestInterceptor, (_f = this.interceptors) == null ? void 0 : _f.requestInterceptorCatch);
|
|
2751
2750
|
this.instance.interceptors.response.use(
|
|
2752
2751
|
(response) => {
|
|
2753
2752
|
const commonStore = useCommonStoreWithOut();
|