forked from p81075629/datagear
数据集编辑界面添加参数操作支持将SQL编辑区选中文本自动设置为参数名
This commit is contained in:
parent
d1b0999b68
commit
92950640ca
|
@ -268,7 +268,10 @@ readonly 是否只读操作,允许为null
|
|||
|
||||
po.element(".sql-add-param-button").click(function()
|
||||
{
|
||||
po.sqlParamsTableElement().DataTable().row.add({ name: "", type: "STRING", required: true, desc: "" }).draw();
|
||||
var selectionRange = po.sqlEditor.getSelectionRange();
|
||||
var selectText = (po.sqlEditor.session.getTextRange(selectionRange) || "");
|
||||
|
||||
po.sqlParamsTableElement().DataTable().row.add({ name: selectText, type: "${DataType.STRING}", required: true, desc: "" }).draw();
|
||||
});
|
||||
|
||||
po.element(".sql-del-param-button").click(function()
|
||||
|
|
Loading…
Reference in New Issue