第一次提交

This commit is contained in:
wangjiming
2026-07-27 09:12:47 +08:00
commit b4ff5db17b
579 changed files with 48768 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const root = resolve(fileURLToPath(new URL('..', import.meta.url)))
function read(relativePath) {
return readFileSync(resolve(root, relativePath), 'utf8')
}
function assert(condition, message) {
if (!condition) {
throw new Error(message)
}
}
const appHeader = read('src/components/AppHeader.vue')
const trainingLog = read('src/views/system/TrainingLogView.vue')
assert(
appHeader.includes('showBackButton'),
'AppHeader should gate the global back button behind showBackButton',
)
assert(
appHeader.includes('v-if="showBackButton"'),
'AppHeader should hide 返回上一页 when the current route is not a detail/sub page',
)
assert(
!trainingLog.includes('返回列表'),
'TrainingLogView should rely on the global 返回上一页 button instead of rendering 返回列表',
)
console.log('back-navigation regression checks passed')