Compare commits

..

2 Commits

2 changed files with 20 additions and 9 deletions

View File

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

View File

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