Skip to content

Commit

Permalink
perf: 点击 去更新 跳转到编辑步骤的状态后,直接把脚本列表下拉展开 TencentBlueKing#1316
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed Sep 22, 2022
1 parent 1a10f3a commit 7900118
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
</bk-option>
</bk-select>
<bk-select
ref="scriptSelect"
:placeholder="$t('选择引用脚本')"
style="width: 375px;"
:value="formData[scriptVersionIdField]"
Expand Down Expand Up @@ -250,13 +251,24 @@
this.$refs.scriptId.clearValidator();
}
},
// 需要同步的脚本默认展开脚本列表
scriptListDisplay () {
if (this.scriptListDisplay.length > 1 && !this.hasShowScriptSelect) {
setTimeout(() => {
this.hasShowScriptSelect = true;
this.$refs.scriptSelect.$el.querySelector('.bk-select-name').click();
}, 30);
}
},
},
created () {
this.scriptListMemo = [];
this.publicScriptListMemo = [];
this.initScriptContent();
this.fetchScriptList();
this.fetchPublicScriptList();

this.hasShowScriptSelect = false;
},
methods: {
/**
Expand Down

0 comments on commit 7900118

Please sign in to comment.