20260914223013
This commit is contained in:
1 parent
549c8bd2eb
commit
63514476d7
60 files changed
+6478
-2004
No files matched your search
@@ -5,6 +5,12 @@ import FmsQueryControl from '@/components/fms-module-list/FmsQueryControl.vue'
|
||||
import FmsQueryToolbar from '@/components/fms-module-list/FmsQueryToolbar.vue'
|
||||
import FmsAdvancedQueryPanel from '@/components/fms-module-list/FmsAdvancedQueryPanel.vue'
|
||||
|
||||
/** 构造一个查询条件项(字段 + 配置),供工具栏布局用例复用 */
|
||||
const queryItem = (field) => ({
|
||||
field: { b_field: field, b_type: 'input' },
|
||||
config: { b_operator: 'like', b_component: 'input' },
|
||||
})
|
||||
|
||||
describe('fms-module-list components', () => {
|
||||
beforeEach(() => setActivePinia(createPinia()))
|
||||
|
||||
@@ -27,6 +33,33 @@ describe('fms-module-list components', () => {
|
||||
expect(wrapper.html()).not.toContain('<a-')
|
||||
})
|
||||
|
||||
it('查询条件网格列数按条件数收缩(只有一个条件时不占 4 列宽)', () => {
|
||||
const one = mount(FmsQueryToolbar, {
|
||||
props: {
|
||||
queryItems: [queryItem('b_name')],
|
||||
queryLayout: { area: { b_name: 'quick' }, order: { b_name: 10 } },
|
||||
},
|
||||
})
|
||||
expect(one.find('.query-grid').element.style.gridTemplateColumns).toBe(
|
||||
'repeat(1, minmax(0, 200px))',
|
||||
)
|
||||
one.unmount()
|
||||
|
||||
const four = mount(FmsQueryToolbar, {
|
||||
props: {
|
||||
queryItems: [queryItem('a'), queryItem('b'), queryItem('c'), queryItem('d')],
|
||||
queryLayout: {
|
||||
area: { a: 'quick', b: 'quick', c: 'quick', d: 'quick' },
|
||||
order: {},
|
||||
},
|
||||
},
|
||||
})
|
||||
expect(four.find('.query-grid').element.style.gridTemplateColumns).toBe(
|
||||
'repeat(4, minmax(0, 200px))',
|
||||
)
|
||||
four.unmount()
|
||||
})
|
||||
|
||||
it('高级查询行间连接符表达行与行的连接:≥2 项才出现,点击切换后一项的 join', async () => {
|
||||
const state = {
|
||||
nodes: [
|
||||
|
||||
Reference in new issue
Block a user