Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions ui/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ Store 内部协调状态时可直接引用同入口的具体 Store,避免聚
- 共享规则与功能本地实现分别按专题文档维护,不为单页需求提前提升公共代码。
- 不手工修改 `src/components.d.ts` 等生成文件,通过正常开发或构建流程生成。

## Import 顺序

所有 Vue / TypeScript 文件按以下顺序排列导入,组间不加空行:

1. 框架与第三方依赖;`vue`、`vue-router`、`pinia` 固定优先,其他按路径排序。
2. 所有来源的 `import type` 集中排列,然后是 `@/api/enums` 枚举,最后是 API。
3. 组件与功能依赖:先 `@/` 共享组件和功能模块,再相对路径依赖。
4. 公共模块:常量、Store、工具、路由、国际化等。
5. `@/permission` 或其 `index.ts` 入口固定最后。

组内路径和命名导入成员按字母序排列;混合导入中的显式 `type` 成员拆为 `import type`。
不改写路径或导入别名。无绑定导入(如样式和初始化模块)、执行语句及注释作为排序边界,
保留其顺序与关联;带内部注释的导入声明保留成员写法。
仅含 inline type 成员的值导入保留原写法,避免改为 `import type` 后丢失模块初始化副作用。
规则由 `eslint-rules/import-order.mjs` 实现,通过 `npx eslint <文件或目录> --fix` 自动整理。
生成的声明文件不参与手工整理。

## 验证

只改文档:核对代码、路径引用、Prettier 格式及 `git diff --check`。
Expand Down
2 changes: 2 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ OSS 文件接口。前端业务接口需要可用的后端服务。

`npm run lint` 当前仅配置了 `run-s "lint:*"`,但尚未定义任何 `lint:*` 子脚本,不能作为已执行
ESLint 检查的依据。需要检查代码时,可运行 `npx eslint <待检查的文件或目录>`。
导入顺序由项目 ESLint 规则检查,使用 `npx eslint <文件或目录> --fix` 自动整理;
分组与顺序见 [AGENTS.md](AGENTS.md#import-顺序)。

路由菜单、知识库角色权限与问题分段关联回归测试使用 Node 内置测试运行器:`node --test tests/*.test.mjs`。

Expand Down
4 changes: 4 additions & 0 deletions ui/eslint-rules/import-order.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import type { Rule } from 'eslint'

declare const importOrder: Rule.RuleModule
export default importOrder
115 changes: 115 additions & 0 deletions ui/eslint-rules/import-order.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// 项目导入分组;无绑定导入、注释和可执行语句作为排序边界。
import path from 'node:path'

const compare = (left, right) => (left < right ? -1 : left > right ? 1 : 0)
const frameworks = ['vue', 'vue-router', 'pinia']

function groupOf(source, isType, filename) {
if (isType) return 1
const resolved = source.startsWith('.') ? path.resolve(path.dirname(filename), source).replaceAll('\\', '/') : source
if (/(?:@\/|\/src\/)api\/enums(?:\/|\.|$)/.test(resolved)) return 2
if (/(?:@\/|\/src\/)api\//.test(resolved)) return 3
if (!source.startsWith('.') && !source.startsWith('@/')) return 0
if (/^@\/permission(?:\/index(?:\.ts)?)?$/.test(source)) return 6
if (source.startsWith('.') || /^@\/(?:components|layout|views|workflow-canvas|conversation-panel|assets)\//.test(source)) return 4
return 5
}

function renderImport(node, specifiers, isType, code) {
const prefix = isType ? 'import type ' : 'import '
const defaults = specifiers.filter((specifier) => specifier.type !== 'ImportSpecifier')
const named = specifiers
.filter((specifier) => specifier.type === 'ImportSpecifier')
.sort((left, right) => compare(left.imported.name ?? left.imported.value, right.imported.name ?? right.imported.value))
const bindings = defaults.map((specifier) => code.getText(specifier))
if (named.length) {
const names = named.map((specifier) =>
specifier.importKind === 'type' ? code.getText(specifier).replace(/^type\s+/, '') : code.getText(specifier),
)
const singleLine = `{ ${names.join(', ')} }`
const length = prefix.length + [...bindings, singleLine].join(', ').length + code.getText(node.source).length + 6
// 与 .prettierrc.json 的 printWidth 保持一致。
bindings.push(length > 150 ? `{\n${names.map((name) => ` ${name},`).join('\n')}\n}` : singleLine)
}
return `${prefix}${bindings.join(', ')} from ${code.getText(node.source)}${code.text.slice(node.source.range[1], node.range[1])}`
}

export default {
meta: {
type: 'layout',
fixable: 'code',
schema: [],
messages: { order: '按框架、类型、枚举、API、组件与功能、公共模块、perm 的顺序整理导入。' },
},
create(context) {
const code = context.sourceCode
function check(nodes) {
if (!nodes.length) return
const entries = nodes.flatMap((node) => {
// 带内部注释的声明原样保留,避免改变注释的作用对象。
if (code.getCommentsInside(node).length) {
return [
{ source: node.source.value, group: groupOf(node.source.value, node.importKind === 'type', context.filename), text: code.getText(node) },
]
}
const types = node.specifiers.filter((specifier) => node.importKind === 'type' || specifier.importKind === 'type')
const values = node.specifiers.filter((specifier) => !types.includes(specifier))
return [
[types, true],
[values, false],
]
.filter(([specifiers]) => specifiers.length)
.map(([specifiers, isType]) => ({
source: node.source.value,
group: groupOf(node.source.value, isType, context.filename),
text: renderImport(node, specifiers, isType, code),
}))
})
entries.sort((left, right) => {
if (left.group !== right.group) return left.group - right.group
if (left.group === 0) {
const rank = (source) => (frameworks.includes(source) ? frameworks.indexOf(source) : frameworks.length)
if (rank(left.source) !== rank(right.source)) return rank(left.source) - rank(right.source)
}
if (left.group === 4 && left.source.startsWith('@/') !== right.source.startsWith('@/')) return left.source.startsWith('@/') ? -1 : 1
return compare(left.source, right.source)
})
const replacement = entries.map((entry) => entry.text).join('\n')
const range = [nodes[0].range[0], nodes.at(-1).range[1]]
if (code.text.slice(...range) !== replacement) {
context.report({ node: nodes[0], messageId: 'order', fix: (fixer) => fixer.replaceTextRange(range, replacement) })
}
}
return {
Program(program) {
let block = []
for (const node of program.body) {
// 仅含 inline type 的值导入在 verbatimModuleSyntax 下仍会执行模块。
// 保留声明及位置,避免拆分后丢失初始化副作用。
const inlineTypesOnly =
node.type === 'ImportDeclaration' &&
node.importKind !== 'type' &&
node.specifiers.length > 0 &&
node.specifiers.every((specifier) => specifier.importKind === 'type')
const previous = block.at(-1)
const gap = previous ? code.text.slice(previous.range[1], node.range[0]) : ''
const leadingComment =
node.type === 'ImportDeclaration' && code.getCommentsBefore(node).some((comment) => comment.loc.end.line >= node.loc.start.line - 1)
// 不跨越声明、初始化、样式导入或注释调整模块执行次序。
if (node.type !== 'ImportDeclaration' || !node.specifiers.length || inlineTypesOnly || leadingComment || gap.trim()) {
check(block)
block = []
}
if (node.type === 'ImportDeclaration' && node.specifiers.length && !inlineTypesOnly && !leadingComment) {
const trailingComment = code.getCommentsAfter(node).some((comment) => comment.loc.start.line === node.loc.end.line)
if (trailingComment) {
check(block)
block = []
} else block.push(node)
}
}
check(block)
},
}
},
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Findings

Potential Issues / Bugs

  1. replaceAll('\\', '/') compatibility — String.prototype.replaceAll requires Node ≥ 15 / modern runtimes. If this ESLint plugin targets older environments, use .split('\\').join('/') or a global regex. Depends on your engine range.

  2. Duplicate import merging semantics — When splitting a mixed type/value declaration into two, the reported fix replaces only the import block range. But if two original declarations for the same source existed (e.g., one value + one type), you emit two separate import statements that remain adjacent but not merged. That's fine for correctness, but be aware duplicate specifiers across type/value imports of the same module are preserved, which no-duplicate-imports (or its includeExports) may flag elsewhere.

  3. Length estimate in renderImport is approximate.

    const length = prefix.length + [...bindings, singleLine].join(', ').length + code.getText(node.source).length + 6

    The + 6 magic number assumes from (6 chars) plus spaces; and the node.source text uses original quote style. This can misdecide multiline vs single-line near the boundary. Consider computing the actual rendered string first, then deciding:

    const candidate = `${prefix}${[...bindings, singleLine].join(', ')} from ${code.getText(node.source)}`
    bindings.push(candidate.length > 150 ? `{\n...\n}` : singleLine)

    Also the 150 threshold hardcodes Prettier's printWidth rather than reading config; acceptable if documented, but brittle if .prettierrc changes.

  4. types.includes(specifier) — O(n²) but harmless for small specifier lists; using a Set would be marginally cleaner.

  5. node.importKind === 'type' || specifier.importKind === 'type' — Correct, but note groupOf's isType handling: for a mixed declaration you split into two entries where groupOf(..., true, ...) always returns group 1. Meaning all type-only imports go to group 1 regardless of source category. Likely intentional (types grouped separately) — confirm it matches your ordering rules.

  6. inlineTypesOnly detection is incomplete. A declaration like import { type A, B } where B is a value has every(... importKind === 'type') false — correct, untouched. But a declaration with zero specifiers (side-effect import, e.g. import './styles.css') is excluded by the !node.specifiers.length guard — good (comment mentions styles). OK.

  7. gap.trim() used as "don't cross boundaries" check — Comments attached between imports via blank lines break blocks; also any whitespace-only gap clears the block, so imports separated by blank lines are never reordered relative to each other. That may be stricter than desired; if users expect sorting across blank-line-separated groups, this silently disables it. Document this behavior or make it configurable.

  8. previous recomputed within loop — block.at(-1) is read before possibly resetting block; fine since gap uses the pre-reset previous. But logic flow is subtle: after check(block); block = [], the same node is then pushed at the end if valid. Verify that when leadingComment is true, node is correctly excluded from all blocks (it is, since push is guarded by !leadingComment).

  9. No context.filename fallback — context.filename was added in ESLint 8.40 (replacing context.getFilename()). Fine if that's your minimum ESLint, otherwise add fallback.

  10. Report location nodes[0] — Reports on the first import, but fixes whole block. Acceptable; consider reporting at the mismatched entry for clearer UX, or loc: { start: nodes[0].range[0], end: ... }.

  11. Missing meta.docs / meta.hasSuggestions — Meta lacks docs (url/description/recommended) — optional but conventional.

  12. Chinese message / English everything else — Minor consistency nit.

Optimization Suggestions

  • Replace chained regex tests in groupOf with URL-prefix checks where possible; regexes like /(?:@\/|\/src\/)api\/enums(?:\/|\.|$)/ will also match @/api/enums-old? No — the (?:\/|\.|$) guards prevent that. Good. But they're evaluated per import; caching by source could help on large files.
  • path.resolve + replaceAll per external-looking source is only invoked for non-. sources — actually resolved computes for all sources including bare packages, calling path.resolve needlessly. Since resolved is only used in the two api regexes meant for project paths, you can skip resolution for bare module specifiers (not starting with . or @/). Minor perf win.
  • entries.sort comparator covers groups 0 and 4 specially; note group 4 also falls through to compare(source) after the @/ rank, correct. For group 0 (frameworks), after rank comparison, non-framework packages sort alphabetically — verify you don't want framework sub-path imports (e.g. vue/dist/..., unlikely) grouped with their package; online includes exact match means vue-router ranks in the array while vue-something goes to alphabetical fallback. Fine but worth noting.

Summary

Logic is generally sound and carefully guards comment/side-effect cases. Main actionable items: (a) make the width decision based on actual rendered string instead of the +6 heuristic, (b) confirm context.filename/replaceAll match your supported runtime, (c) consider surfacing the blank-line boundary behavior in docs, (d) minor cleanups (Set, docs, locale consistency).

9 changes: 6 additions & 3 deletions ui/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { globalIgnores } from 'eslint/config'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import pluginOxlint from 'eslint-plugin-oxlint'
import skipFormatting from 'eslint-config-prettier/flat'
import pluginOxlint from 'eslint-plugin-oxlint'
import pluginVue from 'eslint-plugin-vue'
import { globalIgnores } from 'eslint/config'
import importOrder from './eslint-rules/import-order.mjs'

// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
// import { configureVueProject } from '@vue/eslint-config-typescript'
Expand All @@ -25,7 +26,9 @@ export default defineConfigWithVueTs(
skipFormatting,

{
plugins: { project: { rules: { 'import-order': importOrder } } },
rules: {
'project/import-order': 'error',
'vue/multi-word-component-names': ['error', { ignores: ['index'] }],
},
},
Expand Down
8 changes: 4 additions & 4 deletions ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import { computed } from 'vue'
import 'dayjs/locale/zh-cn'
import 'dayjs/locale/zh-tw'
import { useI18n } from 'vue-i18n'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { RouterView } from 'vue-router'
import en from 'element-plus/es/locale/lang/en'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import zhTw from 'element-plus/es/locale/lang/zh-tw'
import { normalizeLocale } from '@/locales/config'
import { RouterView } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { TOOLTIP_SHOW_DELAY } from '@/components/global/mk-tooltip/constants'
import { normalizeLocale } from '@/locales/config'

const { locale } = useI18n({ useScope: 'global' })
const elementLocales = { 'zh-CN': zhCn, 'en-US': en, 'zh-Hant': zhTw }
Expand Down
4 changes: 2 additions & 2 deletions ui/src/api/admin/auth/base-info.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** 提供 Admin 登录前所需的平台公开信息接口。 */

import { get } from '../core/request'
import type { LoginConfig } from '@/api/types'
import type { BaseProfile, ThemeInfo } from './types'
import type { LoginConfig } from '@/api/types'
import { get } from '../core/request'

/** 获取平台版本、许可信息及登录加密公钥。 */
const getBaseProfile = () => {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/api/admin/auth/current-user.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/** 提供 Admin 登录后的当前用户接口。 */

import { get, post } from '../core/request'
import type { ListItem } from '@/api/types'
import type { PasswordRequest } from '../core/types'
import type { CurrentUserInfo } from './types'
import type { ListItem } from '@/api/types'
import { get, post } from '../core/request'

/** 获取当前登录用户、权限、语言及可用工作空间。 */
const getCurrentUserInfo = () => {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/api/admin/auth/external-login.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** 提供 Admin 第三方认证、扫码登录及客户端授权回调接口。 */

import { get } from '../core/request'
import type { ExternalAuthSetting, QrCodeSource } from '@/api/types'
import type { LoginResponse } from './types'
import type { ExternalAuthSetting, QrCodeSource } from '@/api/types'
import { get } from '../core/request'

/** 获取外部认证方式的跳转配置。 */
const getExternalAuthSetting = (authType: string) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/auth/forgot-password.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** 提供 Admin 忘记密码页面发送验证码与重置密码的接口。 */

import { post } from '../core/request'
import type { ResetPasswordRequest, SendEmailRequest } from '@/api/types/login'
import { post } from '../core/request'

/** 向指定邮箱发送用于重置密码的验证码。 */
const postSendVerificationCode = (email: string) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/auth/license.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get, put } from '../core/request'
import type { LicenseProfile } from '@/api/types'
import { get, put } from '../core/request'

/** 获取当前平台的授权信息。 */
const getLicense = () => get<LicenseProfile>('/license/profile')
Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/auth/login.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** 提供 Admin 普通账号登录、LDAP 登录、登出和验证码接口。 */

import { get, post } from '../core/request'
import type { CaptchaResponse, LoginRequest, LoginResponse } from './types'
import { get, post } from '../core/request'

/** 使用账号和密码登录 Admin 应用。 */
const postLogin = (loginRequest: LoginRequest) => {
Expand Down
9 changes: 5 additions & 4 deletions ui/src/api/admin/core/request.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/** 提供 Admin API 的 Axios 实例与常用 HTTP 请求封装。 */

import axios, { AxiosHeaders, type AxiosRequestConfig, type AxiosResponse, type AxiosProgressEvent, type InternalAxiosRequestConfig } from 'axios'
import router from '@/router/admin'
import { useStore } from '@/stores'
import axios, { AxiosHeaders } from 'axios'
import type { ApiResponse } from './types'
import type { Dict } from '@/api/types'
import { MsgError } from '@/utils/message'
import type { AxiosProgressEvent, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'
import { ADMIN_API_BASE_PATH } from '@/api/constants'
import router from '@/router/admin'
import { useStore } from '@/stores'
import { MsgError } from '@/utils/message'

const DEFAULT_TIMEOUT = 30 * 60 * 1000 // 30 minutes

Expand Down
4 changes: 2 additions & 2 deletions ui/src/api/admin/file.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AxiosProgressEvent } from 'axios'
import { postUpload, del, get } from './core/request'
import type { FileSourceType, UrlFileContent } from '@/api/types'
import type { AxiosProgressEvent } from 'axios'
import { del, get, postUpload } from './core/request'

/** 上传资源文件,支持可选的进度回调与取消操作。 */
const postUploadFile = (
Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/model-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get, post } from './core/request'
import type { BaseModelOption, DynamicFormField, ModelProviderItem, ModelTypeOption } from '@/api/types'
import { get, post } from './core/request'

const prefix = '/provider'

Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ApplicationStoreResponse, Dict, KnowledgeWorkflowStoreResponse, ToolStoreResponse, ToolWorkflowStoreResponse } from '@/api/types'
import { get } from './core/request'
import type { ApplicationStoreResponse, KnowledgeWorkflowStoreResponse, Dict, ToolStoreResponse, ToolWorkflowStoreResponse } from '@/api/types'

/** 获取工具商店列表。 */
const getStoreToolList = (query?: Dict<unknown>) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/system/api-key.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { del, get, post, put } from '../core/request'
import type { ParamsPage, ResponsePage } from '../core/types'
import type { ApiKeyPayload, ApiKeyRecord, Dict } from '@/api/types'
import { del, get, post, put } from '../core/request'

const prefix = '/system/api_key'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get, post, put } from '../../core/request'
import type { QrLoginPlatform, QrLoginPlatformPayload } from '@/api/types'
import { get, post, put } from '../../core/request'

const prefix = '/chat_user/auth/platform/source'

Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/system/chat-management/chat-user-auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get, post, put } from '../../core/request'
import type { AuthProviderSettingPayload, AuthProviderType, OptionItem } from '@/api/types'
import { get, post, put } from '../../core/request'

const prefix = '/chat_user/auth'

Expand Down
4 changes: 2 additions & 2 deletions ui/src/api/admin/system/chat-management/chat-user-groups.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { del, get, post } from '../../core/request'
import type { ParamsPage, ResponsePage } from '../../core/types'
import type { ChatUserGroupMember, ChatUserGroupPayload, ListItem, Dict } from '@/api/types'
import type { ChatUserGroupMember, ChatUserGroupPayload, Dict, ListItem } from '@/api/types'
import { del, get, post } from '../../core/request'

const prefix = '/system/group'

Expand Down
8 changes: 4 additions & 4 deletions ui/src/api/admin/system/chat-management/chat-user.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { del, get, post, put } from '../../core/request'
import type { ParamsPage, ResponsePage, PasswordRequest } from '../../core/types'
import type { ParamsPage, PasswordRequest, ResponsePage } from '../../core/types'
import type {
BatchSetChatUserGroupsRequest,
BatchSetChatUserQuotaRequest,
BatchSetChatUserQuotaResult,
BatchSetChatUserGroupsRequest,
ChatUserBase,
ChatUser,
ChatUserBase,
ChatUserPayload,
ChatUserQuota,
ChatUserQuotaPayload,
ChatUserSyncResult,
ChatUserUpdateRequest,
Dict,
} from '@/api/types'
import { del, get, post, put } from '../../core/request'

const prefix = '/system/chat_user'

Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/system/chat-management/portal-setting.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get, put } from '../../core/request'
import type { PortalSetting, PortalSettingPayload } from '@/api/types'
import { get, put } from '../../core/request'

/** 获取门户基本信息与访问配置。 */
const getPortalSetting = () => get<PortalSetting>('/portal')
Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/system/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get } from '../core/request'
import type { CommonUserOption, Dict, SystemUserOption } from '@/api/types'
import { get } from '../core/request'

/** 获取默认密码。 */
const getDefaultPassword = () => {
Expand Down
6 changes: 3 additions & 3 deletions ui/src/api/admin/system/homepage.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { get, getExportFile } from '../core/request'
import type { ParamsPage, ResponsePage } from '../core/types'
import type {
HomeApplicationAggregation,
HomeDateRange,
HomeKnowledgeAggregation,
HomeToolAggregation,
HomeModelAggregation,
HomeDateRange,
HomeMonitoringDay,
HomeRankingKind,
HomeRankingRecord,
HomeToolAggregation,
} from '@/api/types'
import { get, getExportFile } from '../core/request'

const prefix = `/system/homepage`

Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/system/operate-log.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { postExportExcel, get, post } from '../core/request'
import type { ParamsPage, ResponsePage } from '../core/types'
import type { Dict, OperateLog, OperateLogMenuOption } from '@/api/types'
import { get, post, postExportExcel } from '../core/request'

const prefix = '/operate_log'

Expand Down
2 changes: 1 addition & 1 deletion ui/src/api/admin/system/resource-authorization.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { get, put } from '../core/request'
import type { Dict, ResourceAuthorizationType, ResourcePermissionItem, ResourcePermissionPayload } from '@/api/types'
import { get, put } from '../core/request'

/** 系统管理用户资源授权 */
const prefix = (workspaceId: string) => `/workspace/${workspaceId}/user_resource_permission`
Expand Down
Loading
Loading