From a0e49ceda6bcd42d1b754ea172babd2a2e82d96e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=8C=E7=B3=96=E5=8C=85=E5=AD=90?= Date: Sat, 21 Mar 2026 01:26:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E5=88=92=E7=BA=BF?= =?UTF-8?q?=E5=88=86=E9=9A=94=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/api/hitokoto.ts | 2 +- src/model/api/music.ts | 6 ++--- src/model/api/source-image.ts | 2 +- src/model/system/article.ts | 8 +++---- src/model/system/system-config.ts | 6 ++--- src/model/system/system-role.ts | 8 +++---- src/model/system/system-user.ts | 6 ++--- src/static/common.less | 2 +- src/store/types.ts | 2 +- src/views/api/Hitokoto.vue | 4 ++-- src/views/api/Music.vue | 36 ++++++++++++++-------------- src/views/api/SourceImage.vue | 4 ++-- src/views/system/Article.vue | 14 +++++------ src/views/system/SystemConfig.vue | 16 ++++++------- src/views/system/SystemConfigAdd.vue | 2 +- src/views/system/SystemRole.vue | 32 ++++++++++++------------- src/views/system/SystemUser.vue | 16 ++++++------- 17 files changed, 83 insertions(+), 83 deletions(-) diff --git a/src/model/api/hitokoto.ts b/src/model/api/hitokoto.ts index 225828d..b94f6ac 100644 --- a/src/model/api/hitokoto.ts +++ b/src/model/api/hitokoto.ts @@ -4,6 +4,6 @@ export default interface HitokotoModel { type: string from: string creator: string - created_at: Date + createdAt: Date number: number } \ No newline at end of file diff --git a/src/model/api/music.ts b/src/model/api/music.ts index 1bd1e74..5d0cefb 100644 --- a/src/model/api/music.ts +++ b/src/model/api/music.ts @@ -7,8 +7,8 @@ export interface MusicModel { title?: string // 标题 album?: string // 唱片集 artist?: string // 艺术家 - lib_id: string // 歌单ID - lyric_id: string // 歌词ID + libId: string // 歌单ID + lyricId: string // 歌词ID isEditing?: boolean // 是否正在编辑当前行 } @@ -20,7 +20,7 @@ export interface MusicLibModel { export interface MusicLyricModel { _id?: string - cloud_id?: number + cloudId?: number name?: string lyric?: string } diff --git a/src/model/api/source-image.ts b/src/model/api/source-image.ts index 9c7a9bf..0fdfb72 100644 --- a/src/model/api/source-image.ts +++ b/src/model/api/source-image.ts @@ -5,5 +5,5 @@ export interface SourceImageModel { size: number // 图片大小 label: string[] // 图片标签 img: ArrayBuffer // 图片二进制数据 - created_at: Date + createdAt: Date } diff --git a/src/model/system/article.ts b/src/model/system/article.ts index 8ea568d..d52f9be 100644 --- a/src/model/system/article.ts +++ b/src/model/system/article.ts @@ -6,9 +6,9 @@ export interface ArticleModel { categories: string[] //分类 tags: string[] // 标签 title: string // 标题 - create_date: Date // 文章发布日期 - content_len: number // 正文长度 - is_splited: boolean // 是否分词 + createDate: Date // 文章发布日期 + contentLen: number // 正文长度 + isSplited: boolean // 是否分词 } export interface TreeNodeData { @@ -22,5 +22,5 @@ export interface TreeNodeData { export interface TreeNodeSource { _id: string cnt: number - article_id: string | null + articleId: string | null } \ No newline at end of file diff --git a/src/model/system/system-config.ts b/src/model/system/system-config.ts index fbde539..0267c64 100644 --- a/src/model/system/system-config.ts +++ b/src/model/system/system-config.ts @@ -3,7 +3,7 @@ export interface SystemConfigModel { name: string // 配置项名称 value: object | string // 配置项内容 description: string // 描述 - is_public: boolean // 是否公开 - created_at?: Date // 创建时间 - updated_at?: Date // 更新时间 + isPublic: boolean // 是否公开 + createdAt?: Date // 创建时间 + updatedAt?: Date // 更新时间 } \ No newline at end of file diff --git a/src/model/system/system-role.ts b/src/model/system/system-role.ts index 39a9a54..564bfdc 100644 --- a/src/model/system/system-role.ts +++ b/src/model/system/system-role.ts @@ -3,8 +3,8 @@ export interface SystemRoleModel { name: string | null // 角色名称 description: string | null // 描述 methods: string[] // 允许的请求类型(优先级3) - include_uri: string[] // 包含的URI(优先级2) - exclude_uri: string[] // 排除的URI(优先级1) - created_at?: Date // 创建时间 - updated_at?: Date // 更新时间 + includeUri: string[] // 包含的URI(优先级2) + excludeUri: string[] // 排除的URI(优先级1) + createdAt?: Date // 创建时间 + updatedAt?: Date // 更新时间 } \ No newline at end of file diff --git a/src/model/system/system-user.ts b/src/model/system/system-user.ts index d2cebfc..765b493 100644 --- a/src/model/system/system-user.ts +++ b/src/model/system/system-user.ts @@ -3,7 +3,7 @@ export interface SystemUserModel { username: string | null password: string | null realname: string | null - role_ids: string[] - created_at?: Date - updated_at?: Date + roleIds: string[] + createdAt?: Date + updatedAt?: Date } \ No newline at end of file diff --git a/src/static/common.less b/src/static/common.less index 41b414e..3c901f4 100644 --- a/src/static/common.less +++ b/src/static/common.less @@ -164,7 +164,7 @@ html, body, #app, .layout { } /* ===== 表单弹窗 ===== */ -.el-dialog { +body .el-dialog { // CSS 变量覆盖:圆角、清除 element-plus 2.x 新增的根元素 padding --el-dialog-border-radius: 12px; --el-dialog-padding-primary: 0; diff --git a/src/store/types.ts b/src/store/types.ts index 7281e35..01660ad 100644 --- a/src/store/types.ts +++ b/src/store/types.ts @@ -2,7 +2,7 @@ export interface UserInfo { _id: string username: string // 用户名 realname: string // 昵称 - role_ids: string[] // 角色ID + roleIds: string[] // 角色ID } export interface TabItem { diff --git a/src/views/api/Hitokoto.vue b/src/views/api/Hitokoto.vue index 227146c..4286409 100644 --- a/src/views/api/Hitokoto.vue +++ b/src/views/api/Hitokoto.vue @@ -38,9 +38,9 @@ - + diff --git a/src/views/api/Music.vue b/src/views/api/Music.vue index 7f0158c..31281d3 100644 --- a/src/views/api/Music.vue +++ b/src/views/api/Music.vue @@ -5,7 +5,7 @@ - + @@ -45,25 +45,25 @@ - + - + @@ -89,8 +89,8 @@ - - + + @@ -166,7 +166,7 @@ class MusicPage extends Page { title?: string album?: string artist?: string - lib_id?: string[] = [] + libId?: string[] = [] reset() { super.reset() this.name = undefined @@ -174,7 +174,7 @@ class MusicPage extends Page { this.title = undefined this.album = undefined this.artist = undefined - this.lib_id = [] + this.libId = [] } } @@ -197,7 +197,7 @@ const musicUpload = ref() const player = ref() const lyricRuleValidate = { - cloud_id: [ + cloudId: [ { required: true, message: '请输入网易云ID', trigger: 'blur' } ], name: [ @@ -239,8 +239,8 @@ async function playMusic() { src: `/api/v2/common/music/load/${item._id}`, pic: `/api/v2/common/music/album/${item._id}`, } - if (item.lyric_id) { - musicItem.lrc = `${location.origin}/api/v2/common/music/lyric/${item.lyric_id}` + if (item.lyricId) { + musicItem.lrc = `${location.origin}/api/v2/common/music/lyric/${item.lyricId}` } return musicItem }) @@ -272,9 +272,9 @@ function remove(row: MusicModel) { async function updateLyric(row: MusicModel) { currentRow.value = { ...row } modifyLyricModal.value = true - if (row.lyric_id) { - const data = (await http.get('/api/v2/music/lyric/get', {params: {lyricId: row.lyric_id}})) - data.cloud_id = data.cloud_id ? data.cloud_id.toString() : null + if (row.lyricId) { + const data = (await http.get('/api/v2/music/lyric/get', {params: {lyricId: row.lyricId}})) + data.cloudId = data.cloudId ? data.cloudId.toString() : null lyricFormData.value = data } else { lyricFormData.value = {} @@ -294,9 +294,9 @@ async function saveLyric() { } async function saveMusicLib(row: MusicModel) { if (!currentRow.value) return - const data = await http.post<{id: string, libId: string}, any>('/api/v2/music/updateLib', {id: currentRow.value._id, libId: currentRow.value.lib_id}) + const data = await http.post<{id: string, libId: string}, any>('/api/v2/music/updateLib', {id: currentRow.value._id, libId: currentRow.value.libId}) ElMessage.success(data.message) - row.lib_id = currentRow.value.lib_id + row.libId = currentRow.value.libId row.isEditing = false } function openUploadModal() { diff --git a/src/views/api/SourceImage.vue b/src/views/api/SourceImage.vue index e4b59ef..bbe94ce 100644 --- a/src/views/api/SourceImage.vue +++ b/src/views/api/SourceImage.vue @@ -35,9 +35,9 @@ {{label}} - + diff --git a/src/views/system/Article.vue b/src/views/system/Article.vue index 86bbc84..f234a64 100644 --- a/src/views/system/Article.vue +++ b/src/views/system/Article.vue @@ -76,16 +76,16 @@ {{ typeof scope.row.tags === 'string' ? scope.row.tags : scope.row.tags?.join(',') }} - - + + @@ -224,9 +224,9 @@ async function loadTreeData(node: Node, resolve: Function) { resolve(childItems.map((childItem): TreeNodeData => { const treeNode: TreeNodeData = { name: childItem._id, - title: childItem.article_id ? childItem._id : `${childItem._id}(${childItem.cnt})`, - id: childItem.article_id || childItem._id, - isLeaf: !!childItem.article_id + title: childItem.articleId ? childItem._id : `${childItem._id}(${childItem.cnt})`, + id: childItem.articleId || childItem._id, + isLeaf: !!childItem.articleId } return treeNode })) diff --git a/src/views/system/SystemConfig.vue b/src/views/system/SystemConfig.vue index a0aac2e..0da925c 100644 --- a/src/views/system/SystemConfig.vue +++ b/src/views/system/SystemConfig.vue @@ -21,19 +21,19 @@ - + - + - + @@ -73,7 +73,7 @@ const formData = ref({ name: '', value: '', description: '', - is_public: false + isPublic: false }) const addForm = ref>() @@ -94,7 +94,7 @@ function add() { name: '', value: '', description: '', - is_public: false + isPublic: false } modalTitle.value = '新增配置项' addModal.value = true diff --git a/src/views/system/SystemConfigAdd.vue b/src/views/system/SystemConfigAdd.vue index 246ac4e..88bec34 100644 --- a/src/views/system/SystemConfigAdd.vue +++ b/src/views/system/SystemConfigAdd.vue @@ -12,7 +12,7 @@ diff --git a/src/views/system/SystemRole.vue b/src/views/system/SystemRole.vue index 56dfe53..7e9e5f1 100644 --- a/src/views/system/SystemRole.vue +++ b/src/views/system/SystemRole.vue @@ -20,14 +20,14 @@ {{method}} - + - + @@ -67,18 +67,18 @@ - {{uri}} + {{uri}} - {{uri}} + {{uri}}