perf(short-drama-agent-front): 优化制作工作台交互与移动端布局
This commit is contained in:
1 parent
b5eaed3981
commit
54a381ebd3
37 files changed
+1217
-426
No files matched your search
@@ -23,7 +23,7 @@ import FormPromptBatch from './components/FormPromptBatch.vue'
|
||||
import { useKeyframeImpact } from './useKeyframeImpact'
|
||||
import { useProjectContext } from '../projects/context'
|
||||
import { queryText, referenceLocation, referenceTargets } from '../production/asset-links'
|
||||
import { masonryRowSpan, type GalleryLayout } from './layout'
|
||||
import { masonryColumnCount, masonryRowSpan, type GalleryLayout } from './layout'
|
||||
|
||||
/** 形态图库以正式数据库为准;首次读取、手动刷新和自身操作完成后更新,不定时刷新。 */
|
||||
const route = useRoute()
|
||||
@@ -150,7 +150,8 @@ function syncMasonryLayout(container: HTMLElement) {
|
||||
const rowHeight = Number.parseFloat(styles.gridAutoRows)
|
||||
const rowGap = Number.parseFloat(styles.rowGap)
|
||||
const cardGap = Number.parseFloat(styles.columnGap)
|
||||
const columnCount = Math.max(1, styles.gridTemplateColumns.split(/\s+/).filter(Boolean).length)
|
||||
const minCardWidth = Number.parseFloat(styles.getPropertyValue('--gallery-card-min-width'))
|
||||
const columnCount = masonryColumnCount(container.clientWidth, minCardWidth, cardGap)
|
||||
const nextRows = Array<number>(columnCount).fill(1)
|
||||
const cards = Array.from(container.children).filter(
|
||||
(element): element is HTMLElement =>
|
||||
@@ -293,7 +294,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<WorkspacePage compact class="gallery-workspace-page">
|
||||
<WorkspacePage compact mobile-scroll class="gallery-workspace-page">
|
||||
<template #notice>
|
||||
<NAlert v-if="stageComplete" type="success" :show-icon="false">
|
||||
当前制作需要的主体参考图已经准备好,可以继续进行分镜设计。
|
||||
@@ -817,7 +818,10 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
/* 本组件专属布局与 Naive 内部结构覆盖。 */
|
||||
@reference "../../styles/styles.css";
|
||||
.form-image-grid {
|
||||
@apply grid grid-cols-[repeat(auto-fill,_minmax(min(260px,_100%),_1fr))];
|
||||
@apply grid;
|
||||
/* 排版和列数计算共用卡片最小宽度,手机缩窄后不保留桌面隐式列。 */
|
||||
--gallery-card-min-width: 260px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(var(--gallery-card-min-width), 100%), 1fr));
|
||||
--gallery-gap: 12px;
|
||||
gap: var(--gallery-gap);
|
||||
}
|
||||
@@ -839,7 +843,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
padding-top: var(--app-content-gap);
|
||||
}
|
||||
.gallery-workspace-page .form-image-masonry {
|
||||
@apply grid grid-cols-[repeat(auto-fill,_minmax(min(260px,_100%),_1fr))] items-start;
|
||||
@apply items-start;
|
||||
/* 避免每个 1px 网格行都叠加间距,造成卡片下方出现额外空白。 */
|
||||
column-gap: var(--gallery-gap);
|
||||
row-gap: 0;
|
||||
|
||||
Reference in new issue
Block a user