File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const settingsStore = useSettingsStore();
1616
1717const selectedType = ref (' feat' );
1818const commitMessage = ref (' ' );
19+ const commitMessageInput = ref (null );
1920const scope = ref (' ' );
2021const contributors = ref (' ' );
2122const issueId = ref (' ' );
@@ -65,6 +66,10 @@ watch(
6566
6667onMounted (() => {
6768 selectTypeFromAction (props .enterAction );
69+ // 自动聚焦到输入框
70+ if (commitMessageInput .value ) {
71+ commitMessageInput .value .focus ();
72+ }
6873});
6974
7075const autoClassifyCommitType = (description ) => {
@@ -217,7 +222,8 @@ const copyText = (text) => {
217222 placeholder= " 问题ID(可选)" / >
218223 < / div>
219224 < div class = " row2" style= " display: flex;padding: 10px; align-items: center;width: 80vw;" >
220- < a- textarea v- model: value= " commitMessage" allowClear placeholder= " 输入提交信息概述" : rows= " 3" / >
225+ < a- textarea ref= " commitMessageInput" v- model: value= " commitMessage" allowClear placeholder= " 输入提交信息概述"
226+ : rows= " 3" / >
221227 < / div>
222228
223229 < div class = " row3" style= " display: flex;padding: 10px; flex-direction: column;" >
You can’t perform that action at this time.
0 commit comments