修复章节选择问题 #422

Merged
lyc merged 1 commits from lyc-dev into main 2024-12-02 16:26:48 +08:00
2 changed files with 20 additions and 9 deletions
Showing only changes of commit 865574ec4c - Show all commits

View File

@ -139,16 +139,22 @@ const handleNodeClick = (data) => {
* data : 当前节点数据
*/
let nodeData = cloneDeep(toRaw(data));
//label label
nodeData.label = nodeData.itemtitle
// null
let parent = {
id: nodeData.parentid,
label: nodeData.parenttitle,
itemtitle: nodeData.parenttitle
}
const parentNode = nodeData.parentid ? parent : null
let parentNode
// id == rootid
if(nodeData.parentid == nodeData.rootid){
parentNode = null
}
else{
parentNode = {
id: nodeData.parentid,
label: nodeData.parenttitle,
itemtitle: nodeData.parenttitle
}
}
nodeData.parentNode = parentNode
let curData = {
textBook: {

View File

@ -8,9 +8,10 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref, onMounted } from 'vue'
import { ElMessageBox } from 'element-plus'
import useUserStore from '@/store/modules/user'
const Remote = require('@electron/remote')
const userStore = useUserStore()
const { ipcRenderer } = window.electron || {}
@ -47,6 +48,10 @@ const closeWindow = () => {
})
}).catch(() => { });
}
onMounted(() =>{
isMaxSize.value = Remote.getCurrentWindow().isMaximized()
})
</script>
<style lang="scss" scoped>