diff --git a/portal-ui/src/components/VideoComposeCard.vue b/portal-ui/src/components/VideoComposeCard.vue index 86c0437..19525ce 100644 --- a/portal-ui/src/components/VideoComposeCard.vue +++ b/portal-ui/src/components/VideoComposeCard.vue @@ -23,7 +23,7 @@ @click="onReferenceEmptyAreaClick">
- 点击或拖拽/粘贴添加参考(仅云存储,不入库);「上传资产」会写入素材库并加入参考 + 点击或拖拽添加参考素材
@@ -129,31 +129,37 @@
-
首帧图
-
-
-
+
-
上传首帧
-
-
-
- +
+
+
首帧图
+
+
+
+
+
上传首帧
+
+
+
+ +
+ +
-
-
-
尾帧图
-
-
-
+
-
上传尾帧
-
-
-
- +
+
尾帧图
+
+
+
+
+
上传尾帧
+
+
+
+ +
+ +
-
@@ -725,15 +731,16 @@ const confirmPickAssets = () => { const mt = entry.mediaType || 'image' const assetType = mt === 'video' ? 'Video' : mt === 'audio' ? 'Audio' : 'Image' - const fd = new FormData() - fd.append('file', entry._fileRef) - fd.append('groupId', gid) - fd.append('assetType', assetType) - fd.append('name', entry?.name || '') const createRes = await request({ url: 'api/byteAsset/createAsset', method: 'POST', - data: fd + // 后端新增:通过 url JSON 创建素材,避免再次上传文件 + data: { + URL: url, + groupId: gid, + assetType, + name: entry?.name || '' + } }) if (createRes.code !== 200) { throw new Error(createRes?.msg || '创建素材失败') @@ -1483,7 +1490,8 @@ defineExpose({ display: grid; height: 100%; min-height: 0; - grid-template-columns: minmax(72px, 0.85fr) minmax(72px, 0.75fr) minmax(168px, 1.35fr) minmax(120px, 2.95fr); + /* 缩小上传资产区域(第2列),增大输入区域(第4列),其它列宽不变 */ + grid-template-columns: minmax(64px, 0.85fr) minmax(44px, 0.52fr) minmax(188px, 1.35fr) minmax(165px, 3.6fr); grid-template-rows: minmax(0, 1fr); column-gap: 10px; align-items: stretch; @@ -1609,22 +1617,24 @@ defineExpose({ .vg-compose-media-scroll--vertical { display: flex; - flex-direction: column; + /* 参考图:允许横向滚动查看更多参考图片 */ + flex-direction: row; flex: 1 1 0; min-height: 0; max-height: 100%; - overflow-x: hidden; - overflow-y: auto; + overflow-x: auto; + overflow-y: hidden; gap: 8px; padding: 2px 4px 2px 2px; - scroll-snap-type: y proximity; - touch-action: pan-y; + scroll-snap-type: x proximity; + touch-action: pan-x; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; } .vg-compose-media-item--tile { - width: 100%; + /* 参考图横向列表:子项需要固定宽度,才能出现横向溢出滚动 */ + width: 90px; height: 56px; flex-shrink: 0; scroll-snap-align: start; @@ -1690,6 +1700,24 @@ defineExpose({ padding: 10px 10px; } +/* 首尾帧:上传区改为并排且不需要滚动 */ +.vg-first-last-panel { + overflow-y: hidden; +} + +.vg-first-last-grid { + display: grid; + grid-template-columns: 45% 45%; + column-gap: 10%; + align-items: start; +} + +.vg-first-last-cell { + display: flex; + flex-direction: column; + min-width: 0; +} + /* 首帧/首尾帧:上传区不参与 flex 收缩,避免参数模块挤压导致上传区裁剪 */ .vg-compose-card--split .vg-first-frame-panel, .vg-compose-card--split .vg-first-last-panel { @@ -2270,6 +2298,19 @@ defineExpose({ box-shadow: 0 0 0 3px rgba(0, 202, 224, 0.15); } +/* 参考图:窗口变窄时,参数选择列减宽,富文本列加宽(其它列不变) */ +@media (max-width: 1400px) and (min-width: 1201px) { + .vg-compose-card--reference { + grid-template-columns: minmax(64px, 0.85fr) minmax(44px, 0.52fr) minmax(170px, 1.05fr) minmax(190px, 4.2fr); + } +} + +@media (max-width: 1280px) and (min-width: 1201px) { + .vg-compose-card--reference { + grid-template-columns: minmax(64px, 0.85fr) minmax(44px, 0.52fr) minmax(160px, 0.9fr) minmax(205px, 4.6fr); + } +} + /* 小分辨率:参考图四块改为自上而下竖版(顺序:参考图 → 资产 → 参数 → 富文本) */ @media (max-width: 768px) { .vg-compose-card--split { diff --git a/portal-ui/src/views/AssetManage.vue b/portal-ui/src/views/AssetManage.vue index 6b1d7cd..8c8e5b8 100644 --- a/portal-ui/src/views/AssetManage.vue +++ b/portal-ui/src/views/AssetManage.vue @@ -202,6 +202,7 @@