diff --git a/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js b/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js index e1ebd2f1607..ccd0db127b8 100644 --- a/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js +++ b/apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js @@ -754,6 +754,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio } function modifyByText(namespace) { + var model = { configText: namespace.editText, namespaceId: namespace.baseInfo.id, @@ -816,7 +817,6 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio } function parseModel2Text(namespace) { - if (namespace.items.length == 0) { namespace.itemCnt = 0; return ""; @@ -987,6 +987,21 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio minLines: 10, maxLines: 20 }) + }, + onChange: function (e) { + if ((e[0].action === 'insert') && (scope.namespace.hasOwnProperty("editText")) && (scope.namespace.editText.length === 0)) { + let text = '' + for (let i = 0; i < e[0].lines.length; i++) { + if (i === 0) { + text = e[0].lines[0] + } else { + text += '\r\n' + e[0].lines[i] + } + console.log(text) + } + scope.namespace.editText = text + } + } };