parent
cd06fce8a0
commit
9aaa908292
@ -0,0 +1,118 @@
|
||||
package ${basePackage}.config;
|
||||
|
||||
import ${basePackage}.frame.auth.LocalData;
|
||||
import ${basePackage}.frame.base.Control;
|
||||
import freemarker.template.SimpleScalar;
|
||||
import freemarker.template.TemplateMethodModelEx;
|
||||
import freemarker.template.TemplateModelException;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.validation.support.BindingAwareModelMap;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.springframework.web.servlet.DispatcherServlet;
|
||||
import org.springframework.web.servlet.LocaleResolver;
|
||||
import org.springframework.web.servlet.View;
|
||||
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@Configuration
|
||||
public class FreeMarkerConfig {
|
||||
@Autowired
|
||||
private FreeMarkerViewResolver viewResolver;
|
||||
@Autowired
|
||||
private freemarker.template.Configuration configuration;
|
||||
@Value("${r'${server.servlet.context-path}'}")
|
||||
private String context;
|
||||
private String screenPrefix = "/screen/";
|
||||
private String controlPrefix = "/control/";
|
||||
private String suffix = ".ftl";
|
||||
|
||||
@PostConstruct
|
||||
public void setSharedVariable() throws TemplateModelException {
|
||||
configuration.setSharedVariable("context", context);
|
||||
configuration.setSharedVariable("screenHolder", new ScreenHolder());
|
||||
configuration.setSharedVariable("controlHolder", new ControlHolder());
|
||||
}
|
||||
|
||||
private class ScreenHolder implements TemplateMethodModelEx {
|
||||
|
||||
@Override
|
||||
public Object exec(List list) throws TemplateModelException {
|
||||
try {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
LocaleResolver localeResolver = (LocaleResolver) request.getAttribute(DispatcherServlet.LOCALE_RESOLVER_ATTRIBUTE);
|
||||
String servletPath = LocalData.getAction();
|
||||
servletPath = servletPath.replaceAll("^/", "");
|
||||
|
||||
String[] split = servletPath.split("/");
|
||||
StringBuilder sb = new StringBuilder("");
|
||||
|
||||
// 分割组装路径
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
sb.append(split[i]);
|
||||
if (i != split.length - 1) {
|
||||
sb.append(File.separator);
|
||||
}
|
||||
}
|
||||
|
||||
Locale locale = localeResolver.resolveLocale(request);
|
||||
String viewName = "screen" + File.separator + sb.toString();
|
||||
View view = viewResolver.resolveViewName(viewName, locale);
|
||||
//无法找到对应screen
|
||||
if (view == null) {
|
||||
return "";
|
||||
} else {
|
||||
return screenPrefix + servletPath + suffix;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private class ControlHolder implements TemplateMethodModelEx {
|
||||
|
||||
@Override
|
||||
public Object exec(List list) throws TemplateModelException {
|
||||
String control = "";
|
||||
if (list.size() != 1) {
|
||||
return "";
|
||||
}
|
||||
Object o = list.get(0);
|
||||
if (o instanceof SimpleScalar) {
|
||||
control = ((SimpleScalar) o).getAsString();
|
||||
}
|
||||
|
||||
// 查找是否存在对应控制面板执行器
|
||||
Control controlExec = null;
|
||||
try {
|
||||
controlExec = LocalData.getApplicationContext().getBean(ActionConfig.CONTROL_PREFIX + "." + control, Control.class);
|
||||
|
||||
HttpServletRequest request = LocalData.getRequest();
|
||||
HttpServletResponse response = LocalData.getResponse();
|
||||
|
||||
BindingAwareModelMap modelMap = new BindingAwareModelMap();
|
||||
controlExec.exec(modelMap, request, response);
|
||||
|
||||
for (String key : modelMap.keySet()) {
|
||||
request.setAttribute(key, modelMap.get(key));
|
||||
}
|
||||
} catch (BeansException e) {
|
||||
|
||||
}
|
||||
|
||||
control = control.replaceAll("/", File.separator);
|
||||
return controlPrefix + control + suffix;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,249 +0,0 @@
|
||||
<head>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 700px;
|
||||
margin: 50px auto;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.code {
|
||||
font-weight: 500;
|
||||
top: 100px;
|
||||
left: 400px;
|
||||
text-align: center;
|
||||
width: 300px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
font-family: 'Varela Round', sans-serif;
|
||||
font-size: 60px;
|
||||
color: #6bbee0;
|
||||
letter-spacing: 3px;
|
||||
text-shadow: 0 0 5px #78d0ec;
|
||||
animation: flux 2s linear infinite;
|
||||
}
|
||||
|
||||
.message {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 20px;
|
||||
color: #505050;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.message2 {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 15px;
|
||||
color: #505050;
|
||||
font-weight: 300;
|
||||
width: 360px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.door-frame {
|
||||
height: 340px;
|
||||
width: 220px;
|
||||
border-radius: 90px 90px 0 0;
|
||||
background-color: #8594A5;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.door {
|
||||
height: 280px;
|
||||
width: 170px;
|
||||
border-radius: 70px 70px 0 0;
|
||||
background-color: #A0AEC0;
|
||||
}
|
||||
|
||||
.eye {
|
||||
top: 15px;
|
||||
left: 25px;
|
||||
height: 5px;
|
||||
width: 15px;
|
||||
border-radius: 50%;
|
||||
background-color: white;
|
||||
animation: eye 7s ease-in-out infinite;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.eye2 {
|
||||
left: 65px;
|
||||
}
|
||||
|
||||
.window {
|
||||
height: 40px;
|
||||
width: 130px;
|
||||
background-color: #1C2127;
|
||||
border-radius: 3px;
|
||||
margin: 80px auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.leaf {
|
||||
height: 40px;
|
||||
width: 130px;
|
||||
background-color: #8594A5;
|
||||
border-radius: 3px;
|
||||
margin: 80px auto;
|
||||
animation: leaf 7s infinite;
|
||||
transform-origin: right;
|
||||
}
|
||||
|
||||
.handle {
|
||||
height: 8px;
|
||||
width: 30px;
|
||||
border-radius: 4px;
|
||||
background-color: #EBF3FC;
|
||||
position: absolute;
|
||||
margin-top: 195px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.rectangle {
|
||||
height: 60px;
|
||||
width: 20px;
|
||||
background-color: #CBD8E6;
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
margin-top: 160px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.message3 {
|
||||
margin-top: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
a.login {
|
||||
font-size: 15px;
|
||||
text-decoration: none;
|
||||
color: rgba(0, 130, 192, 0.69);
|
||||
}
|
||||
|
||||
a.login:hover {
|
||||
color: #0074c0;
|
||||
}
|
||||
|
||||
@keyframes leaf {
|
||||
0% {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
5% {
|
||||
transform: scaleX(0.2);
|
||||
}
|
||||
70% {
|
||||
transform: scaleX(0.2);
|
||||
}
|
||||
75% {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
100% {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes eye {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateX(0)
|
||||
}
|
||||
5% {
|
||||
opacity: 0;
|
||||
}
|
||||
15% {
|
||||
opacity: 1;
|
||||
transform: translateX(0)
|
||||
}
|
||||
20% {
|
||||
transform: translateX(15px)
|
||||
}
|
||||
35% {
|
||||
transform: translateX(15px)
|
||||
}
|
||||
40% {
|
||||
transform: translateX(-15px)
|
||||
}
|
||||
60% {
|
||||
transform: translateX(-15px)
|
||||
}
|
||||
65% {
|
||||
transform: translateX(0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flux {
|
||||
0%,
|
||||
100% {
|
||||
text-shadow: 0 0 5px #00FFC6, 0 0 15px #00FFC6, 0 0 50px #00FFC6, 0 0 50px #00FFC6, 0 0 2px #B9FFE8, 2px 2px 3px #12E29C;
|
||||
color: #4BFFEF;
|
||||
}
|
||||
50% {
|
||||
text-shadow: 0 0 3px #00B58D, 0 0 7px #00B58D, 0 0 25px #00B58D, 0 0 25px #00B58D, 0 0 2px #00B58D, 2px 2px 3px #006A60;
|
||||
color: #63D3AE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
var count = 4;
|
||||
|
||||
function go() {
|
||||
if (count > 0) {
|
||||
var e = document.getElementById("timer");
|
||||
e.innerHTML = count + " 秒后自动跳转登录页"
|
||||
count--;
|
||||
} else {
|
||||
location.href = '${Uri.getUrl("/login.htm")}';
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(go, 1000);
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box">
|
||||
<div class="container">
|
||||
<div class="door-frame">
|
||||
<div class="door">
|
||||
<div class="rectangle">
|
||||
</div>
|
||||
<div class="handle">
|
||||
</div>
|
||||
<div class="window">
|
||||
<div class="eye">
|
||||
</div>
|
||||
<div class="eye eye2">
|
||||
</div>
|
||||
<div class="leaf">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="code">403</div>
|
||||
<div class="message">您没有足够的权限哦!</div>
|
||||
<div class="message2">您正在试图访问一个没有事先授权的页面.或登录已失效。</div>
|
||||
<div class="message3" id="timer">5 秒后自动跳转登录页</div>
|
||||
<a class="login" href="${Uri.getUrl("/login.htm")}">立即跳转</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
@ -1,78 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
|
||||
<title>404-对不起!您访问的页面不存在</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.box {
|
||||
border: 10px solid #0000002b;
|
||||
margin: 100px auto;
|
||||
padding: 50px;
|
||||
width: 700px;
|
||||
background-color: #ffffff;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.box div {
|
||||
vertical-align: top;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.box div.img {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.box div.info {
|
||||
width: 500px;
|
||||
padding-left: 50px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.box div.info {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.box div.info a {
|
||||
margin-top: 50px;
|
||||
text-decoration: none;
|
||||
background: #f2f2f2;
|
||||
cursor: pointer;
|
||||
border: 3px solid #0000002b;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.box div.info a:hover {
|
||||
background: #e6e6e6;
|
||||
border: 3px solid #0000002b
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="box">
|
||||
<div class="img">
|
||||
<svg t="1571230949474" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="793" width="200" height="200">
|
||||
<path d="M931.6 585.6v79c28.6-60.2 44.8-127.4 44.8-198.4C976.4 211 769.4 4 514.2 4S52 211 52 466.2c0 3.2 0.2 6.4 0.2 9.6l166-206h96.4L171.8 485.6h46.4v-54.8l99.2-154.6V668h-99.2v-82.4H67.6c43 161 170.6 287.4 332.4 328.6-10.4 26.2-40.6 89.4-90.8 100.6-62.2 14 168.8 3.4 333.6-104.6C769.4 873.6 873.6 784.4 930.2 668h-97.6v-82.4H666.4V476l166.2-206.2h94L786.2 485.6h46.4v-59l99.2-154v313zM366.2 608c-4.8-11.2-7.2-23.2-7.2-36V357.6c0-12.8 2.4-24.8 7.2-36 4.8-11.2 11.4-21 19.6-29.2 8.2-8.2 18-14.8 29.2-19.6 11.2-4.8 23.2-7.2 36-7.2h81.6c12.8 0 24.8 2.4 36 7.2 11 4.8 20.6 11.2 28.8 19.2l-88.6 129.4v-23c0-4.8-1.6-8.8-4.8-12-3.2-3.2-7.2-4.8-12-4.8s-8.8 1.6-12 4.8c-3.2 3.2-4.8 7.2-4.8 12v72L372.6 620c-2.4-3.8-4.6-7.8-6.4-12z m258.2-36c0 12.8-2.4 24.8-7.2 36-4.8 11.2-11.4 21-19.6 29.2-8.2 8.2-18 14.8-29.2 19.6-11.2 4.8-23.2 7.2-36 7.2h-81.6c-12.8 0-24.8-2.4-36-7.2-11.2-4.8-21-11.4-29.2-19.6-3.6-3.6-7-7.8-10-12l99.2-144.6v50.6c0 4.8 1.6 8.8 4.8 12 3.2 3.2 7.2 4.8 12 4.8s8.8-1.6 12-4.8c3.2-3.2 4.8-7.2 4.8-12v-99.6L601 296.4c6.6 7.4 12 15.8 16 25.2 4.8 11.2 7.2 23.2 7.2 36V572z"
|
||||
p-id="794"></path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
<p>抱歉,您所请求的页面不存在或暂时不可用、也可能已被永久移除!</p>
|
||||
|
||||
<br>
|
||||
|
||||
<a onclick="history.back()">返回上页</a> <a href="/">返回首页</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,80 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
|
||||
<title>500-服务器走了下神!</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.box {
|
||||
border: 10px solid #0000002b;
|
||||
margin: 100px auto;
|
||||
padding: 50px;
|
||||
width: 700px;
|
||||
background-color: #ffffff;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.box > div {
|
||||
vertical-align: top;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.box > div.img {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.box > div.info {
|
||||
width: 500px;
|
||||
padding-left: 50px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.box > div.info {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.box > div.info a {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
background: #f2f2f2;
|
||||
cursor: pointer;
|
||||
border: 3px solid #0000002b;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.box > div.info a:hover {
|
||||
background: #e6e6e6;
|
||||
border: 3px solid #0000002b
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="box">
|
||||
<div class="img">
|
||||
<svg t="1571233328721" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="4252" width="198" height="198">
|
||||
<path d="M969.143 548.571q0 14.848-10.862 25.71t-25.71 10.862h-128q0 97.719-38.29 165.705L885.138 870.29Q896 881.152 896 896t-10.862 25.71q-10.276 10.861-25.71 10.861t-25.71-10.861L720.568 809.143q-2.853 2.852-8.558 7.424t-23.99 16.274-37.157 20.846-46.848 16.567-55.443 7.424v-512H475.43v512q-29.148 0-58.003-7.717t-49.7-18.87-37.705-22.273-24.869-18.578l-8.558-8.01-104.557 118.273q-11.447 11.995-27.429 11.995-13.714 0-24.576-9.143-10.862-10.276-11.703-25.417t8.85-26.587L252.6 741.632q-33.134-65.134-33.134-156.562h-128q-14.848 0-25.71-10.862t-10.861-25.71 10.861-25.71 25.71-10.861h128v-168.01l-98.852-98.852q-10.862-10.862-10.862-25.71t10.862-25.71 25.71-10.861 25.709 10.862l98.853 98.852h482.304l98.852-98.852q10.862-10.862 25.71-10.862t25.71 10.862 10.861 25.71-10.861 25.71l-98.853 98.852v168.009h128q14.848 0 25.71 10.862t10.861 25.71zM694.857 219.43H329.143q0-75.996 53.43-129.427T512 36.572t129.426 53.43 53.431 129.427z"
|
||||
fill="" p-id="4253"></path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
<p style="font-size: 18px;font-weight: bold">服务器内部错误,错误信息如下:</p>
|
||||
|
||||
<p>${msg}</p>
|
||||
|
||||
<br>
|
||||
|
||||
<a onclick="history.back()">返回上页</a> <a href="/">返回首页</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,5 +0,0 @@
|
||||
<div style="height: 50px;background-color: #303133">
|
||||
<center>
|
||||
<h3 style="color: #ffffff">------------------------------this is footer html------------------------------</h3>
|
||||
</center>
|
||||
</div>
|
@ -1,50 +0,0 @@
|
||||
<div id="header" v-cloak>
|
||||
|
||||
<div class="table full">
|
||||
<div class="table-cell v-center">
|
||||
<div class="logo">
|
||||
<img src="${Url.setUrl('/static/img/logo.png')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-cell v-right">
|
||||
<el-menu
|
||||
:default-active="activeIndex2"
|
||||
mode="horizontal"
|
||||
@select="handleSelect">
|
||||
<el-menu-item index="1">首页</el-menu-item>
|
||||
<el-submenu index="2">
|
||||
<template slot="title">我的工作台</template>
|
||||
<el-menu-item index="2-1">选项1</el-menu-item>
|
||||
<el-menu-item index="2-2">选项2</el-menu-item>
|
||||
<el-menu-item index="2-3">选项3</el-menu-item>
|
||||
<el-submenu index="2-4">
|
||||
<template slot="title">选项4</template>
|
||||
<el-menu-item index="2-4-1">选项1</el-menu-item>
|
||||
<el-menu-item index="2-4-2">选项2</el-menu-item>
|
||||
<el-menu-item index="2-4-3">选项3</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-submenu>
|
||||
<el-menu-item index="3" disabled>消息中心</el-menu-item>
|
||||
<el-menu-item index="4">关于</el-menu-item>
|
||||
</el-menu>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
var header = new Vue({
|
||||
el: '#header',
|
||||
data: {
|
||||
activeIndex: '1',
|
||||
activeIndex2: '1'
|
||||
},
|
||||
methods: {
|
||||
handleSelect: function (key, keyPath) {
|
||||
console.log(key, keyPath);
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
@ -1,6 +0,0 @@
|
||||
<#macro print items >
|
||||
<#nested>:
|
||||
<#list items as item>
|
||||
<a>${item}</a>
|
||||
</#list>
|
||||
</#macro>
|
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<script src="${Url.setUrl('/static/dist/lib.min.js')}" type="text/javascript"></script>
|
||||
<link href="${Url.setUrl('/static/dist/lib.min.css')}" rel="stylesheet"/>
|
||||
<script src="${Url.setUrl('/static/js/services.js')}" type="text/javascript"></script>
|
||||
<link href="${Url.setUrl('/static/css/base.css')}" rel="stylesheet"/>
|
||||
<link href="${Url.setUrl('/static/img/favicon.ico')}" rel="Shortcut Icon" type="image/x-icon"/>
|
||||
</head>
|
||||
<body>
|
||||
<#include Layout.setControl("macro")/>
|
||||
<#include Layout.setControl("header")/>
|
||||
<#include Layout.setScreen()/>
|
||||
<#--<#include Layout.setControl("footer")/>-->
|
||||
</body>
|
||||
</html>
|
@ -1,44 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta 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>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<router-link to="/">首页</router-link>
|
||||
<router-link to="/next">next</router-link>
|
||||
<transition name="wb-zoom-in-top">
|
||||
<router-view></router-view>
|
||||
</transition>
|
||||
</div>
|
||||
|
||||
<template id="home"><div>home</div></template>
|
||||
<template id="next"><div>next</div></template>
|
||||
<script src="${Url.setUrl('/static/lib/vue/vue.min.js')}" type="text/javascript"></script>
|
||||
<script src="${Url.setUrl('/static/lib/vue/vue-router.min.js')}" type="text/javascript"></script>
|
||||
<script src="${Url.setUrl('/static/lib/fastclick.js')}" type="text/javascript"></script>
|
||||
|
||||
<script>
|
||||
var router = new VueRouter({
|
||||
routes:[
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component:Vue.extend({template: '#home'})
|
||||
},
|
||||
{
|
||||
path: '/next',
|
||||
name: 'next',
|
||||
component:Vue.extend({template: '#next'})
|
||||
}
|
||||
]
|
||||
});
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
router:router
|
||||
})
|
||||
</script>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue