fix: 补充图库未选中布局背景

为未选中的网格或瀑布流按钮增加浅灰底色,保留选中绿色状态,并补充切换状态测试。
This commit is contained in:
GouJ authored and GitHub committed 2026-09-08 10:22:39 +08:00
1 parent 42c40383dc
commit c22d281cc7
4 files changed
+33 -18

No files matched your search

@@ -141,10 +141,14 @@ describe('过期首帧到具体素材定位', () => {
const cards = wrapper!.findAll('.form-image-card').map(card => card.element)
scroll.scrollTop = 240
expect(wrapper!.get('[aria-label="网格布局"]').attributes('aria-pressed')).toBe('true')
expect(wrapper!.get('[aria-label="网格布局"]').classes()).toContain('layout-option-active')
expect(wrapper!.get('[aria-label="瀑布流布局"]').classes()).not.toContain('layout-option-active')
await wrapper!.get('[aria-label="瀑布流布局"]').trigger('click')
expect(wrapper!.get('.form-image-masonry').element).toBe(grid)
expect(wrapper!.get('[aria-label="瀑布流布局"]').attributes('aria-pressed')).toBe('true')
expect(wrapper!.get('[aria-label="瀑布流布局"]').classes()).toContain('layout-option-active')
expect(wrapper!.get('[aria-label="网格布局"]').attributes('aria-pressed')).toBe('false')
expect(wrapper!.get('[aria-label="网格布局"]').classes()).not.toContain('layout-option-active')
expect(wrapper!.findAll('.form-image-card').map(card => card.element)).toEqual(cards)
expect(scroll.scrollTop).toBe(240)
expect(