修正日志页面请求模块导入并补充构建回归
Some checks are pending
Security Checks / security (push) Waiting to run

This commit is contained in:
smail 2026-09-08 22:54:48 +08:00
parent b4337dca40
commit b3935d108d
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,5 @@
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import http from '@/utils/axios'
import { http } from '@/utils/axios'
export function useLogs() {
const category = ref('config')

View File

@ -18,6 +18,12 @@ function fixture(get) {
return { page, dispose: () => dispose() }
}
test('日志页面使用共享 HTTP 客户端的命名导出', () => {
const transport = readFileSync(new URL('../../frontend/src/utils/axios.js', import.meta.url), 'utf8')
assert.match(transport, /export\s*\{\s*http\s*\}/)
assert.match(read('LogSettings.js'), /import\s*\{\s*http\s*\}\s*from\s*['"]@\/utils\/axios['"]/)
})
test('日志页面模板和样式能编译,详情不使用原始 HTML 渲染', () => {
const require = createRequire(new URL('../../frontend/package.json', import.meta.url))
const { parse, compileScript, compileStyle } = require('@vue/compiler-sfc')