fix: 统一知识库卡片布局
- FAQ 与文档知识库统一使用标题下方类型标签 - 同排卡片底部操作栏保持贴底对齐
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user