Skip to content

[Bug]: order和数据库字段不一致,当order列出现驼峰命名时候排序失效 #1659

@wuqiufeng

Description

@wuqiufeng

gin-vue-admin 版本

master

Node 版本

v14.16

Golang 版本

go 1.16

是否依旧存在

可以

bug描述

pop默认是xxxxYyyy, 数据库字段是xxxx_yyyy, 不匹配

修改建议

修改table.vue.tpl文件
// 排序
const sortChange = ({ prop, order }) => {
prop = prop.replace(/[A-Z]/g, match => _${match.toLowerCase()})
searchInfo.value.sort = prop
searchInfo.value.order = order
getTableData()
}

Metadata

Metadata

Labels

bugSomething isn't workingdoing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions