@blueking/bk-user-selector 0.0.38-beta.3 → 0.0.38-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/bk-user-selector",
3
- "version": "0.0.38-beta.3",
3
+ "version": "0.0.38-beta.4",
4
4
  "description": "蓝鲸用户选择器",
5
5
  "license": "MIT",
6
6
  "author": "Tencent BlueKing",
@@ -10678,10 +10678,16 @@ const generateCallbackName = () => {
10678
10678
  const jsonpRequest = (requestUrl, options = {}) => {
10679
10679
  return new Promise((resolve, reject) => {
10680
10680
  const url = unref(requestUrl);
10681
- const { timeout = 1e3 * 60 * 2, params } = options;
10681
+ const { timeout = 1e3 * 60 * 2, params, withCredentials = true } = options;
10682
10682
  const callbackName = generateCallbackName();
10683
10683
  const script = document.createElement("script");
10684
10684
  let timeoutId;
10685
+ if (withCredentials) {
10686
+ script.crossOrigin = "use-credentials";
10687
+ } else {
10688
+ script.crossOrigin = "anonymous";
10689
+ }
10690
+ script.setAttribute("type", "text/javascript");
10685
10691
  const cleanup = () => {
10686
10692
  if (timeoutId) {
10687
10693
  clearTimeout(timeoutId);
@@ -17336,10 +17336,16 @@ ${$(r2)}`), n2;
17336
17336
  const jsonpRequest = (requestUrl, options = {}) => {
17337
17337
  return new Promise((resolve2, reject) => {
17338
17338
  const url = unref(requestUrl);
17339
- const { timeout = 1e3 * 60 * 2, params } = options;
17339
+ const { timeout = 1e3 * 60 * 2, params, withCredentials = true } = options;
17340
17340
  const callbackName = generateCallbackName();
17341
17341
  const script = document.createElement("script");
17342
17342
  let timeoutId;
17343
+ if (withCredentials) {
17344
+ script.crossOrigin = "use-credentials";
17345
+ } else {
17346
+ script.crossOrigin = "anonymous";
17347
+ }
17348
+ script.setAttribute("type", "text/javascript");
17343
17349
  const cleanup = () => {
17344
17350
  if (timeoutId) {
17345
17351
  clearTimeout(timeoutId);
@@ -10700,10 +10700,16 @@ ${$(r2)}`), n2;
10700
10700
  const jsonpRequest = (requestUrl, options = {}) => {
10701
10701
  return new Promise((resolve, reject) => {
10702
10702
  const url = __WEBPACK_EXTERNAL_MODULE_vue__.unref(requestUrl);
10703
- const { timeout = 1e3 * 60 * 2, params } = options;
10703
+ const { timeout = 1e3 * 60 * 2, params, withCredentials = true } = options;
10704
10704
  const callbackName = generateCallbackName();
10705
10705
  const script = document.createElement("script");
10706
10706
  let timeoutId;
10707
+ if (withCredentials) {
10708
+ script.crossOrigin = "use-credentials";
10709
+ } else {
10710
+ script.crossOrigin = "anonymous";
10711
+ }
10712
+ script.setAttribute("type", "text/javascript");
10707
10713
  const cleanup = () => {
10708
10714
  if (timeoutId) {
10709
10715
  clearTimeout(timeoutId);
@@ -8,10 +8,16 @@ const generateCallbackName = () => {
8
8
  const jsonpRequest = (requestUrl, options = {}) => {
9
9
  return new Promise((resolve, reject) => {
10
10
  const url = unref(requestUrl);
11
- const { timeout = 1e3 * 60 * 2, params } = options;
11
+ const { timeout = 1e3 * 60 * 2, params, withCredentials = true } = options;
12
12
  const callbackName = generateCallbackName();
13
13
  const script = document.createElement("script");
14
14
  let timeoutId;
15
+ if (withCredentials) {
16
+ script.crossOrigin = "use-credentials";
17
+ } else {
18
+ script.crossOrigin = "anonymous";
19
+ }
20
+ script.setAttribute("type", "text/javascript");
15
21
  const cleanup = () => {
16
22
  if (timeoutId) {
17
23
  clearTimeout(timeoutId);
@@ -10707,10 +10707,16 @@ ${$(r2)}`), n2;
10707
10707
  const jsonpRequest = (requestUrl, options = {}) => {
10708
10708
  return new Promise((resolve, reject) => {
10709
10709
  const url = __WEBPACK_EXTERNAL_MODULE_vue__.unref(requestUrl);
10710
- const { timeout = 1e3 * 60 * 2, params } = options;
10710
+ const { timeout = 1e3 * 60 * 2, params, withCredentials = true } = options;
10711
10711
  const callbackName = generateCallbackName();
10712
10712
  const script = document.createElement("script");
10713
10713
  let timeoutId;
10714
+ if (withCredentials) {
10715
+ script.crossOrigin = "use-credentials";
10716
+ } else {
10717
+ script.crossOrigin = "anonymous";
10718
+ }
10719
+ script.setAttribute("type", "text/javascript");
10714
10720
  const cleanup = () => {
10715
10721
  if (timeoutId) {
10716
10722
  clearTimeout(timeoutId);
@@ -13,10 +13,16 @@
13
13
  const jsonpRequest = (requestUrl, options = {}) => {
14
14
  return new Promise((resolve, reject) => {
15
15
  const url = vue.unref(requestUrl);
16
- const { timeout = 1e3 * 60 * 2, params } = options;
16
+ const { timeout = 1e3 * 60 * 2, params, withCredentials = true } = options;
17
17
  const callbackName = generateCallbackName();
18
18
  const script = document.createElement("script");
19
19
  let timeoutId;
20
+ if (withCredentials) {
21
+ script.crossOrigin = "use-credentials";
22
+ } else {
23
+ script.crossOrigin = "anonymous";
24
+ }
25
+ script.setAttribute("type", "text/javascript");
20
26
  const cleanup = () => {
21
27
  if (timeoutId) {
22
28
  clearTimeout(timeoutId);