feat: 生成sketch自动切换为sketch视图

style: md内容样式
This commit is contained in:
2026-03-17 11:22:47 +08:00
parent 35d482d8b9
commit ffe8526745
3 changed files with 45 additions and 9 deletions

View File

@@ -113,6 +113,10 @@
previewType.value = 'url'
}
const handleOpenSketch = () => {
previewType.value = 'sketch'
}
watch(
() => proJectId.value,
(newVal, oldVal) => {
@@ -126,9 +130,7 @@
onMounted(() => {
MyEvent.add('openReport', handleOpenReport)
MyEvent.add('openUrls', handleOpenUrls)
MyEvent.add('OpenSketch', ()=>{
previewType.value = 'sketch'
})
MyEvent.add('OpenSketch', handleOpenSketch)
projectStore.clearProject()
if (proJectId.value) {
handleGetProjectInfoAndHistory()
@@ -137,9 +139,7 @@
onUnmounted(() => {
MyEvent.remove('openReport', handleOpenReport)
MyEvent.remove('openUrls', handleOpenUrls)
MyEvent.remove('OpenSketch', ()=>{
previewType.value = 'sketch'
})
MyEvent.remove('OpenSketch')
})
</script>