632 Star 11.7K Fork 2.8K

小诺 / Snowy

 / 详情

在线生成代码的模板代码变量名和注释与实际意义相反

Done
Opened this issue  
2023-06-10 20:15

该问题是如何引起的?(确定最新版也有问题再提!!!)
在线生成代码的模板代码变量名和注释与实际意义相反
模板文件:snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/Api.js.btl
目前代码:

// 提交functionName表单edit为true时为编辑,默认为新增
{classNameFirstLower}SubmitForm(data, edit = false) {
return request(edit ? 'add' : 'edit', data)
},

但是实际上edit为true时为新增,edit为false才是编辑,默认为编辑,赶紧改为下面的才对上

// 提交functionName表单add为true时为新增,默认为编辑
{classNameFirstLower}SubmitForm(data, add = false) {
return request(add ? 'add' : 'edit', data)
},

Comments (2)

chen created任务

关注master分支,v2.2.11之后版本会意义为正则

小诺 changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
1980003 xiaonuobase 1614682939
Java
1
https://gitee.com/xiaonuobase/snowy.git
git@gitee.com:xiaonuobase/snowy.git
xiaonuobase
snowy
Snowy

Search