mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 02:46:39 +08:00
v3.10.0【新增】全屏模式Modal等终极解决方案;【新增】生成环境去掉跨域;【优化】其他一些小细节
This commit is contained in:
parent
69fa9088f5
commit
b350918501
@ -2,6 +2,7 @@ package net.lab1024.sa.base.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
@ -17,6 +18,7 @@ import org.springframework.web.filter.CorsFilter;
|
||||
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Conditional(SystemEnvironmentConfig.class)
|
||||
public class CorsFilterConfig {
|
||||
|
||||
@Value("${access-control-allow-origin}")
|
||||
|
@ -96,8 +96,8 @@ public class AddFormVariableService extends CodeGenerateBaseVariableService {
|
||||
if (Boolean.TRUE.equals(field.getRequiredFlag())) {
|
||||
String notEmptyPrefix = "String".equals(codeField.getJavaType()) ? "@NotBlank" : "@NotNull";
|
||||
finalFieldMap.put("notEmpty", "\n " + notEmptyPrefix + "(message = \"" + codeField.getLabel() + " 不能为空\")");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import javax.validation.constraints.NotBlank;"
|
||||
: "import javax.validation.constraints.NotNull;");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import jakarta.validation.constraints.NotBlank;"
|
||||
: "import jakarta.validation.constraints.NotNull;");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ public class UpdateFormVariableService extends CodeGenerateBaseVariableService {
|
||||
if (Boolean.TRUE.equals(field.getRequiredFlag())) {
|
||||
String notEmptyPrefix = "String".equals(codeField.getJavaType()) ? "@NotBlank" : "@NotNull";
|
||||
finalFieldMap.put("notEmpty", "\n " + notEmptyPrefix + "(message = \"" + codeField.getLabel() + " 不能为空\")");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import javax.validation.constraints.NotBlank;" : "import javax.validation.constraints.NotNull;");
|
||||
packageList.add("String".equals(codeField.getJavaType()) ? "import jakarta.validation.constraints.NotBlank;" : "import jakarta.validation.constraints.NotNull;");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class DictService {
|
||||
* @return
|
||||
*/
|
||||
public List<DictKeyVO> queryAllKey() {
|
||||
return SmartBeanUtil.copyList(dictKeyDao.selectList(null), DictKeyVO.class);
|
||||
return SmartBeanUtil.copyList(dictKeyDao.selectByDeletedFlag(false), DictKeyVO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,14 +37,14 @@ public interface ${name.upperCamel}Dao extends BaseMapper<${name.upperCamel}Enti
|
||||
/**
|
||||
* 更新删除状态
|
||||
*/
|
||||
long updateDeleted(@Param("${primaryKeyFieldName}")${primaryKeyJavaType} ${primaryKeyFieldName},@Param("${deletedFlag}")boolean deletedFlag);
|
||||
long updateDeleted(@Param("${primaryKeyFieldName}")${primaryKeyJavaType} ${primaryKeyFieldName},@Param("deletedFlag")boolean deletedFlag);
|
||||
|
||||
#end
|
||||
#if($deleteInfo.deleteEnum == "Batch" || $deleteInfo.deleteEnum == "SingleAndBatch")
|
||||
/**
|
||||
* 批量更新删除状态
|
||||
*/
|
||||
void batchUpdateDeleted(@Param("idList")List<${primaryKeyJavaType}> idList,@Param("${deletedFlag}")boolean deletedFlag);
|
||||
void batchUpdateDeleted(@Param("idList")List<${primaryKeyJavaType}> idList,@Param("deletedFlag")boolean deletedFlag);
|
||||
|
||||
#end
|
||||
#end
|
||||
|
@ -40,7 +40,7 @@ spring:
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
username: lab1024@163.com
|
||||
password: LAB1024LAB
|
||||
password: ROIMSIQCEXHTQFTA
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
|
@ -21,26 +21,24 @@ spring:
|
||||
pointcut: net.lab1024.sa..*Service.*
|
||||
|
||||
# redis 连接池配置信息
|
||||
data:
|
||||
redis:
|
||||
database: 1
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
timeout: 10000ms
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 5
|
||||
min-idle: 1
|
||||
max-idle: 3
|
||||
max-wait: 30000ms
|
||||
|
||||
redis:
|
||||
database: 1
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
timeout: 10000ms
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-idle: 50
|
||||
max-wait: 30000ms
|
||||
# 邮件,置以SSL的方式发送, 这个需要使用这种方式并且端口是465
|
||||
mail:
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
username: lab1024@163.com
|
||||
password: LAB1024LAB
|
||||
password: 1024lab
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
@ -119,9 +117,6 @@ http:
|
||||
write-timeout: 50000
|
||||
keep-alive: 300000
|
||||
|
||||
# 跨域配置
|
||||
access-control-allow-origin: 'https://preview.smartadmin.vip'
|
||||
|
||||
# 心跳配置
|
||||
heart-beat:
|
||||
interval-seconds: 60
|
||||
|
@ -2,6 +2,7 @@ package net.lab1024.sa.base.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
@ -17,6 +18,7 @@ import org.springframework.web.filter.CorsFilter;
|
||||
* @Copyright <a href="https://1024lab.net">1024创新实验室</a>
|
||||
*/
|
||||
@Configuration
|
||||
@Conditional(SystemEnvironmentConfig.class)
|
||||
public class CorsFilterConfig {
|
||||
|
||||
@Value("${access-control-allow-origin}")
|
||||
|
@ -172,7 +172,7 @@ public class DictService {
|
||||
* @return
|
||||
*/
|
||||
public List<DictKeyVO> queryAllKey() {
|
||||
return SmartBeanUtil.copyList(dictKeyDao.selectList(null), DictKeyVO.class);
|
||||
return SmartBeanUtil.copyList(dictKeyDao.selectByDeletedFlag(false), DictKeyVO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,14 +37,14 @@ public interface ${name.upperCamel}Dao extends BaseMapper<${name.upperCamel}Enti
|
||||
/**
|
||||
* 更新删除状态
|
||||
*/
|
||||
long updateDeleted(@Param("${primaryKeyFieldName}")${primaryKeyJavaType} ${primaryKeyFieldName},@Param("${deletedFlag}")boolean deletedFlag);
|
||||
long updateDeleted(@Param("${primaryKeyFieldName}")${primaryKeyJavaType} ${primaryKeyFieldName},@Param("deletedFlag")boolean deletedFlag);
|
||||
|
||||
#end
|
||||
#if($deleteInfo.deleteEnum == "Batch" || $deleteInfo.deleteEnum == "SingleAndBatch")
|
||||
/**
|
||||
* 批量更新删除状态
|
||||
*/
|
||||
void batchUpdateDeleted(@Param("idList")List<${primaryKeyJavaType}> idList,@Param("${deletedFlag}")boolean deletedFlag);
|
||||
void batchUpdateDeleted(@Param("idList")List<${primaryKeyJavaType}> idList,@Param("deletedFlag")boolean deletedFlag);
|
||||
|
||||
#end
|
||||
#end
|
||||
|
@ -38,7 +38,7 @@ spring:
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
username: lab1024@163.com
|
||||
password: LAB1024LAB
|
||||
password: 1024lab
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
@ -117,9 +117,6 @@ http:
|
||||
write-timeout: 50000
|
||||
keep-alive: 300000
|
||||
|
||||
# 跨域配置
|
||||
access-control-allow-origin: 'https://preview.smartadmin.vip'
|
||||
|
||||
# 心跳配置
|
||||
heart-beat:
|
||||
interval-seconds: 60
|
||||
|
0
smart-admin-web-javascript/README.en.md
Normal file
0
smart-admin-web-javascript/README.en.md
Normal file
0
smart-admin-web-javascript/README.md
Normal file
0
smart-admin-web-javascript/README.md
Normal file
@ -19,20 +19,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
let url = window.location.href;
|
||||
if(url.indexOf("1024lab") > -1){
|
||||
location.href = "https://preview.smartadmin.vip";
|
||||
}
|
||||
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?5e12fadc47eb3aac662d848fd39ec07a";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -32,7 +32,6 @@
|
||||
},
|
||||
},
|
||||
}"
|
||||
:getPopupContainer="getPopupContainer"
|
||||
>
|
||||
<!---全局loading--->
|
||||
<a-spin :spinning="spinning" tip="稍等片刻,我在拼命加载中..." size="large">
|
||||
@ -50,8 +49,6 @@
|
||||
import { useSpinStore } from '/@/store/modules/system/spin';
|
||||
import { theme } from 'ant-design-vue';
|
||||
import { themeColors } from '/@/theme/color.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
|
||||
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
|
||||
const dayjsLocale = computed(() => messages[useAppConfigStore().language].dayjsLocale);
|
||||
@ -70,31 +67,4 @@
|
||||
const borderRadius = computed(() => {
|
||||
return useAppConfigStore().borderRadius;
|
||||
});
|
||||
|
||||
function getPopupContainer(node, dialogContext) {
|
||||
let fullScreenFlag = useAppConfigStore().$state.fullScreenFlag;
|
||||
if(fullScreenFlag){
|
||||
return getFullScreenContainer(node, dialogContext);
|
||||
}else{
|
||||
return getNotFullScreenContainer(node, dialogContext);
|
||||
}
|
||||
}
|
||||
|
||||
function getFullScreenContainer(node, dialogContext) {
|
||||
if (node === document.body) {
|
||||
return document.getElementById(LAYOUT_ELEMENT_IDS.content);
|
||||
}else if (node) {
|
||||
return node.parentNode;
|
||||
} else {
|
||||
return document.getElementById(LAYOUT_ELEMENT_IDS.content);
|
||||
}
|
||||
}
|
||||
|
||||
function getNotFullScreenContainer(node, dialogContext) {
|
||||
if (node) {
|
||||
return node.parentNode;
|
||||
} else {
|
||||
return document.body;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -38,13 +38,13 @@
|
||||
<script setup>
|
||||
import _ from 'lodash';
|
||||
import { tableColumnApi } from '/@/api/support/table-column-api';
|
||||
import { onMounted, reactive, ref, watch } from 'vue';
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import SmartTableColumnModal from './smart-table-column-modal.vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { mergeColumn } from './smart-table-column-merge';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config.js';
|
||||
|
||||
const props = defineProps({
|
||||
// 表格列数组
|
||||
modelValue: {
|
||||
@ -89,7 +89,6 @@
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
}
|
||||
|
||||
updateColumn(userTableColumnArray);
|
||||
}
|
||||
|
||||
@ -100,24 +99,16 @@
|
||||
if (fullScreenFlag.value) {
|
||||
// 退出全屏
|
||||
handleExitFullScreen();
|
||||
exitElementFullscreen(document.getElementById(LAYOUT_ELEMENT_IDS.content));
|
||||
exitElementFullscreen(document.body);
|
||||
} else {
|
||||
//全屏
|
||||
message.config({
|
||||
getContainer: () => document.getElementById(LAYOUT_ELEMENT_IDS.content),
|
||||
});
|
||||
fullScreenFlag.value = true;
|
||||
useAppConfigStore().startFullScreen();
|
||||
launchElementFullScreen(document.getElementById(LAYOUT_ELEMENT_IDS.content));
|
||||
launchElementFullScreen(document.body);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理退出全屏
|
||||
function handleExitFullScreen(){
|
||||
//取消全屏
|
||||
message.config({
|
||||
getContainer: () => document.body,
|
||||
});
|
||||
function handleExitFullScreen() {
|
||||
fullScreenFlag.value = false;
|
||||
useAppConfigStore().exitFullScreen();
|
||||
document.removeEventListener('fullscreenchange', handleFullscreenChange);
|
||||
|
@ -10,7 +10,7 @@
|
||||
<template>
|
||||
<a-layout class="admin-layout" style="min-height: 100%">
|
||||
<!-- 侧边菜单 side-menu -->
|
||||
<a-layout-sider :id="LAYOUT_ELEMENT_IDS.menu" :theme="theme" class="side-menu" :collapsed="collapsed" :trigger="null">
|
||||
<a-layout-sider :id="LAYOUT_ELEMENT_IDS.menu" :theme="theme" class="side-menu" :collapsed="collapsed" :trigger="null" v-show="!fullScreenFlag">
|
||||
<!-- 左侧菜单 -->
|
||||
<SideExpandMenu :collapsed="collapsed" />
|
||||
</a-layout-sider>
|
||||
@ -18,7 +18,7 @@
|
||||
<!--中间内容,一共三部分:1、顶部;2、中间内容区域;3、底部(一般是公司版权信息);-->
|
||||
<a-layout class="admin-layout-main" :style="`height: ${windowHeight}px`" :id="LAYOUT_ELEMENT_IDS.main">
|
||||
<!-- 顶部头部信息 -->
|
||||
<a-layout-header class="smart-layout-header" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<a-layout-header class="smart-layout-header" :id="LAYOUT_ELEMENT_IDS.header" v-show="!fullScreenFlag">
|
||||
<a-row justify="space-between" class="smart-layout-header-user">
|
||||
<a-col class="smart-layout-header-left">
|
||||
<span class="collapsed-button">
|
||||
@ -101,7 +101,8 @@
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
|
||||
const windowHeight = ref(window.innerHeight);
|
||||
|
||||
//是否全屏
|
||||
const fullScreenFlag = computed(() => useAppConfigStore().$state.fullScreenFlag);
|
||||
//主题颜色
|
||||
const theme = computed(() => useAppConfigStore().$state.sideMenuTheme);
|
||||
//是否显示标签页
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-layout class="admin-layout" style="min-height: 100%">
|
||||
<!-- 侧边菜单 side-menu -->
|
||||
<a-layout-sider :id="LAYOUT_ELEMENT_IDS.menu" class="side-menu" :width="sideMenuWidth" :collapsed="collapsed" :theme="theme">
|
||||
<a-layout-sider :id="LAYOUT_ELEMENT_IDS.menu" class="side-menu" :width="sideMenuWidth" :collapsed="collapsed" :theme="theme" v-show="!fullScreenFlag">
|
||||
<!-- 左侧菜单 -->
|
||||
<SideMenu :collapsed="collapsed" />
|
||||
</a-layout-sider>
|
||||
@ -9,7 +9,7 @@
|
||||
<!--中间内容,一共三部分:1、顶部;2、中间内容区域;3、底部(一般是公司版权信息);-->
|
||||
<a-layout :id="LAYOUT_ELEMENT_IDS.main" :style="`height: ${windowHeight}px`" class="admin-layout-main">
|
||||
<!-- 顶部头部信息 -->
|
||||
<a-layout-header class="layout-header" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<a-layout-header class="layout-header" :id="LAYOUT_ELEMENT_IDS.header" v-show="!fullScreenFlag">
|
||||
<a-row class="layout-header-user" justify="space-between">
|
||||
<a-col class="layout-header-left">
|
||||
<span class="collapsed-button">
|
||||
@ -96,6 +96,8 @@
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
|
||||
const windowHeight = ref(window.innerHeight);
|
||||
//是否全屏
|
||||
const fullScreenFlag = computed(() => useAppConfigStore().$state.fullScreenFlag);
|
||||
//菜单宽度
|
||||
const sideMenuWidth = computed(() => useAppConfigStore().$state.sideMenuWidth);
|
||||
//主题颜色
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<a-layout class="admin-layout">
|
||||
<!-- 顶部菜单 -->
|
||||
<a-layout-header class="top-menu" :theme="theme" :id="LAYOUT_ELEMENT_IDS.menu">
|
||||
<a-layout-header class="top-menu" :theme="theme" :id="LAYOUT_ELEMENT_IDS.menu" v-if="!fullScreenFlag">
|
||||
<TopMenu />
|
||||
</a-layout-header>
|
||||
|
||||
<!--中间内容-->
|
||||
<a-layout-content :id="LAYOUT_ELEMENT_IDS.content" class="admin-layout-content">
|
||||
<!---标签页-->
|
||||
<div class="page-tag-div" v-show="pageTagFlag" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<div class="page-tag-div" v-show="pageTagFlag && !fullScreenFlag" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<PageTag />
|
||||
</div>
|
||||
|
||||
@ -68,6 +68,8 @@
|
||||
};
|
||||
});
|
||||
|
||||
//是否全屏
|
||||
const fullScreenFlag = computed(() => useAppConfigStore().$state.fullScreenFlag);
|
||||
//是否显示标签页
|
||||
const pageTagFlag = computed(() => useAppConfigStore().$state.pageTagFlag);
|
||||
// 是否显示页脚
|
||||
@ -78,6 +80,10 @@
|
||||
const pageWidth = computed(() => useAppConfigStore().$state.pageWidth);
|
||||
// 多余高度
|
||||
const dueHeight = computed(() => {
|
||||
if (fullScreenFlag.value) {
|
||||
return '0';
|
||||
}
|
||||
|
||||
let due = '45px';
|
||||
if (useAppConfigStore().$state.pageTagFlag) {
|
||||
due = '85px';
|
||||
|
0
smart-admin-web-typescript/README.md
Normal file
0
smart-admin-web-typescript/README.md
Normal file
@ -32,7 +32,6 @@
|
||||
},
|
||||
},
|
||||
}"
|
||||
:getPopupContainer="getPopupContainer"
|
||||
>
|
||||
<!---全局loading--->
|
||||
<a-spin :spinning="spinning" tip="稍等片刻,我在拼命加载中..." size="large">
|
||||
@ -50,8 +49,6 @@
|
||||
import { useSpinStore } from '/@/store/modules/system/spin';
|
||||
import { theme } from 'ant-design-vue';
|
||||
import { themeColors } from '/@/theme/color.js';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
|
||||
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
|
||||
const dayjsLocale = computed(() => messages[useAppConfigStore().language].dayjsLocale);
|
||||
@ -70,31 +67,4 @@
|
||||
const borderRadius = computed(() => {
|
||||
return useAppConfigStore().borderRadius;
|
||||
});
|
||||
|
||||
function getPopupContainer(node, dialogContext) {
|
||||
let fullScreenFlag = useAppConfigStore().$state.fullScreenFlag;
|
||||
if(fullScreenFlag){
|
||||
return getFullScreenContainer(node, dialogContext);
|
||||
}else{
|
||||
return getNotFullScreenContainer(node, dialogContext);
|
||||
}
|
||||
}
|
||||
|
||||
function getFullScreenContainer(node, dialogContext) {
|
||||
if (node === document.body) {
|
||||
return document.getElementById(LAYOUT_ELEMENT_IDS.content);
|
||||
}else if (node) {
|
||||
return node.parentNode;
|
||||
} else {
|
||||
return document.getElementById(LAYOUT_ELEMENT_IDS.content);
|
||||
}
|
||||
}
|
||||
|
||||
function getNotFullScreenContainer(node, dialogContext) {
|
||||
if (node) {
|
||||
return node.parentNode;
|
||||
} else {
|
||||
return document.body;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -38,13 +38,13 @@
|
||||
<script setup lang="ts">
|
||||
import _ from 'lodash';
|
||||
import { tableColumnApi } from '/@/api/support/table-column-api';
|
||||
import { onMounted, reactive, ref, watch } from 'vue';
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import SmartTableColumnModal from './smart-table-column-modal.vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { mergeColumn } from './smart-table-column-merge';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config.js';
|
||||
|
||||
const props = defineProps({
|
||||
// 表格列数组
|
||||
modelValue: {
|
||||
@ -89,7 +89,6 @@
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
}
|
||||
|
||||
updateColumn(userTableColumnArray);
|
||||
}
|
||||
|
||||
@ -100,24 +99,16 @@
|
||||
if (fullScreenFlag.value) {
|
||||
// 退出全屏
|
||||
handleExitFullScreen();
|
||||
exitElementFullscreen(document.getElementById(LAYOUT_ELEMENT_IDS.content));
|
||||
exitElementFullscreen(document.body);
|
||||
} else {
|
||||
//全屏
|
||||
message.config({
|
||||
getContainer: () => document.getElementById(LAYOUT_ELEMENT_IDS.content),
|
||||
});
|
||||
fullScreenFlag.value = true;
|
||||
useAppConfigStore().startFullScreen();
|
||||
launchElementFullScreen(document.getElementById(LAYOUT_ELEMENT_IDS.content));
|
||||
launchElementFullScreen(document.body);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理退出全屏
|
||||
function handleExitFullScreen(){
|
||||
//取消全屏
|
||||
message.config({
|
||||
getContainer: () => document.body,
|
||||
});
|
||||
function handleExitFullScreen() {
|
||||
fullScreenFlag.value = false;
|
||||
useAppConfigStore().exitFullScreen();
|
||||
document.removeEventListener('fullscreenchange', handleFullscreenChange);
|
||||
|
@ -10,7 +10,7 @@
|
||||
<template>
|
||||
<a-layout class="admin-layout" style="min-height: 100%">
|
||||
<!-- 侧边菜单 side-menu -->
|
||||
<a-layout-sider :id="LAYOUT_ELEMENT_IDS.menu" :theme="theme" class="side-menu" :collapsed="collapsed" :trigger="null">
|
||||
<a-layout-sider :id="LAYOUT_ELEMENT_IDS.menu" :theme="theme" class="side-menu" :collapsed="collapsed" :trigger="null" v-show="!fullScreenFlag">
|
||||
<!-- 左侧菜单 -->
|
||||
<SideExpandMenu :collapsed="collapsed" />
|
||||
</a-layout-sider>
|
||||
@ -18,7 +18,7 @@
|
||||
<!--中间内容,一共三部分:1、顶部;2、中间内容区域;3、底部(一般是公司版权信息);-->
|
||||
<a-layout class="admin-layout-main" :style="`height: ${windowHeight}px`" :id="LAYOUT_ELEMENT_IDS.main">
|
||||
<!-- 顶部头部信息 -->
|
||||
<a-layout-header class="smart-layout-header" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<a-layout-header class="smart-layout-header" :id="LAYOUT_ELEMENT_IDS.header" v-show="!fullScreenFlag">
|
||||
<a-row justify="space-between" class="smart-layout-header-user">
|
||||
<a-col class="smart-layout-header-left">
|
||||
<span class="collapsed-button">
|
||||
@ -101,7 +101,8 @@
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
|
||||
const windowHeight = ref(window.innerHeight);
|
||||
|
||||
//是否全屏
|
||||
const fullScreenFlag = computed(() => useAppConfigStore().$state.fullScreenFlag);
|
||||
//主题颜色
|
||||
const theme = computed(() => useAppConfigStore().$state.sideMenuTheme);
|
||||
//是否显示标签页
|
||||
|
@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<a-layout class="admin-layout" style="min-height: 100%">
|
||||
<!-- 侧边菜单 side-menu -->
|
||||
<a-layout-sider :id="LAYOUT_ELEMENT_IDS.menu" class="side-menu" :width="sideMenuWidth" :collapsed="collapsed" :theme="theme">
|
||||
<a-layout-sider
|
||||
:id="LAYOUT_ELEMENT_IDS.menu"
|
||||
class="side-menu"
|
||||
:width="sideMenuWidth"
|
||||
:collapsed="collapsed"
|
||||
:theme="theme"
|
||||
v-show="!fullScreenFlag"
|
||||
>
|
||||
<!-- 左侧菜单 -->
|
||||
<SideMenu :collapsed="collapsed" />
|
||||
</a-layout-sider>
|
||||
@ -9,7 +16,7 @@
|
||||
<!--中间内容,一共三部分:1、顶部;2、中间内容区域;3、底部(一般是公司版权信息);-->
|
||||
<a-layout :id="LAYOUT_ELEMENT_IDS.main" :style="`height: ${windowHeight}px`" class="admin-layout-main">
|
||||
<!-- 顶部头部信息 -->
|
||||
<a-layout-header class="layout-header" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<a-layout-header class="layout-header" :id="LAYOUT_ELEMENT_IDS.header" v-show="!fullScreenFlag">
|
||||
<a-row class="layout-header-user" justify="space-between">
|
||||
<a-col class="layout-header-left">
|
||||
<span class="collapsed-button">
|
||||
@ -96,6 +103,8 @@
|
||||
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const.js';
|
||||
|
||||
const windowHeight = ref(window.innerHeight);
|
||||
//是否全屏
|
||||
const fullScreenFlag = computed(() => useAppConfigStore().$state.fullScreenFlag);
|
||||
//菜单宽度
|
||||
const sideMenuWidth = computed(() => useAppConfigStore().$state.sideMenuWidth);
|
||||
//主题颜色
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<a-layout class="admin-layout">
|
||||
<!-- 顶部菜单 -->
|
||||
<a-layout-header class="top-menu" :theme="theme" :id="LAYOUT_ELEMENT_IDS.menu">
|
||||
<a-layout-header class="top-menu" :theme="theme" :id="LAYOUT_ELEMENT_IDS.menu" v-if="!fullScreenFlag">
|
||||
<TopMenu />
|
||||
</a-layout-header>
|
||||
|
||||
<!--中间内容-->
|
||||
<a-layout-content :id="LAYOUT_ELEMENT_IDS.content" class="admin-layout-content">
|
||||
<!---标签页-->
|
||||
<div class="page-tag-div" v-show="pageTagFlag" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<div class="page-tag-div" v-show="pageTagFlag && !fullScreenFlag" :id="LAYOUT_ELEMENT_IDS.header">
|
||||
<PageTag />
|
||||
</div>
|
||||
|
||||
@ -68,6 +68,8 @@
|
||||
};
|
||||
});
|
||||
|
||||
//是否全屏
|
||||
const fullScreenFlag = computed(() => useAppConfigStore().$state.fullScreenFlag);
|
||||
//是否显示标签页
|
||||
const pageTagFlag = computed(() => useAppConfigStore().$state.pageTagFlag);
|
||||
// 是否显示页脚
|
||||
@ -78,6 +80,10 @@
|
||||
const pageWidth = computed(() => useAppConfigStore().$state.pageWidth);
|
||||
// 多余高度
|
||||
const dueHeight = computed(() => {
|
||||
if (fullScreenFlag.value) {
|
||||
return '0';
|
||||
}
|
||||
|
||||
let due = '45px';
|
||||
if (useAppConfigStore().$state.pageTagFlag) {
|
||||
due = '85px';
|
||||
|
Loading…
Reference in New Issue
Block a user