1、引入Ruoyi-Vue-Plus版本的彩色控制台日志。

2、移除界面导航时的out-in fade-transform淡入效果。
3、添加非主框架内的独立路由用于测试。
This commit is contained in:
jlt 2022-04-02 22:45:41 +08:00
parent 7ede419ff1
commit 6ff5109ae3
6 changed files with 133 additions and 62 deletions

View File

@ -35,6 +35,7 @@
<jwt.version>0.9.1</jwt.version>
<qiniu.version>7.9.0</qiniu.version>
<gson.version>2.8.5</gson.version>
<tlog.version>1.3.6</tlog.version>
</properties>
<!-- 依赖声明 -->
@ -220,6 +221,12 @@
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>tlog-web-spring-boot-starter</artifactId>
<version>${tlog.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

View File

@ -66,6 +66,11 @@
<artifactId>private-farm</artifactId>
</dependency>
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>tlog-web-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>

View File

@ -2,15 +2,25 @@
<configuration>
<!-- 日志存放路径 -->
<property name="log.path" value="/home/ruoyi/logs" />
<property name="console.log.pattern"
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">-->
<!-- <encoder>-->
<!-- <pattern>${log.pattern}</pattern>-->
<!-- </encoder>-->
<!-- </appender>-->
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="com.yomahub.tlog.core.enhance.logback.AspectLogbackEncoder">
<pattern>${console.log.pattern}</pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">

View File

@ -1,57 +1,55 @@
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key" />
</keep-alive>
</transition>
</section>
</template>
<script>
export default {
name: 'AppMain',
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
},
key() {
return this.$route.path
}
}
}
</script>
<style lang="scss" scoped>
.app-main {
/* 50= navbar 50 */
min-height: calc(100vh - 50px);
width: 100%;
position: relative;
overflow: hidden;
}
.fixed-header+.app-main {
padding-top: 50px;
}
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px);
}
.fixed-header+.app-main {
padding-top: 84px;
}
}
</style>
<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
.fixed-header {
padding-right: 17px;
}
}
</style>
<template>
<section class="app-main">
<keep-alive :include="cachedViews">
<router-view :key="key" />
</keep-alive>
</section>
</template>
<script>
export default {
name: 'AppMain',
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
},
key() {
return this.$route.path
}
}
}
</script>
<style lang="scss" scoped>
.app-main {
/* 50= navbar 50 */
min-height: calc(100vh - 50px);
width: 100%;
position: relative;
overflow: hidden;
}
.fixed-header+.app-main {
padding-top: 50px;
}
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px);
}
.fixed-header+.app-main {
padding-top: 84px;
}
}
</style>
<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
.fixed-header {
padding-right: 17px;
}
}
</style>

View File

@ -51,6 +51,11 @@ export const constantRoutes = [
component: () => import('@/views/register'),
hidden: true
},
{
path: '/test',
component: () => import('@/views/test'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error/404'),

View File

@ -0,0 +1,46 @@
<template>
<div class="register">
<!-- 底部 -->
<div class="el-register-footer">
<span>Copyright © 2018-2022 私家农场 版权所有.</span>
</div>
</div>
</template>
<script>
export default {
name: "Test",
data() {
return {
codeUrl: ""
};
},
created() {
this.getCode();
},
methods: {
getCode() {
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.register {
height: 100%;
background-color: #1f2d3d;
}
.el-register-footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
</style>