1
0
mirror of synced 2026-04-05 07:48:35 +08:00

refactor(editor): 补全ts类型

This commit is contained in:
parisma
2022-11-17 11:48:19 +08:00
parent 8271a3b497
commit bc4b62a4c1
3 changed files with 12 additions and 12 deletions

View File

@@ -112,7 +112,7 @@ const saveAndClose = (): void => {
};
// 关闭弹窗
const close = async () => {
const close = async (): Promise<void> => {
const codeDraft = services?.codeBlockService.getCodeDraft(props.id);
if (codeDraft) {
tMagicMessageBox
@@ -136,7 +136,7 @@ const close = async () => {
};
// 切换全屏
const toggleFullScreen = () => {
const toggleFullScreen = (): void => {
isFullScreen.value = !isFullScreen.value;
if (codeEditor.value) {
codeEditor.value.focus();

View File

@@ -90,7 +90,7 @@ watchEffect(() => {
codeContent.value = props.content;
});
const initTableModel = () => {
const initTableModel = (): void => {
const codeDsl = services?.codeBlockService.getCodeDslSync();
if (!codeDsl) return;
tableModel.value = {
@@ -131,7 +131,7 @@ const saveCode = async (codeValue: string): Promise<void> => {
};
// 保存并关闭
const saveAndClose = async (codeValue: string) => {
const saveAndClose = async (codeValue: string): Promise<void> => {
await saveCode(codeValue);
if (evalRes.value) {
close();
@@ -139,7 +139,7 @@ const saveAndClose = async (codeValue: string) => {
};
// 关闭弹窗
const close = () => {
const close = (): void => {
services?.codeBlockService.setCodeEditorShowStatus(false);
};
</script>