fix: 统一知识库卡片布局

- FAQ 与文档知识库统一使用标题下方类型标签

- 同排卡片底部操作栏保持贴底对齐
This commit is contained in:
2026-07-23 16:10:09 +08:00
parent 5a42826d44
commit ebfd91eeab
3 changed files with 40 additions and 1 deletions

View File

@@ -193,4 +193,24 @@ describe('cardList', () => {
expect(wrapper.find('.card-meta-row').exists()).toBe(false);
});
it('支持知识库使用标题与类型标签的堆叠布局', () => {
const wrapper = mountCardList({
data: [
{
collectionType: 'FAQ',
id: 'knowledge-1',
title: '常见问题',
},
],
tagField: 'collectionType',
tagLayout: 'stacked',
tagMap: {
FAQ: 'FAQ',
},
});
expect(wrapper.get('.title-row').classes()).toContain('title-row--stacked');
expect(wrapper.get('.title-row').text()).toContain('FAQ');
});
});