Merge pull request '修复章节选择问题' (#422) from lyc-dev into main
This commit is contained in:
commit
cc39253a79
|
@ -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 == rootid 说明当前节点为一级节点
|
||||||
|
if(nodeData.parentid == nodeData.rootid){
|
||||||
|
parentNode = null
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
parentNode = {
|
||||||
id: nodeData.parentid,
|
id: nodeData.parentid,
|
||||||
label: nodeData.parenttitle,
|
label: nodeData.parenttitle,
|
||||||
itemtitle: nodeData.parenttitle
|
itemtitle: nodeData.parenttitle
|
||||||
}
|
}
|
||||||
const parentNode = nodeData.parentid ? parent : null
|
}
|
||||||
|
|
||||||
nodeData.parentNode = parentNode
|
nodeData.parentNode = parentNode
|
||||||
let curData = {
|
let curData = {
|
||||||
textBook: {
|
textBook: {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue