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