@cmstops/pro-compo 0.1.55 → 0.1.56
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.
|
@@ -218,21 +218,21 @@ const _sfc_main = defineComponent({
|
|
|
218
218
|
const file = new File([blob], name, { type: blob.type });
|
|
219
219
|
const result = await uploadByTUS(file);
|
|
220
220
|
const resImg = getUploadFileUrl(result);
|
|
221
|
+
const target = selectedData.value[cropperIndex.value];
|
|
221
222
|
if (props.userInfo) {
|
|
222
223
|
const param = {
|
|
223
224
|
url: resImg.url,
|
|
224
225
|
size: resImg.size,
|
|
225
|
-
alias: replaceSuffix(
|
|
226
|
-
selectedData.value[cropperIndex.value].alias,
|
|
227
|
-
"\u88C1\u5207\u526F\u672C"
|
|
228
|
-
),
|
|
226
|
+
alias: replaceSuffix(target.alias || target.url, "\u88C1\u5207\u526F\u672C"),
|
|
229
227
|
repository_id: props.userInfo.repository_id,
|
|
230
|
-
directory_id:
|
|
228
|
+
directory_id: target.directory_id,
|
|
231
229
|
banner_theme_color: themeColors,
|
|
232
|
-
parent_id: 0
|
|
230
|
+
parent_id: target.id || 0
|
|
233
231
|
};
|
|
232
|
+
if (target.source === "aigc") {
|
|
233
|
+
param.made_by_ai = true;
|
|
234
|
+
}
|
|
234
235
|
if (!props.generateAssets) {
|
|
235
|
-
param.parent_id = selectedData.value[cropperIndex.value].id;
|
|
236
236
|
afterCropperAndUploadFile({
|
|
237
237
|
url: resImg.url,
|
|
238
238
|
banner_theme_color: themeColors
|
|
@@ -225,21 +225,21 @@ const _sfc_main = vue.defineComponent({
|
|
|
225
225
|
const file = new File([blob], name, { type: blob.type });
|
|
226
226
|
const result = await tusUpload.uploadByTUS(file);
|
|
227
227
|
const resImg = getUploadFileUrl(result);
|
|
228
|
+
const target = selectedData.value[cropperIndex.value];
|
|
228
229
|
if (props.userInfo) {
|
|
229
230
|
const param = {
|
|
230
231
|
url: resImg.url,
|
|
231
232
|
size: resImg.size,
|
|
232
|
-
alias: index.replaceSuffix(
|
|
233
|
-
selectedData.value[cropperIndex.value].alias,
|
|
234
|
-
"\u88C1\u5207\u526F\u672C"
|
|
235
|
-
),
|
|
233
|
+
alias: index.replaceSuffix(target.alias || target.url, "\u88C1\u5207\u526F\u672C"),
|
|
236
234
|
repository_id: props.userInfo.repository_id,
|
|
237
|
-
directory_id:
|
|
235
|
+
directory_id: target.directory_id,
|
|
238
236
|
banner_theme_color: themeColors,
|
|
239
|
-
parent_id: 0
|
|
237
|
+
parent_id: target.id || 0
|
|
240
238
|
};
|
|
239
|
+
if (target.source === "aigc") {
|
|
240
|
+
param.made_by_ai = true;
|
|
241
|
+
}
|
|
241
242
|
if (!props.generateAssets) {
|
|
242
|
-
param.parent_id = selectedData.value[cropperIndex.value].id;
|
|
243
243
|
afterCropperAndUploadFile({
|
|
244
244
|
url: resImg.url,
|
|
245
245
|
banner_theme_color: themeColors
|