Skip to content

Commit

Permalink
fix: 修复自定义排序别名前缀暴露问题 | fix the issue of custom sort alias prefix expo…
Browse files Browse the repository at this point in the history
…sed.
  • Loading branch information
Zuoqiu-Yingyi committed Mar 23, 2022
1 parent 8fb8d40 commit 133601b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 更改日志 | CHANGE LOG

- 配置文件 `config.js` 有变更 | There are changes to the configuration file `config.js`.
- 修复自定义排序别名前缀暴露问题 | fix the issue of custom sort alias prefix exposed.

## v0.2.3/2022-03-20

- [v0.2.2 <=> v0.2.3](https:///github.com/Zuoqiu-Yingyi/widget-query/compare/v0.2.2...v0.2.3)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export var config = {
// 非块查询的处理模式
name: (key) => { // 字段名称处理函数
let name = config.query.regs.sort.test(key) ? config.query.regs.sort.exec(key)[2] : key;
return config.query.regs.render.test(name) ? config.query.regs.render.exec(name)[2] : key;
return config.query.regs.render.test(name) ? config.query.regs.render.exec(name)[2] : name;
},
handler: (key) => { // 其他查询结果默认处理方法生成函数, key 是字段名, 返回一个处理方法
let name = config.query.regs.sort.test(key) ? config.query.regs.sort.exec(key)[2] : key;
Expand Down
2 changes: 1 addition & 1 deletion src/script/module/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export var config = {
// 非块查询的处理模式
name: (key) => { // 字段名称处理函数
let name = config.query.regs.sort.test(key) ? config.query.regs.sort.exec(key)[2] : key;
return config.query.regs.render.test(name) ? config.query.regs.render.exec(name)[2] : key;
return config.query.regs.render.test(name) ? config.query.regs.render.exec(name)[2] : name;
},
handler: (key) => { // 其他查询结果默认处理方法生成函数, key 是字段名, 返回一个处理方法
let name = config.query.regs.sort.test(key) ? config.query.regs.sort.exec(key)[2] : key;
Expand Down

0 comments on commit 133601b

Please sign in to comment.