@@ -117,7 +117,7 @@ const props = defineProps({
117
117
commandFormatter: Function as PropType <CommandFormatterFunc >,
118
118
// 滚动条滚动模式
119
119
scrollMode: {
120
- type: String ,
120
+ type: String as PropType < ScrollBehavior > ,
121
121
default: ' smooth'
122
122
},
123
123
// 在 push 消息之前触发的钩子函数,只能对message对象的属性进行修改
@@ -285,23 +285,23 @@ const tips = reactive({
285
285
})
286
286
287
287
// references
288
- const terminalContainerRef = ref < HTMLDivElement > (null )
289
- const terminalHeaderRef = ref < HTMLDivElement > (null )
290
- const terminalWindowRef = ref < HTMLDivElement > (null )
291
- const terminalCmdInputRef = ref < HTMLInputElement > (null )
292
- const terminalAskInputRef = ref < HTMLInputElement > (null )
293
- const terminalInputBoxRef = ref < HTMLParagraphElement > (null )
294
- const terminalInputPromptRef = ref < HTMLSpanElement > (null )
295
- const terminalEnFlagRef = ref < HTMLSpanElement > (null )
296
- const terminalCnFlagRef = ref < HTMLSpanElement > (null )
297
- const terminalTextEditorRef = ref <InstanceType <TEditor >>(null )
298
- const terminalCursorRef = ref < HTMLSpanElement > (null )
299
- const terminalHelpBoxRef = ref <InstanceType <THelpBox >>(null )
300
- const resizeLTRef = ref < HTMLDivElement > (null )
301
- const resizeRTRef = ref < HTMLDivElement > (null )
302
- const resizeLBRef = ref < HTMLDivElement > (null )
303
- const resizeRBRef = ref < HTMLDivElement > (null )
304
- const terminalCmdTipsRef = ref < HTMLSpanElement > (null )
288
+ const terminalContainerRef = ref (null )
289
+ const terminalHeaderRef = ref (null )
290
+ const terminalWindowRef = ref (null )
291
+ const terminalCmdInputRef = ref (null )
292
+ const terminalAskInputRef = ref (null )
293
+ const terminalInputBoxRef = ref (null )
294
+ const terminalInputPromptRef = ref (null )
295
+ const terminalEnFlagRef = ref (null )
296
+ const terminalCnFlagRef = ref (null )
297
+ const terminalTextEditorRef = ref <InstanceType <typeof TEditor >>(null )
298
+ const terminalCursorRef = ref (null )
299
+ const terminalHelpBoxRef = ref <InstanceType <typeof THelpBox >>(null )
300
+ const resizeLTRef = ref (null )
301
+ const resizeRTRef = ref (null )
302
+ const resizeLBRef = ref (null )
303
+ const resizeRBRef = ref (null )
304
+ const terminalCmdTipsRef = ref (null )
305
305
306
306
// listeners
307
307
const clickListener = ref ()
@@ -872,6 +872,7 @@ const _focus = (enforceFocus?: boolean | MouseEvent) => {
872
872
input = terminalAskInputRef .value
873
873
cursorConf .show = false
874
874
} else if (textEditor .open ) {
875
+ // @ts-ignore
875
876
input = terminalTextEditorRef .value
876
877
cursorConf .show = false
877
878
} else {
0 commit comments