mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
perf: 优化设置
This commit is contained in:
parent
96a41f8ebc
commit
199c6abcb1
3
src/components/GoSystemInfo/index.ts
Normal file
3
src/components/GoSystemInfo/index.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import GoSystemInfo from './index.vue';
|
||||||
|
|
||||||
|
export { GoSystemInfo };
|
76
src/components/GoSystemInfo/index.vue
Normal file
76
src/components/GoSystemInfo/index.vue
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<template>
|
||||||
|
<n-modal v-model:show="modelShow" @afterLeave="closeHandle">
|
||||||
|
<n-list bordered class="go-system-info">
|
||||||
|
<template #header>
|
||||||
|
<n-space justify="space-between">
|
||||||
|
<n-h3 class="go-mb-0">关于我们</n-h3>
|
||||||
|
<n-icon size="20" class="go-cursor-pointer" @click="closeHandle">
|
||||||
|
<close-icon></close-icon>
|
||||||
|
</n-icon>
|
||||||
|
</n-space>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<n-list-item>
|
||||||
|
<n-space :size="20">
|
||||||
|
<n-text class="item-left">版权声明:</n-text>
|
||||||
|
<n-text>
|
||||||
|
GoView 版权属于
|
||||||
|
<n-a href="https://gitee.com/MTrun/go-view" target="_blank">https://gitee.com/MTrun/go-view</n-a> 项目作者
|
||||||
|
</n-text>
|
||||||
|
</n-space>
|
||||||
|
</n-list-item>
|
||||||
|
|
||||||
|
<n-list-item>
|
||||||
|
<n-divider style="margin-top: 0" />
|
||||||
|
<n-space :size="20">
|
||||||
|
<n-text class="item-left">协议备注:</n-text>
|
||||||
|
<n-text>
|
||||||
|
请遵守开源 MIT 协议,以上声明 <n-text type="error">不可删除</n-text>,否则视作侵权行为,后果自负!
|
||||||
|
</n-text>
|
||||||
|
</n-space>
|
||||||
|
</n-list-item>
|
||||||
|
|
||||||
|
<n-list-item>
|
||||||
|
<n-divider style="margin-top: 0" />
|
||||||
|
<n-space :size="20">
|
||||||
|
<n-text class="item-left">商业授权:</n-text>
|
||||||
|
<n-text>
|
||||||
|
若不想保留版权声明,请通过仓库/交流群 联系项目作者,进行授权
|
||||||
|
</n-text>
|
||||||
|
</n-space>
|
||||||
|
</n-list-item>
|
||||||
|
</n-list>
|
||||||
|
</n-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { icon } from '@/plugins'
|
||||||
|
|
||||||
|
const { HelpOutlineIcon, CloseIcon } = icon.ionicons5
|
||||||
|
const emit = defineEmits(['update:modelShow'])
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
modelShow: Boolean
|
||||||
|
})
|
||||||
|
|
||||||
|
const closeHandle = () => {
|
||||||
|
emit('update:modelShow', false)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@include go('system-info') {
|
||||||
|
@extend .go-background-filter;
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 60vw;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
.item-left {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
@include deep() {
|
||||||
|
.n-list-item:not(:last-child) {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -20,14 +20,17 @@
|
|||||||
|
|
||||||
<!-- 系统设置 model -->
|
<!-- 系统设置 model -->
|
||||||
<go-system-set v-model:modelShow="modelShow"></go-system-set>
|
<go-system-set v-model:modelShow="modelShow"></go-system-set>
|
||||||
|
<!-- 关于软件 model -->
|
||||||
|
<go-system-info v-model:modelShow="modelShowInfo"></go-system-info>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { h, ref } from 'vue'
|
import { h, ref } from 'vue'
|
||||||
import { NAvatar, NText } from 'naive-ui'
|
import { NAvatar, NText } from 'naive-ui'
|
||||||
import { renderIcon } from '@/utils'
|
import { renderIcon } from '@/utils'
|
||||||
import { openDoc, logout, renderLang } from '@/utils'
|
import { logout, renderLang } from '@/utils'
|
||||||
import { GoSystemSet } from '@/components/GoSystemSet/index'
|
import { GoSystemSet } from '@/components/GoSystemSet/index'
|
||||||
|
import { GoSystemInfo } from '@/components/GoSystemInfo/index'
|
||||||
import Person from './person.png'
|
import Person from './person.png'
|
||||||
|
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
@ -40,6 +43,7 @@ const {
|
|||||||
|
|
||||||
const t = window['$t']
|
const t = window['$t']
|
||||||
|
|
||||||
|
const modelShowInfo = ref(false)
|
||||||
const modelShow = ref(false)
|
const modelShow = ref(false)
|
||||||
|
|
||||||
// 是否失败
|
// 是否失败
|
||||||
@ -77,16 +81,16 @@ const options = ref([
|
|||||||
type: 'divider',
|
type: 'divider',
|
||||||
key: 'd1'
|
key: 'd1'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: renderLang('global.contact'),
|
|
||||||
key: 'contact',
|
|
||||||
icon: renderIcon(ChatboxEllipsesIcon)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: renderLang('global.sys_set'),
|
label: renderLang('global.sys_set'),
|
||||||
key: 'sysSet',
|
key: 'sysSet',
|
||||||
icon: renderIcon(SettingsSharpIcon)
|
icon: renderIcon(SettingsSharpIcon)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: renderLang('global.contact'),
|
||||||
|
key: 'contact',
|
||||||
|
icon: renderIcon(ChatboxEllipsesIcon)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'divider',
|
type: 'divider',
|
||||||
key: 'd3'
|
key: 'd3'
|
||||||
@ -108,10 +112,15 @@ const sysSetHandle = () => {
|
|||||||
modelShow.value = true
|
modelShow.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 系统设置
|
||||||
|
const sysInfoHandle = () => {
|
||||||
|
modelShowInfo.value = true
|
||||||
|
}
|
||||||
|
|
||||||
const handleSelect = (key: string) => {
|
const handleSelect = (key: string) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'contact':
|
case 'contact':
|
||||||
openDoc()
|
sysInfoHandle()
|
||||||
break
|
break
|
||||||
case 'sysSet':
|
case 'sysSet':
|
||||||
sysSetHandle()
|
sysSetHandle()
|
||||||
|
@ -9,7 +9,7 @@ const global = {
|
|||||||
// header
|
// header
|
||||||
doc: 'Document',
|
doc: 'Document',
|
||||||
help: 'Help',
|
help: 'Help',
|
||||||
contact: 'Contact Us',
|
contact: 'About Software',
|
||||||
logout: 'Logout',
|
logout: 'Logout',
|
||||||
// system setting
|
// system setting
|
||||||
sys_set: 'System Setting',
|
sys_set: 'System Setting',
|
||||||
|
@ -9,7 +9,7 @@ const global = {
|
|||||||
// 头部
|
// 头部
|
||||||
doc: '说明文档',
|
doc: '说明文档',
|
||||||
help: '帮助中心',
|
help: '帮助中心',
|
||||||
contact: '联系我们',
|
contact: '关于软件',
|
||||||
logout: '退出登录',
|
logout: '退出登录',
|
||||||
// 系统设置
|
// 系统设置
|
||||||
sys_set: '系统设置',
|
sys_set: '系统设置',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user