Skip to content

Commit

Permalink
Merge branch '3.5.x' of github.com:Tencent/bk-job into 3.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonwan committed Sep 26, 2022
2 parents bd945cd + d5abbe7 commit 26e70aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 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 Expand Up @@ -804,7 +806,11 @@
}

.readonly {
filter: grayscale(0%) brightness(80%) saturate(70%) opacity(95%);
.jb-ace-title,
.ace_gutter,
.ace_content {
filter: grayscale(0%) brightness(80%) saturate(70%) opacity(95%);
}

.jb-ace-mode-item {
cursor: default;
Expand All @@ -817,7 +823,6 @@
font-size: 14px;
color: #fff;
background: #202024;
box-shadow: 0 2px 4px 0 "rgba(0, 0, 0, 16%)";

.jb-ace-mode-item {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
immediate: true,
},
scriptLanguage () {
this.fetchRenderScript();
setTimeout(() => {
this.editor.getSession().setMode(this.mode);
});
Expand Down

0 comments on commit 26e70aa

Please sign in to comment.