feat(short-drama-agent-front): 新增视觉风格骨架屏并优化参考图添加

This commit is contained in:
GJ committed 2026-10-11 00:01:24 +08:00
1 parent 3cc65aa056
commit 519b956808
11 files changed
+621 -242

No files matched your search

+5 -2
View File
@@ -17,6 +17,7 @@ import {
import { readFileSync, readdirSync } from 'node:fs'
import { useTheme } from '@/composables/useTheme'
import { readAllStyles } from '@/testing/styles'
import StyleImages from '@/features/visual-style/components/StyleImages.vue'
let wrapper: VueWrapper | undefined
afterEach(() => {
@@ -277,9 +278,11 @@ describe('全站平面主题', () => {
expect(projects).not.toMatch(/<NButton\b[^>]*\bcircle\b/)
})
it('风格参考图操作按钮与输入行对齐,缩略图在宽屏下保持紧凑', () => {
it('风格参考图页内只保留添加入口,缩略图在宽屏下保持紧凑', () => {
const css = readAllStyles()
expect(css).toMatch(/\.style-image-submit\s*\{[^}]*margin-top:\s*29px;/)
wrapper = mount(StyleImages, { props: { projectId: 'theme-test-project', images: [], disabled: false } })
expect(wrapper.find('form').exists()).toBe(false)
expect(wrapper.findAll('button').map(button => button.text())).toEqual(['从资产库添加', '通过链接添加'])
expect(css).toMatch(
/\.style-image-list\s*\{[^}]*display:\s*grid;[^}]*grid-template-columns:\s*repeat\(auto-fill, minmax\(min\(220px, 100%\), 260px\)\);[^}]*gap:\s*16px;/
)