Merge remote-tracking branch 'origin/master'

master
wangbing 6 years ago
commit 477b707958

1
.gitignore vendored

@ -17,3 +17,4 @@ release.properties
*.gradle
gradlew
local.properties
node_modules/

@ -610,6 +610,10 @@ public class SpringBootCallable implements Callable {
File dist = new File(static_.getAbsolutePath(), "dist");
boolean mkdirs4 = dist.mkdirs();
{
Tool.outputResource(option + "/resources/static/favicon.ico", new File(static_.getAbsolutePath(), "favicon.ico"));
}
{//css文件
freeMarkerManager.outputTemp(new File(css.getAbsolutePath(), "base.css"), option + "/resources/static/css/base.css", ctx);
}
@ -618,21 +622,26 @@ public class SpringBootCallable implements Callable {
freeMarkerManager.outputTemp(new File(js.getAbsolutePath(), "ajax.js"), option + "/resources/static/js/ajax.ftl", ctx);
}
{//img
Tool.outputResource(option + "/resources/static/img/favicon.ico", new File(img.getAbsolutePath(), "favicon.ico"));
Tool.outputResource(option + "/resources/static/img/logo.png", new File(img.getAbsolutePath(), "logo.png"));
}
{//dist文件
Tool.outputResource(option + "/resources/static/dist/lib.min.css", new File(dist.getAbsolutePath(), "lib.min.css"));
//jquery + vue + vue-router + axios
Tool.outputResource(option + "/resources/static/dist/lib.min.js", new File(dist.getAbsolutePath(), "lib.min.js"));
//element-ui
Tool.outputResource(option + "/resources/static/dist/index.min.js", new File(dist.getAbsolutePath(), "index.min.js"));
Tool.outputResource(option + "/resources/static/dist/index.min.css", new File(dist.getAbsolutePath(), "index.min.css"));
//vonic
Tool.outputResource(option + "/resources/static/dist/vonic.min.js", new File(dist.getAbsolutePath(), "vonic.min.js"));
Tool.outputResource(option + "/resources/static/dist/vonic.min.css", new File(dist.getAbsolutePath(), "vonic.min.css"));
File fonts = new File(dist.getAbsolutePath(), "fonts");
fonts.mkdirs();
Tool.outputResource(option + "/resources/static/dist/fonts/w-e-icon.woff", new File(fonts.getAbsolutePath(), "w-e-icon.woff"));
Tool.outputResource(option + "/resources/static/dist/fonts/element-icons.woff", new File(fonts.getAbsolutePath(), "element-icons.woff"));
Tool.outputResource(option + "/resources/static/dist/fonts/w-e-icon.woff", new File(fonts.getAbsolutePath(), "w-e-icon.woff"));
}
}

@ -1,23 +1,19 @@
package ${basePackage}.framework.freemarker;
import org.springframework.http.HttpStatus;
import xyz.wbsite.framework.utils.LocalData;
import ${basePackage}.framework.utils.LogUtil;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator;
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
import javax.annotation.PostConstruct;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.Locale;
import java.util.Map;
@ -63,7 +59,7 @@ public class ViewNameTranslator extends DefaultRequestToViewNameTranslator {
}
Locale locale = localeResolver.resolveLocale(request);
{//查询View
{//查询screen
String[] split = servletPath.split("/");
StringBuilder sb = new StringBuilder("");
sb.append("screen");
@ -75,7 +71,9 @@ public class ViewNameTranslator extends DefaultRequestToViewNameTranslator {
View view = viewResolver.resolveViewName(viewName, locale);
if (view == null) {
LogUtil.e("can not find screen.");
return "404";
HttpServletResponse response = LocalData.getResponse();
response.setStatus(HttpStatus.NOT_FOUND.value());
return "";
}
}

@ -15,7 +15,7 @@ web.welcome.page = index
# 需要验证授权
web.url.auth.included = /**
# 不需要验证授权
web.url.auth.excluded = /static/**,/open/**,/api,/index,/,/login
web.url.auth.excluded = /favicon.ico,/static/**,/open/**,/api,/index,/,/login
# 默认的登录URL
web.url.login = /login
# 日志配置

@ -16,7 +16,7 @@ web.welcome.page = index
# 需要验证授权
web.url.auth.included = /**
# 不需要验证授权
web.url.auth.excluded = /static/**,/open/**,/api,/index,/,/login
web.url.auth.excluded = /favicon.ico,/static/**,/open/**,/api,/index,/,/login
# 默认的登录URL
web.url.login = /login
# 日志配置

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -3,9 +3,12 @@
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="${Uri.getUrl('/static/img/favicon.ico')}" rel="Shortcut Icon" type="image/x-icon"/>
<#--baseJs-->
<script src="${Uri.getUrl('/static/dist/lib.min.js')}" type="text/javascript"></script>
<link href="${Uri.getUrl('/static/dist/lib.min.css')}" rel="stylesheet"/>
<#--element-ui-->
<script src="${Uri.getUrl('/static/dist/index.min.js')}" type="text/javascript"></script>
<link href="${Uri.getUrl('/static/dist/index.min.css')}" rel="stylesheet"/>
<#--ajax接口-->
<script src="${Uri.getUrl('/static/js/ajax.js')}" type="text/javascript"></script>
<link href="${Uri.getUrl('/static/css/base.css')}" rel="stylesheet"/>
</head>

@ -1,10 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Mint UI</title>
<#--baseJs-->
<script src="${Uri.getUrl('/static/dist/lib.min.js')}" type="text/javascript"></script>
<#--vonic移动端ui-->
<script src="${Uri.getUrl('/static/dist/vonic.min.js')}" type="text/javascript"></script>
<link href="${Uri.getUrl('/static/dist/vonic.min.css')}" rel="stylesheet"/>
<#--ajax接口-->
<script src="${Uri.getUrl('/static/js/ajax.js')}" type="text/javascript"></script>
<link href="${Uri.getUrl('/static/css/base.css')}" rel="stylesheet"/>
</head>
<body>
<div id="app">
@ -17,9 +24,6 @@
<template id="home"><div>home</div></template>
<template id="next"><div>next</div></template>
<script src="${Uri.getUrl('/static/lib/vue/vue.min.js')}" type="text/javascript"></script>
<script src="${Uri.getUrl('/static/lib/vue/vue-router.min.js')}" type="text/javascript"></script>
<script src="${Uri.getUrl('/static/lib/fastclick.js')}" type="text/javascript"></script>
<script>
var router = new VueRouter({

@ -1,7 +1,280 @@
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
margin: 0px;
padding: 0px;
font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,SimSun,sans-serif;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
html {
line-height: 1.15;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%
}
body {
margin: 0;
font-size: 12px;
line-height: 1.5;
color: #515a6e;
background-color: #fff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale
}
html, body {
width: 100%;
height: 100%;
}
article, aside, footer, header, nav, section {
display: block
}
h1 {
font-size: 2em;
margin: .67em 0
}
figcaption, figure, main {
display: block
}
figure {
margin: 1em 40px
}
hr {
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 0;
overflow: visible
}
pre {
font-family: monospace, monospace;
font-size: 1em
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted
}
b, strong {
font-weight: inherit
}
b, strong {
font-weight: bolder
}
code, kbd, samp {
font-family: monospace, monospace;
font-size: 1em
}
dfn {
font-style: italic
}
mark {
background-color: #ff0;
color: #000
}
small {
font-size: 80%
}
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline
}
sub {
bottom: -.25em
}
sup {
top: -.5em
}
audio, video {
display: inline-block
}
audio:not([controls]) {
display: none;
height: 0
}
img {
border-style: none
}
svg:not(:root) {
overflow: hidden
}
button, input, optgroup, select, textarea {
font-family: sans-serif;
font-size: 100%;
line-height: 1.15;
margin: 0
}
button, input {
overflow: visible
}
button, select {
text-transform: none
}
[type=reset], [type=submit], button, html [type=button] {
-webkit-appearance: button
}
[type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner, button::-moz-focus-inner {
border-style: none;
padding: 0
}
[type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring, button:-moz-focusring {
outline: 1px dotted ButtonText
}
fieldset {
border: 1px solid silver;
margin: 0 2px;
padding: .35em .625em .75em
}
legend {
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal
}
progress {
display: inline-block;
vertical-align: baseline
}
textarea {
overflow: auto;
resize: vertical
}
[type=checkbox], [type=radio] {
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0
}
[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button {
height: auto
}
[type=search] {
-webkit-appearance: textfield;
outline-offset: -2px
}
[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration {
-webkit-appearance: none
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit
}
details, menu {
display: block
}
summary {
display: list-item
}
canvas {
display: inline-block
}
template {
display: none
}
[hidden] {
display: none
}
:after, :before {
-webkit-box-sizing: border-box;
box-sizing: border-box
}
article, aside, blockquote, body, button, dd, details, div, dl, dt, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, input, legend, li, menu, nav, ol, p, section, td, textarea, th, ul {
margin: 0;
padding: 0
}
button, input, select, textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit
}
input::-ms-clear, input::-ms-reveal {
display: none
}
a {
text-decoration: none;
outline: 0;
cursor: pointer;
-webkit-transition: color .2s ease;
transition: color .2s ease;
-webkit-text-decoration-skip: objects;
color: #757575;
}
a:active, a:hover {
outline-width: 0
}
a:hover {
opacity: 0.7;
}
a:active {
opacity: 0.9;
}
a:active, a:hover {
outline: 0;
text-decoration: none
}
a[disabled] {
color: #ccc;
cursor: not-allowed;
pointer-events: none
}
code, kbd, pre, samp {
font-family: Consolas, Menlo, Courier, monospace
}
a {
@ -28,6 +301,7 @@ h3 {
padding: 8px 0px;
margin: 16px 0px 6px 0px;
}
/*次要标题*/
h4 {
font-size: 14px;
@ -45,7 +319,6 @@ p.text-indent {
text-indent: 2em
}
/*正文*/
.text-regular {
font-size: 14px;
@ -142,17 +415,20 @@ p.text-indent {
[class*="bg-border-"] {
color: #303133
}
code{
code {
background-color: #f9fafc;
padding: 0 4px;
border: 1px solid #eaeefb;
border-radius: 4px;
display: inline-block;
}
.remarks{
.remarks {
font-size: 12px;
color: #909399
}
.table {
display: table;
}
@ -160,38 +436,58 @@ code{
.table-cell {
display: table-cell;
}
.table-cell.center {
text-align: center;
vertical-align: middle;
}
.table-cell.v-center {
vertical-align: middle;
}
.table-cell.h-center {
text-align: center;
}
.table-cell.right {
text-align: right;
}
.table-cell.left {
text-align: left;
}
.table-cell.top {
vertical-align: top;
}
.table-cell.bottom {
vertical-align: bottom;
}
.m-t-10{
.m-t-10 {
margin-top: 10px;
}
.m-t-20{
.m-t-20 {
margin-top: 20px;
}
.m-t-30{
.m-t-30 {
margin-top: 30px;
}
.m-t-40{
.m-t-40 {
margin-top: 40px;
}
.m-t-50{
.m-t-50 {
margin-top: 50px;
}
.center{
text-align: center;
}
.full {
width: 100%;
height: 100%;
@ -202,94 +498,289 @@ code{
overflow: hidden;
word-break: keep-all;
}
[v-cloak] {
display: none;
}
/* 可以设置不同的进入和离开动画 */
/* 设置持续时间和动画函数 */
.left-in-right-out-enter-active ,.left-in-right-out-leave-active {
.left-in-right-out-enter-active, .left-in-right-out-leave-active {
transition: all 0.3s linear;
position: absolute;
}
.left-in-right-out-enter
/* .slide-fade-leave-active for below version 2.1.8 */ {
/* .slide-fade-leave-active for below version 2.1.8 */
{
transform: translateX(-100%);
opacity: 0;
}
.left-in-right-out-leave-to
/* .slide-fade-leave-active for below version 2.1.8 */ {
.left-in-right-out-leave-to
/* .slide-fade-leave-active for below version 2.1.8 */
{
transform: translateX(100%);
opacity: 0;
}
.right-in-left-out-enter-active ,.right-in-left-out-leave-active {
.right-in-left-out-enter-active, .right-in-left-out-leave-active {
transition: all .3s linear;
position: absolute;
}
.right-in-left-out-enter
/* .slide-fade-leave-active for below version 2.1.8 */ {
.right-in-left-out-enter {
transform: translateX(100%);
}
.right-in-left-out-leave-to
/* .slide-fade-leave-active for below version 2.1.8 */ {
.right-in-left-out-leave-to {
transform: translateX(-100%);
}
.el-switch__input:focus ~ .el-switch__core {
position: relative;
box-sizing: border-box;
outline: none !important;
}
.row {
position: relative;
box-sizing: border-box;
}
[class*=col-] {
float: left;
box-sizing: border-box;
}
.col-1 {
width: 4.16667%;
}
.col-2 {
width: 8.33333%;
}
.col-3 {
width: 12.5%;
}
.col-4 {
width: 16.66667%;
}
.col-5 {
width: 20.83333%;
}
.col-6 {
width: 25%;
}
.col-7 {
width: 29.16667%;
}
.col-8 {
width: 33.33333%;
}
.col-9 {
width: 37.5%;
}
.col-10 {
width: 41.66667%;
}
.col-11 {
width: 45.83333%;
}
.col-12 {
width: 50%;
}
.col-13 {
width: 54.16667%;
}
.col-14 {
width: 58.33333%;
}
.col-15 {
width: 62.5%;
}
.col-16 {
width: 66.66667%;
}
.col-17 {
width: 70.83333%;
}
.col-18 {
width: 75%;
}
.col-19 {
width: 79.16667%;
}
.el-switch__input:focus~.el-switch__core{
outline: none!important;
.col-20 {
width: 83.33333%;
}
html,body{
.col-21 {
width: 87.5%;
}
.col-22 {
width: 91.66667%;
}
.col-23 {
width: 95.83333%;
}
.col-24 {
width: 100%;
height: 100%;
}
#header {
height: 80px;
line-height: 80px;
overflow: hidden;
width: 1140px;
margin: 0px auto;
.page_list {
display: flex;
}
#header .logo {
width: 45px;
height: 45px;
.page_list a {
display: inline-block;
vertical-align: middle;
height: 35px;
width: 35px;
line-height: 35px;
text-align: center;
cursor: pointer;
background-color: #2a2a2a;
color: #ffffff;
}
#header .logo img {
width: 100%;
height: 100%;
.page_list a.disabled {
opacity: 0.7;
}
#app {
width: 1140px;
height: calc(100% - 80px);
overflow: hidden;
margin: 0px auto;
.page_list a.current {
background-color: #16C0F8;
color: #ffffff;
}
.page_list a:hover {
background-color: #16C0F8;
color: #ffffff;
}
.page_list a.disabled:hover {
background-color: #373737;
color: #ffffff;
}
.page_list a.top_page,
.page_list a.page_prev,
.page_list a.page_next,
.page_list a.end_page {
width: 55px;
padding: 0px 5px;
}
.page_list p{
padding: 0px 20px;
line-height: 35px;
}
::-webkit-scrollbar {
width: 7px;
height: 7px;
background-color: #ffffff;
}
::-webkit-scrollbar-thumb {
background-color: #16C0F8;
}
::-webkit-scrollbar-track {
background-color: #ffffff;
}
#app>section{
.el-scrollbar.hidden_x > .el-scrollbar__wrap {
overflow-x: hidden !important;
}
.el-scrollbar.hidden_x > .el-scrollbar__wrap > .el-scrollbar__view {
height: 100%;
}
#app .menu{
.el-menu--horizontal {
border-bottom: solid 0px #e6e6e6 !important;
}
.el-message {
min-width: 100px;
padding: 10px 60px 10px 20px;
background-color: #ffffff;
box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
}
.loading-bar {
width: 100%;
padding: 0px;
top: 0px;
box-shadow: 0px 0px 0px 0px;
border: 0px;
}
.loading-bar .el-message__content {
display: block;
width: 100%;
height: 2px;
}
.loading-bar .el-message__content .bar {
display: block;
height: 2px;
background-color: #2d8cf0;
}
.loading-bar .el-message__content .bar.error {
background-color: #ff1a0e;
}
/* 带有固定title布局,title保持固定*/
.wb-layout-title-fix {
width: 100%;
height: 100%;
width: 250px;
overflow: hidden;
}
#app .main{
height: 100%;
.wb-layout-title-fix > .wb-head {
height: 60px;
overflow: hidden;
}
.el-scrollbar__wrap{
overflow-x: hidden!important;
padding-bottom: 20px;
.wb-layout-title-fix > .wb-body {
height: calc(100% - 60px);
}
.el-menu--horizontal{
border-bottom: solid 0px #e6e6e6!important;
/* 保持页脚绝对底部,当内容足够或高于屏幕,会自动将页面撑开,底部依旧保持在底部*/
.wb-layout-foot-absolute {
position: relative;
width: 100%;
height: auto;
min-height: 100%;
}
.wb-layout-foot-absolute > .wb-body {
padding-bottom: 50px;
}
.wb-layout-foot-absolute > .wb-foot {
position: absolute;
bottom: 0px;
left: 0px;
height: 50px;
width: 100%;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -38,18 +38,18 @@ gulp.task("dev", function () {
gulp.task("clean", function () {
del(["dist/*"]);
del(["dist"]);
})
//baseJs
var baseJsList = [
"./lib/jquery/jquery.js",
"./lib/vue/vue.js",
"./lib/vue-router/vue-router.js",
"./lib/element-ui/index.js",
"./lib/axios/axios.js",
];
//baseCss
var baseCssList = [
"./lib/element-ui/index.css",
];
gulp.task("baseJs", function () {
return gulp.src(baseJsList)
@ -70,7 +70,6 @@ gulp.task("baseCss", function () {
})
//字体
var baseFontList = [
"./lib/element-ui/fonts/*",
"./lib/vue/fonts/*"
];
gulp.task('font', function () {

Loading…
Cancel
Save

Powered by TurnKey Linux.