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 @@
-
+
- {{ datetimeFormat(scope.row.created_at) }}
+ {{ datetimeFormat(scope.row.createdAt) }}
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 @@
-
+
-
+
- {{ findMusicLib(scope.row.lib_id) }}
+ {{ findMusicLib(scope.row.libId) }}
-
+
-
+
@@ -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}}
-
+
- {{ datetimeFormat(scope.row.created_at) }}
+ {{ datetimeFormat(scope.row.createdAt) }}
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(',') }}
-
-
+
+
- {{ datetimeFormat(scope.row.create_date) }}
+ {{ datetimeFormat(scope.row.createDate) }}
-
+
@@ -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 @@
-
+
- {{ scope.row.is_public ? '是' : '否' }}
+ {{ scope.row.isPublic ? '是' : '否' }}
-
+
- {{ datetimeFormat(scope.row.created_at) }}
+ {{ datetimeFormat(scope.row.createdAt) }}
-
+
- {{ datetimeFormat(scope.row.updated_at) }}
+ {{ datetimeFormat(scope.row.updatedAt) }}
@@ -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}}
-
+
- {{ datetimeFormat(scope.row.created_at) }}
+ {{ datetimeFormat(scope.row.createdAt) }}
-
+
- {{ datetimeFormat(scope.row.updated_at) }}
+ {{ datetimeFormat(scope.row.updatedAt) }}
@@ -67,18 +67,18 @@
-
+
- {{uri}}
+ {{uri}}
-
+
- {{uri}}
+ {{uri}}
@@ -133,8 +133,8 @@ const formData = reactive({
name: null,
description: null,
methods: [],
- include_uri: [],
- exclude_uri: []
+ includeUri: [],
+ excludeUri: []
})
const roleForm = ref()
@@ -155,22 +155,22 @@ function add() {
name: null,
description: null,
methods: [],
- include_uri: [],
- exclude_uri: []
+ includeUri: [],
+ excludeUri: []
})
modalTitle.value = '新增角色'
addModal.value = true
clearValidate()
}
-function addUri(fieldName: 'include_uri' | 'exclude_uri', uriValue: string | null) {
+function addUri(fieldName: 'includeUri' | 'excludeUri', uriValue: string | null) {
if(!uriValue) return
if(formData[fieldName].indexOf(uriValue) === -1) {
formData[fieldName].push(uriValue)
}
}
-function removeUri(fieldName: 'include_uri' | 'exclude_uri', uriValue: string) {
+function removeUri(fieldName: 'includeUri' | 'excludeUri', uriValue: string) {
let index = formData[fieldName].indexOf(uriValue)
if(index !== -1) {
formData[fieldName].splice(index, 1)
@@ -185,8 +185,8 @@ function update(row: SystemRoleModel) {
name: row.name,
description: row.description,
methods: row.methods,
- include_uri: row.include_uri,
- exclude_uri: row.exclude_uri
+ includeUri: row.includeUri,
+ excludeUri: row.excludeUri
})
modalTitle.value = '修改角色'
addModal.value = true
diff --git a/src/views/system/SystemUser.vue b/src/views/system/SystemUser.vue
index 06f1dff..f12bedc 100644
--- a/src/views/system/SystemUser.vue
+++ b/src/views/system/SystemUser.vue
@@ -16,14 +16,14 @@
-
+
- {{ datetimeFormat(scope.row.created_at) }}
+ {{ datetimeFormat(scope.row.createdAt) }}
-
+
- {{ datetimeFormat(scope.row.updated_at) }}
+ {{ datetimeFormat(scope.row.updatedAt) }}
@@ -56,7 +56,7 @@
-
+
@@ -102,7 +102,7 @@ const formData = reactive({
username: null,
password: null,
realname: null,
- role_ids: []
+ roleIds: []
})
const userForm = ref()
@@ -141,7 +141,7 @@ function add() {
username: null,
password: null,
realname: null,
- role_ids: []
+ roleIds: []
})
modalTitle.value = '新增用户'
addModal.value = true
@@ -153,7 +153,7 @@ function update(row: SystemUserModel) {
_id: row._id,
username: row.username,
realname: row.realname,
- role_ids: row.role_ids
+ roleIds: row.roleIds
})
modalTitle.value = '修改用户'
addModal.value = true