fix: keep function dialog footer accessible

This commit is contained in:
ZhengYS 2026-08-10 12:00:30 +08:00
parent 7475ea2b2d
commit 16b6841710
2 changed files with 19 additions and 1 deletions

View file

@ -656,6 +656,7 @@ export default {
.drawer-footer {
position: absolute;
bottom: 0;
z-index: 2;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
@ -894,4 +895,4 @@ export default {
padding: 10px 0;
}
}
</style>
</style>

View file

@ -10,6 +10,10 @@ const correctWordApiSource = await readFile(
new URL('../src/apis/module/correctWord.js', import.meta.url),
'utf8',
);
const functionDialogSource = await readFile(
new URL('../src/components/FunctionDialog.vue', import.meta.url),
'utf8',
);
test('address-book permission state consistently uses the target device MAC', () => {
assert.match(
@ -61,3 +65,16 @@ test('correct-word pagination maps the UI page size to the backend limit query',
);
assert.doesNotMatch(correctWordApiSource, /pageSize: params\.pageSize/);
});
test('function dialog footer stays above the expanding MCP tools section', () => {
const mcpLayer = functionDialogSource.match(
/\.mcp-access-point\s*\{[^}]*z-index:\s*(\d+);/s,
);
const footerLayer = functionDialogSource.match(
/\.drawer-footer\s*\{[^}]*z-index:\s*(\d+);/s,
);
assert.ok(mcpLayer, 'MCP section should define its stacking layer');
assert.ok(footerLayer, 'drawer footer should define its stacking layer');
assert.ok(Number(footerLayer[1]) > Number(mcpLayer[1]));
});