@cmstops/pro-compo 0.1.33 → 0.1.34
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/es/config.d.ts +2 -2
- package/es/config.js +5 -4
- package/es/resourceModal/component.js +5 -5
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -2
- package/es/resourceModal/components/MediaSelection/index.js +6 -6
- package/es/selectGategory/component.js +6 -6
- package/es/selectGategory/components/ColumnSelection/index.js +3 -3
- package/es/selectThumb/component.js +2 -2
- package/es/uploadBefore/component.js +2 -2
- package/es/utils/tusUpload.js +1 -1
- package/lib/config.js +5 -4
- package/lib/resourceModal/component.js +5 -5
- package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -2
- package/lib/resourceModal/components/MediaSelection/index.js +6 -6
- package/lib/selectGategory/component.js +6 -6
- package/lib/selectGategory/components/ColumnSelection/index.js +3 -3
- package/lib/selectThumb/component.js +2 -2
- package/lib/uploadBefore/component.js +2 -2
- package/lib/utils/tusUpload.js +1 -1
- package/package.json +1 -1
package/es/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DEFAULT_BASE_API
|
|
2
|
-
export declare const DEFAULT_BASE_ACCOUNT_HOST:
|
|
1
|
+
export declare const DEFAULT_BASE_API: any;
|
|
2
|
+
export declare const DEFAULT_BASE_ACCOUNT_HOST: any;
|
|
3
3
|
export declare const DEFAULT_UPLOAD_CHUNK_SIZE: number;
|
|
4
4
|
export declare const DEFAULT_UPLOAD_URL: string;
|
package/es/config.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2
|
+
const DEFAULT_BASE_API = ((_b = (_a = window.situoyun) == null ? void 0 : _a.env) == null ? void 0 : _b.BASE_HOST) || "https://site.cmstop.xyz";
|
|
3
|
+
const DEFAULT_BASE_ACCOUNT_HOST = ((_d = (_c = window.situoyun) == null ? void 0 : _c.env) == null ? void 0 : _d.BASE_ACCOUNT_HOST) || "https://account.cmstop.xyz";
|
|
4
|
+
const DEFAULT_UPLOAD_CHUNK_SIZE = ((_f = (_e = window.situoyun) == null ? void 0 : _e.env) == null ? void 0 : _f.UPLOAD_CHUNK_SIZE) || 5242880;
|
|
5
|
+
const DEFAULT_UPLOAD_URL = ((_h = (_g = window.situoyun) == null ? void 0 : _g.env) == null ? void 0 : _h.BASE_STATIC_FILE_API) || "https://oss.cmstop.xyz/maple/v1";
|
|
5
6
|
export { DEFAULT_BASE_ACCOUNT_HOST, DEFAULT_BASE_API, DEFAULT_UPLOAD_CHUNK_SIZE, DEFAULT_UPLOAD_URL };
|
|
@@ -12,7 +12,7 @@ const _sfc_main = defineComponent({
|
|
|
12
12
|
ai_static_covers: {},
|
|
13
13
|
ai_gif_covers: {},
|
|
14
14
|
preview: { type: Boolean },
|
|
15
|
-
|
|
15
|
+
BASE_API: {},
|
|
16
16
|
mediaUseType: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:dialogVisible", "submit"],
|
|
@@ -22,8 +22,8 @@ const _sfc_main = defineComponent({
|
|
|
22
22
|
if (!injectMediaUseType && props.mediaUseType) {
|
|
23
23
|
provide("mediaUseType", props.mediaUseType || mediaUseEnum.THUMB);
|
|
24
24
|
}
|
|
25
|
-
provide("baseAPI", props.
|
|
26
|
-
const BASE_API = props.
|
|
25
|
+
provide("baseAPI", props.BASE_API || DEFAULT_BASE_API);
|
|
26
|
+
const BASE_API = props.BASE_API || DEFAULT_BASE_API;
|
|
27
27
|
const selectedMax = ref(1);
|
|
28
28
|
const emit = __emit;
|
|
29
29
|
const submit = (itemData) => {
|
|
@@ -66,12 +66,12 @@ const _sfc_main = defineComponent({
|
|
|
66
66
|
createVNode(_sfc_main$1, {
|
|
67
67
|
"selected-max": selectedMax.value,
|
|
68
68
|
"catalog-props": _ctx.catalogProps,
|
|
69
|
-
|
|
69
|
+
"b-a-s-e-a-p-i": unref(BASE_API),
|
|
70
70
|
ai_static_covers: _ctx.ai_static_covers,
|
|
71
71
|
ai_gif_covers: _ctx.ai_gif_covers,
|
|
72
72
|
preview: _ctx.preview,
|
|
73
73
|
onConfirm: submit
|
|
74
|
-
}, null, 8, ["selected-max", "catalog-props", "
|
|
74
|
+
}, null, 8, ["selected-max", "catalog-props", "b-a-s-e-a-p-i", "ai_static_covers", "ai_gif_covers", "preview"])
|
|
75
75
|
]),
|
|
76
76
|
_: 1
|
|
77
77
|
}, 8, ["visible"]);
|
|
@@ -15,7 +15,7 @@ const _sfc_main = defineComponent({
|
|
|
15
15
|
__name: "index",
|
|
16
16
|
props: {
|
|
17
17
|
activeMediaType: {},
|
|
18
|
-
|
|
18
|
+
BASE_API: {}
|
|
19
19
|
},
|
|
20
20
|
emits: ["search"],
|
|
21
21
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -38,7 +38,7 @@ const _sfc_main = defineComponent({
|
|
|
38
38
|
limit: limit.value,
|
|
39
39
|
offset: peopleOptions.value.length
|
|
40
40
|
};
|
|
41
|
-
const res = await getAccountList(props.
|
|
41
|
+
const res = await getAccountList(props.BASE_API, 1, query);
|
|
42
42
|
if (res && res.code !== 0)
|
|
43
43
|
return;
|
|
44
44
|
if (res && res.message) {
|
|
@@ -18,7 +18,7 @@ const _sfc_main = defineComponent({
|
|
|
18
18
|
__name: "index",
|
|
19
19
|
props: {
|
|
20
20
|
selectedMax: {},
|
|
21
|
-
|
|
21
|
+
BASE_API: {},
|
|
22
22
|
catalogProps: {},
|
|
23
23
|
preview: { type: Boolean },
|
|
24
24
|
ai_static_covers: {},
|
|
@@ -120,9 +120,9 @@ const _sfc_main = defineComponent({
|
|
|
120
120
|
query = Object.assign(query, filter.value);
|
|
121
121
|
folderList.value = [];
|
|
122
122
|
}
|
|
123
|
-
const promise = filter.value ? [API(props.
|
|
124
|
-
API(props.
|
|
125
|
-
getDirectories(props.
|
|
123
|
+
const promise = filter.value ? [API(props.BASE_API, query)] : [
|
|
124
|
+
API(props.BASE_API, query),
|
|
125
|
+
getDirectories(props.BASE_API, { parent_id: query.directory_id })
|
|
126
126
|
];
|
|
127
127
|
Promise.all(promise).then((res) => {
|
|
128
128
|
const files = res[0].code === 0 ? res[0].message.data || [] : [];
|
|
@@ -215,7 +215,7 @@ const _sfc_main = defineComponent({
|
|
|
215
215
|
ref: getMoreData,
|
|
216
216
|
class: "tool-search-box",
|
|
217
217
|
"active-media-type": activeMediaType.value,
|
|
218
|
-
|
|
218
|
+
"b-a-s-e-a-p-i": _ctx.BASE_API,
|
|
219
219
|
onSearch: search
|
|
220
220
|
}, {
|
|
221
221
|
other: withCtx(() => [
|
|
@@ -233,7 +233,7 @@ const _sfc_main = defineComponent({
|
|
|
233
233
|
})) : createCommentVNode("v-if", true)
|
|
234
234
|
]),
|
|
235
235
|
_: 1
|
|
236
|
-
}, 8, ["active-media-type", "
|
|
236
|
+
}, 8, ["active-media-type", "b-a-s-e-a-p-i"])
|
|
237
237
|
]),
|
|
238
238
|
breadCrumbs.value.length > 1 ? (openBlock(), createBlock(unref(Breadcrumb), {
|
|
239
239
|
key: 0,
|
|
@@ -10,7 +10,7 @@ const _sfc_main = defineComponent({
|
|
|
10
10
|
props: {
|
|
11
11
|
repository_id: {},
|
|
12
12
|
visible: { type: Boolean },
|
|
13
|
-
|
|
13
|
+
BASE_API: {},
|
|
14
14
|
columnData: {},
|
|
15
15
|
columnWithData: {}
|
|
16
16
|
},
|
|
@@ -18,7 +18,7 @@ const _sfc_main = defineComponent({
|
|
|
18
18
|
setup(__props, { emit: __emit }) {
|
|
19
19
|
const props = __props;
|
|
20
20
|
const emit = __emit;
|
|
21
|
-
const BASE_API = props.
|
|
21
|
+
const BASE_API = props.BASE_API || DEFAULT_BASE_API;
|
|
22
22
|
const selectColumnData = ref(props.columnData || []);
|
|
23
23
|
const selectColumnWithData = ref(props.columnWithData || []);
|
|
24
24
|
const visible = computed({
|
|
@@ -67,8 +67,8 @@ const _sfc_main = defineComponent({
|
|
|
67
67
|
"onUpdate:selectColumnData": _cache[0] || (_cache[0] = ($event) => selectColumnData.value = $event),
|
|
68
68
|
"add-text": "\u8BBE\u7F6E\u53D1\u5E03\u81F3\u680F\u76EE",
|
|
69
69
|
repository_id: _ctx.repository_id,
|
|
70
|
-
|
|
71
|
-
}, null, 8, ["selectColumnData", "repository_id", "
|
|
70
|
+
BASE_API: unref(BASE_API)
|
|
71
|
+
}, null, 8, ["selectColumnData", "repository_id", "BASE_API"]),
|
|
72
72
|
_hoisted_2,
|
|
73
73
|
createVNode(_sfc_main$1, {
|
|
74
74
|
selectColumnWithData: selectColumnWithData.value,
|
|
@@ -76,8 +76,8 @@ const _sfc_main = defineComponent({
|
|
|
76
76
|
"add-text": "\u8BBE\u7F6E\u540C\u6B65\u53D1\u5E03\u81F3\u680F\u76EE",
|
|
77
77
|
multiple: true,
|
|
78
78
|
repository_id: _ctx.repository_id,
|
|
79
|
-
|
|
80
|
-
}, null, 8, ["selectColumnWithData", "repository_id", "
|
|
79
|
+
BASE_API: unref(BASE_API)
|
|
80
|
+
}, null, 8, ["selectColumnWithData", "repository_id", "BASE_API"])
|
|
81
81
|
])
|
|
82
82
|
]),
|
|
83
83
|
_: 1
|
|
@@ -19,7 +19,7 @@ const _sfc_main = defineComponent({
|
|
|
19
19
|
...{ name: "selectGategory" },
|
|
20
20
|
__name: "index",
|
|
21
21
|
props: {
|
|
22
|
-
|
|
22
|
+
BASE_API: {},
|
|
23
23
|
repository_id: {},
|
|
24
24
|
selectColumnData: {},
|
|
25
25
|
selectColumnWithData: {},
|
|
@@ -106,7 +106,7 @@ const _sfc_main = defineComponent({
|
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
getCategoryPath(props.
|
|
109
|
+
getCategoryPath(props.BASE_API, {
|
|
110
110
|
repo: props.repository_id,
|
|
111
111
|
category: data == null ? void 0 : data.id
|
|
112
112
|
}).then((res) => {
|
|
@@ -152,7 +152,7 @@ const _sfc_main = defineComponent({
|
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
const getCategoryCategoriesData = async () => {
|
|
155
|
-
const { code, message } = await getCategoryCategoriesTree(props.
|
|
155
|
+
const { code, message } = await getCategoryCategoriesTree(props.BASE_API, {
|
|
156
156
|
repo_id: props.repository_id
|
|
157
157
|
});
|
|
158
158
|
if (code === 0) {
|
|
@@ -410,9 +410,9 @@ const _sfc_main = defineComponent({
|
|
|
410
410
|
preview: false,
|
|
411
411
|
"catalog-props": "image",
|
|
412
412
|
ai_static_covers: _ctx.aiImages,
|
|
413
|
-
|
|
413
|
+
BASE_API: unref(BASE_API),
|
|
414
414
|
onSubmit: submitCallback
|
|
415
|
-
}, null, 8, ["dialogVisible", "ai_static_covers", "
|
|
415
|
+
}, null, 8, ["dialogVisible", "ai_static_covers", "BASE_API"]),
|
|
416
416
|
createVNode(_sfc_main$4, {
|
|
417
417
|
visible: dialogCropperShow.value,
|
|
418
418
|
"onUpdate:visible": _cache[3] || (_cache[3] = ($event) => dialogCropperShow.value = $event),
|
|
@@ -70,9 +70,9 @@ const _sfc_main = defineComponent({
|
|
|
70
70
|
"onUpdate:visable": _cache[0] || (_cache[0] = ($event) => isRef(visBeforeUpload) ? visBeforeUpload.value = $event : null),
|
|
71
71
|
"file-list": unref(preOptionsList),
|
|
72
72
|
"onUpdate:fileList": _cache[1] || (_cache[1] = ($event) => isRef(preOptionsList) ? preOptionsList.value = $event : null),
|
|
73
|
-
|
|
73
|
+
BASE_API: baseApi.value,
|
|
74
74
|
onConfirm: afterPayload
|
|
75
|
-
}, null, 8, ["visable", "file-list", "
|
|
75
|
+
}, null, 8, ["visable", "file-list", "BASE_API"])
|
|
76
76
|
], 64);
|
|
77
77
|
};
|
|
78
78
|
}
|
package/es/utils/tusUpload.js
CHANGED
|
@@ -24,7 +24,7 @@ function uploadByTUS(file, progressCallback) {
|
|
|
24
24
|
function uploadConfig(file) {
|
|
25
25
|
const fType = getFileType(file);
|
|
26
26
|
return {
|
|
27
|
-
endpoint: DEFAULT_UPLOAD_URL
|
|
27
|
+
endpoint: `${DEFAULT_UPLOAD_URL}/upload`,
|
|
28
28
|
chunkSize: DEFAULT_UPLOAD_CHUNK_SIZE,
|
|
29
29
|
retryDelays: [0, 1e3, 3e3, 5e3],
|
|
30
30
|
overridePatchMethod: true,
|
package/lib/config.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const DEFAULT_BASE_API =
|
|
4
|
-
const DEFAULT_BASE_ACCOUNT_HOST =
|
|
5
|
-
const DEFAULT_UPLOAD_CHUNK_SIZE =
|
|
6
|
-
const DEFAULT_UPLOAD_URL =
|
|
4
|
+
const DEFAULT_BASE_API = ((_b = (_a = window.situoyun) == null ? void 0 : _a.env) == null ? void 0 : _b.BASE_HOST) || "https://site.cmstop.xyz";
|
|
5
|
+
const DEFAULT_BASE_ACCOUNT_HOST = ((_d = (_c = window.situoyun) == null ? void 0 : _c.env) == null ? void 0 : _d.BASE_ACCOUNT_HOST) || "https://account.cmstop.xyz";
|
|
6
|
+
const DEFAULT_UPLOAD_CHUNK_SIZE = ((_f = (_e = window.situoyun) == null ? void 0 : _e.env) == null ? void 0 : _f.UPLOAD_CHUNK_SIZE) || 5242880;
|
|
7
|
+
const DEFAULT_UPLOAD_URL = ((_h = (_g = window.situoyun) == null ? void 0 : _g.env) == null ? void 0 : _h.BASE_STATIC_FILE_API) || "https://oss.cmstop.xyz/maple/v1";
|
|
7
8
|
exports.DEFAULT_BASE_ACCOUNT_HOST = DEFAULT_BASE_ACCOUNT_HOST;
|
|
8
9
|
exports.DEFAULT_BASE_API = DEFAULT_BASE_API;
|
|
9
10
|
exports.DEFAULT_UPLOAD_CHUNK_SIZE = DEFAULT_UPLOAD_CHUNK_SIZE;
|
|
@@ -13,7 +13,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
13
13
|
ai_static_covers: {},
|
|
14
14
|
ai_gif_covers: {},
|
|
15
15
|
preview: { type: Boolean },
|
|
16
|
-
|
|
16
|
+
BASE_API: {},
|
|
17
17
|
mediaUseType: {}
|
|
18
18
|
},
|
|
19
19
|
emits: ["update:dialogVisible", "submit"],
|
|
@@ -23,8 +23,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
23
23
|
if (!injectMediaUseType && props.mediaUseType) {
|
|
24
24
|
vue.provide("mediaUseType", props.mediaUseType || mediaSelection.mediaUseEnum.THUMB);
|
|
25
25
|
}
|
|
26
|
-
vue.provide("baseAPI", props.
|
|
27
|
-
const BASE_API = props.
|
|
26
|
+
vue.provide("baseAPI", props.BASE_API || config.DEFAULT_BASE_API);
|
|
27
|
+
const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
|
|
28
28
|
const selectedMax = vue.ref(1);
|
|
29
29
|
const emit = __emit;
|
|
30
30
|
const submit = (itemData) => {
|
|
@@ -67,12 +67,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
67
67
|
vue.createVNode(index, {
|
|
68
68
|
"selected-max": selectedMax.value,
|
|
69
69
|
"catalog-props": _ctx.catalogProps,
|
|
70
|
-
|
|
70
|
+
"b-a-s-e-a-p-i": vue.unref(BASE_API),
|
|
71
71
|
ai_static_covers: _ctx.ai_static_covers,
|
|
72
72
|
ai_gif_covers: _ctx.ai_gif_covers,
|
|
73
73
|
preview: _ctx.preview,
|
|
74
74
|
onConfirm: submit
|
|
75
|
-
}, null, 8, ["selected-max", "catalog-props", "
|
|
75
|
+
}, null, 8, ["selected-max", "catalog-props", "b-a-s-e-a-p-i", "ai_static_covers", "ai_gif_covers", "preview"])
|
|
76
76
|
]),
|
|
77
77
|
_: 1
|
|
78
78
|
}, 8, ["visible"]);
|
|
@@ -16,7 +16,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
16
16
|
__name: "index",
|
|
17
17
|
props: {
|
|
18
18
|
activeMediaType: {},
|
|
19
|
-
|
|
19
|
+
BASE_API: {}
|
|
20
20
|
},
|
|
21
21
|
emits: ["search"],
|
|
22
22
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -39,7 +39,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
39
39
|
limit: limit.value,
|
|
40
40
|
offset: peopleOptions.value.length
|
|
41
41
|
};
|
|
42
|
-
const res = await api.getAccountList(props.
|
|
42
|
+
const res = await api.getAccountList(props.BASE_API, 1, query);
|
|
43
43
|
if (res && res.code !== 0)
|
|
44
44
|
return;
|
|
45
45
|
if (res && res.message) {
|
|
@@ -19,7 +19,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
19
19
|
__name: "index",
|
|
20
20
|
props: {
|
|
21
21
|
selectedMax: {},
|
|
22
|
-
|
|
22
|
+
BASE_API: {},
|
|
23
23
|
catalogProps: {},
|
|
24
24
|
preview: { type: Boolean },
|
|
25
25
|
ai_static_covers: {},
|
|
@@ -121,9 +121,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
121
121
|
query = Object.assign(query, filter.value);
|
|
122
122
|
folderList.value = [];
|
|
123
123
|
}
|
|
124
|
-
const promise = filter.value ? [API(props.
|
|
125
|
-
API(props.
|
|
126
|
-
api.getDirectories(props.
|
|
124
|
+
const promise = filter.value ? [API(props.BASE_API, query)] : [
|
|
125
|
+
API(props.BASE_API, query),
|
|
126
|
+
api.getDirectories(props.BASE_API, { parent_id: query.directory_id })
|
|
127
127
|
];
|
|
128
128
|
Promise.all(promise).then((res) => {
|
|
129
129
|
const files = res[0].code === 0 ? res[0].message.data || [] : [];
|
|
@@ -216,7 +216,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
216
216
|
ref: getMoreData,
|
|
217
217
|
class: "tool-search-box",
|
|
218
218
|
"active-media-type": activeMediaType.value,
|
|
219
|
-
|
|
219
|
+
"b-a-s-e-a-p-i": _ctx.BASE_API,
|
|
220
220
|
onSearch: search
|
|
221
221
|
}, {
|
|
222
222
|
other: vue.withCtx(() => [
|
|
@@ -234,7 +234,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
234
234
|
})) : vue.createCommentVNode("v-if", true)
|
|
235
235
|
]),
|
|
236
236
|
_: 1
|
|
237
|
-
}, 8, ["active-media-type", "
|
|
237
|
+
}, 8, ["active-media-type", "b-a-s-e-a-p-i"])
|
|
238
238
|
]),
|
|
239
239
|
breadCrumbs.value.length > 1 ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Breadcrumb), {
|
|
240
240
|
key: 0,
|
|
@@ -11,7 +11,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
11
11
|
props: {
|
|
12
12
|
repository_id: {},
|
|
13
13
|
visible: { type: Boolean },
|
|
14
|
-
|
|
14
|
+
BASE_API: {},
|
|
15
15
|
columnData: {},
|
|
16
16
|
columnWithData: {}
|
|
17
17
|
},
|
|
@@ -19,7 +19,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
19
19
|
setup(__props, { emit: __emit }) {
|
|
20
20
|
const props = __props;
|
|
21
21
|
const emit = __emit;
|
|
22
|
-
const BASE_API = props.
|
|
22
|
+
const BASE_API = props.BASE_API || config.DEFAULT_BASE_API;
|
|
23
23
|
const selectColumnData = vue.ref(props.columnData || []);
|
|
24
24
|
const selectColumnWithData = vue.ref(props.columnWithData || []);
|
|
25
25
|
const visible = vue.computed({
|
|
@@ -68,8 +68,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
68
68
|
"onUpdate:selectColumnData": _cache[0] || (_cache[0] = ($event) => selectColumnData.value = $event),
|
|
69
69
|
"add-text": "\u8BBE\u7F6E\u53D1\u5E03\u81F3\u680F\u76EE",
|
|
70
70
|
repository_id: _ctx.repository_id,
|
|
71
|
-
|
|
72
|
-
}, null, 8, ["selectColumnData", "repository_id", "
|
|
71
|
+
BASE_API: vue.unref(BASE_API)
|
|
72
|
+
}, null, 8, ["selectColumnData", "repository_id", "BASE_API"]),
|
|
73
73
|
_hoisted_2,
|
|
74
74
|
vue.createVNode(index, {
|
|
75
75
|
selectColumnWithData: selectColumnWithData.value,
|
|
@@ -77,8 +77,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
77
77
|
"add-text": "\u8BBE\u7F6E\u540C\u6B65\u53D1\u5E03\u81F3\u680F\u76EE",
|
|
78
78
|
multiple: true,
|
|
79
79
|
repository_id: _ctx.repository_id,
|
|
80
|
-
|
|
81
|
-
}, null, 8, ["selectColumnWithData", "repository_id", "
|
|
80
|
+
BASE_API: vue.unref(BASE_API)
|
|
81
|
+
}, null, 8, ["selectColumnWithData", "repository_id", "BASE_API"])
|
|
82
82
|
])
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
@@ -20,7 +20,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
20
20
|
...{ name: "selectGategory" },
|
|
21
21
|
__name: "index",
|
|
22
22
|
props: {
|
|
23
|
-
|
|
23
|
+
BASE_API: {},
|
|
24
24
|
repository_id: {},
|
|
25
25
|
selectColumnData: {},
|
|
26
26
|
selectColumnWithData: {},
|
|
@@ -107,7 +107,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
api.getCategoryPath(props.
|
|
110
|
+
api.getCategoryPath(props.BASE_API, {
|
|
111
111
|
repo: props.repository_id,
|
|
112
112
|
category: data == null ? void 0 : data.id
|
|
113
113
|
}).then((res) => {
|
|
@@ -153,7 +153,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
const getCategoryCategoriesData = async () => {
|
|
156
|
-
const { code, message } = await api.getCategoryCategoriesTree(props.
|
|
156
|
+
const { code, message } = await api.getCategoryCategoriesTree(props.BASE_API, {
|
|
157
157
|
repo_id: props.repository_id
|
|
158
158
|
});
|
|
159
159
|
if (code === 0) {
|
|
@@ -411,9 +411,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
411
411
|
preview: false,
|
|
412
412
|
"catalog-props": "image",
|
|
413
413
|
ai_static_covers: _ctx.aiImages,
|
|
414
|
-
|
|
414
|
+
BASE_API: vue.unref(BASE_API),
|
|
415
415
|
onSubmit: submitCallback
|
|
416
|
-
}, null, 8, ["dialogVisible", "ai_static_covers", "
|
|
416
|
+
}, null, 8, ["dialogVisible", "ai_static_covers", "BASE_API"]),
|
|
417
417
|
vue.createVNode(component$1, {
|
|
418
418
|
visible: dialogCropperShow.value,
|
|
419
419
|
"onUpdate:visible": _cache[3] || (_cache[3] = ($event) => dialogCropperShow.value = $event),
|
|
@@ -71,9 +71,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
71
71
|
"onUpdate:visable": _cache[0] || (_cache[0] = ($event) => vue.isRef(visBeforeUpload) ? visBeforeUpload.value = $event : null),
|
|
72
72
|
"file-list": vue.unref(preOptionsList),
|
|
73
73
|
"onUpdate:fileList": _cache[1] || (_cache[1] = ($event) => vue.isRef(preOptionsList) ? preOptionsList.value = $event : null),
|
|
74
|
-
|
|
74
|
+
BASE_API: baseApi.value,
|
|
75
75
|
onConfirm: afterPayload
|
|
76
|
-
}, null, 8, ["visable", "file-list", "
|
|
76
|
+
}, null, 8, ["visable", "file-list", "BASE_API"])
|
|
77
77
|
], 64);
|
|
78
78
|
};
|
|
79
79
|
}
|
package/lib/utils/tusUpload.js
CHANGED
|
@@ -47,7 +47,7 @@ function uploadByTUS(file, progressCallback) {
|
|
|
47
47
|
function uploadConfig(file) {
|
|
48
48
|
const fType = getFileType(file);
|
|
49
49
|
return {
|
|
50
|
-
endpoint: config.DEFAULT_UPLOAD_URL
|
|
50
|
+
endpoint: `${config.DEFAULT_UPLOAD_URL}/upload`,
|
|
51
51
|
chunkSize: config.DEFAULT_UPLOAD_CHUNK_SIZE,
|
|
52
52
|
retryDelays: [0, 1e3, 3e3, 5e3],
|
|
53
53
|
overridePatchMethod: true,
|