- 添加MySQL数据库类型的连接支持,默认端口为3306,用户名为root - 实现Oracle与MySQL连接类型的差异化表单验证逻辑 - 更新连接树组件以区分不同数据库类型的显示方式 - 集成备份恢复任务面板,支持双标签页切换功能 - 优化表格排序功能,增强连接列表的可操作性 - 调整任务面板布局,改进用户体验和界面交互 - 新增连接对话框中数据库类型的选择与初始化逻辑
31 lines
1.3 KiB
JavaScript
31 lines
1.3 KiB
JavaScript
import fs from 'node:fs'
|
|
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const currentDir = path.dirname(fileURLToPath(import.meta.url))
|
|
const pageDir = path.join(currentDir, '..')
|
|
const taskPanelSource = fs.readFileSync(path.join(pageDir, 'components/DbmsTaskPanel.vue'), 'utf8')
|
|
|
|
const checks = [
|
|
['backup table select supports multiple values', /<el-select[\s\S]*v-model="backupForm\.targetNames"[\s\S]*\bmultiple\b/.test(taskPanelSource)],
|
|
['backup table select keeps collapsed tags tooltip', /<el-select[\s\S]*v-model="backupForm\.targetNames"[\s\S]*\bcollapse-tags-tooltip\b/.test(taskPanelSource)],
|
|
[
|
|
'backup table select displays at most two selected table tags before collapsing',
|
|
/<el-select[\s\S]*v-model="backupForm\.targetNames"[\s\S]*:max-collapse-tags="2"/.test(taskPanelSource)
|
|
],
|
|
[
|
|
'backup table select dropdown should not force a two-column option grid',
|
|
!/\.dbms-table-select-popper \.el-select-dropdown__list\s*\{[\s\S]*grid-template-columns:\s*repeat\(2/.test(taskPanelSource)
|
|
]
|
|
]
|
|
|
|
const failures = checks.filter(([, passed]) => !passed)
|
|
|
|
if (failures.length) {
|
|
console.error('dbms task panel table select contract failed:')
|
|
failures.forEach(([message]) => console.error(`- ${message}`))
|
|
process.exit(1)
|
|
}
|
|
|
|
console.log('dbms task panel table select contract passed')
|