feat(knowledge): add knowledge base detail page components and hooks

refactor(knowledge): restructure knowledge detail page with new components
feat(components): add FileUploadDialog for file upload functionality
feat(hooks): implement document management hooks for CRUD operations
This commit is contained in:
2025-10-14 15:42:40 +08:00
parent 34181cf025
commit 7384ae36d0
12 changed files with 1456 additions and 356 deletions

View File

@@ -85,14 +85,19 @@ const request: AxiosInstance = axios.create({
// 请求拦截器
request.interceptors.request.use(
(config: InternalAxiosRequestConfig) => {
// 转换数据格式
if (config.data) {
// 转换数据格式 - 跳过FormData对象
if (config.data && !(config.data instanceof FormData)) {
config.data = convertTheKeysOfTheObjectToSnake(config.data);
}
if (config.params) {
config.params = convertTheKeysOfTheObjectToSnake(config.params);
}
// 对于FormData删除默认的Content-Type让浏览器自动设置
if (config.data instanceof FormData) {
delete config.headers['Content-Type'];
}
// 添加授权头
const authorization = getAuthorization();
if (authorization && !config.headers?.skipToken) {