refactor: 为测试暴露组件内部状态
This commit is contained in:
@@ -50,6 +50,8 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defineExpose({ registerData, loading, submitForm, isNotEmpty });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ const handleLogout = async () => {
|
|||||||
await router.push("/login");
|
await router.push("/login");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defineExpose({ isLoginRoute, showBackButton, pageTitle, handleLogout });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -594,6 +594,17 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
clear();
|
clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
taskInfo,
|
||||||
|
timerRunning,
|
||||||
|
timerIsOver,
|
||||||
|
startTimer,
|
||||||
|
stopTimer,
|
||||||
|
endTimer,
|
||||||
|
syncDisplay,
|
||||||
|
clear,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -288,6 +288,21 @@ async function previewMaterial() {
|
|||||||
results.forEach(({ u, t }) => { titles[u] = t; });
|
results.forEach(({ u, t }) => { titles[u] = t; });
|
||||||
materialPreview.value = renderMarkdown(raw, titles);
|
materialPreview.value = renderMarkdown(raw, titles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
priorityOptions,
|
||||||
|
priority,
|
||||||
|
taskNum,
|
||||||
|
taskName,
|
||||||
|
taskDescription,
|
||||||
|
materialUrl,
|
||||||
|
isUpdateMode,
|
||||||
|
loadTask,
|
||||||
|
createTask,
|
||||||
|
updateTask,
|
||||||
|
submitTask,
|
||||||
|
convertMaterialUrls,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user