Skip to content

Commit

Permalink
bugfix: 选用“业务脚本”或“公共脚本”时匹配中高危语句的交互,要和手工输入的保持一致 TencentBlueKing#1294
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed Sep 26, 2022
1 parent f288246 commit 2d040ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/components/ace-editor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,13 @@
watch: {
value: {
handler (value) {
this.editor.getSession().setAnnotations([]);
// 只读模式没有默认值,直接使用输入值
if (this.readonly) {
this.editor.setValue(Base64.decode(value));
this.editor.clearSelection();
this.syntaxCheck(value);
return;
}
// 外部传入空置直接清空编辑器
if (value === '' && this.content !== '') {
Expand Down

0 comments on commit 2d040ca

Please sign in to comment.