最大最小化icon

This commit is contained in:
lyc 2024-12-02 14:24:02 +08:00
parent 7b4e54cb16
commit cd6ca2e4e7
2 changed files with 15 additions and 3 deletions

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,11 @@ const closeWindow = () => {
})
}).catch(() => { });
}
onMounted(() =>{
isMaxSize.value = Remote.getCurrentWindow().isMaximized()
})
</script>
<style lang="scss" scoped>

View File

@ -8,6 +8,7 @@
<el-breadcrumb :separator-icon="ArrowRight">
<el-breadcrumb-item v-for="item in breadList"> {{ item.title }} </el-breadcrumb-item>
</el-breadcrumb>
<span class="ml-5">{{ curNode.itemtitle }}</span>
</div>
<div class="header-center" v-else>
AI文枢{{ version }}
@ -20,11 +21,13 @@
</template>
<script setup>
import { ref, watch } from 'vue'
import { reactive, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { ArrowRight } from '@element-plus/icons-vue'
import WindowTools from '@/components/window-tools/index.vue'
import pkc from "../../../../../package.json"
import { sessionStore } from '@/utils/store'
const version = ref(pkc.version)
//
@ -33,6 +36,8 @@ const onBack = () => {
router.go(-1)
}
const curNode = reactive({itemtitle: ''})
//
const isShowBack = ref(false)
const breadList = ref([])
@ -44,7 +49,8 @@ watch(
if (path.includes('/model') && path !== ('/model/index')) {
isShowBack.value = true
breadList.value = newValue.matched.map(item => item.meta)
let data = sessionStore.get('subject.curNode')
Object.assign(curNode, data)
}
else {
isShowBack.value = false