layout修复

This commit is contained in:
藤之内
2018-09-10 16:01:24 +08:00
parent 78410668ca
commit 6072e57736
5 changed files with 41 additions and 17 deletions

2
rap.1.1.0.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -95,7 +95,6 @@
var Rap={
config:function (config) {
Rap.debug = config.debug;
if(!config.default_page){
document.write("请配置默认页面default_page");
@@ -320,6 +319,9 @@
var config=this.$pageDefine.config;
config.template=template;
if(layout){
if(layout.indexOf('/')==0){
layout=layout.substr(1);
}
viewLines[modName]=layout.split('/').join('_');
}
var childMixin = {
@@ -607,9 +609,17 @@
return result;
}
return m;
}
,hashCall:null,
onHash:function (call) {
this.hashCall=call;
},
// $at_event:false,
onhashchange:function (e) {
var hash=window.location.hash;
if(Rap.hashCall&&Rap.hashCall(hash)){
return;
}
if(!hash&&Rap.default_page){
Rap.replace(Rap.default_page);
return;
@@ -719,7 +729,7 @@
}
}
js="(function () {"+js+"})();";
div.textContent="编译完成...";
div.textContent="编译完成...,文件为压缩版本需要自行压缩,在线压缩工具 https://tool.lu/js/";
doSave(js,'text/javascript','rap-all.js');
}
function doSave(value, type, name) {
@@ -752,9 +762,9 @@
}
if(!file){
buildJs();
return;
}
buildJs();
return;
}
var xhr;
if (window.XMLHttpRequest) {
@@ -784,3 +794,12 @@
};
return Rap;
});

1
rap.1.1.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -95,7 +95,6 @@
var Rap={
config:function (config) {
Rap.debug = config.debug;
if(!config.default_page){
document.write("请配置默认页面default_page");
@@ -320,6 +319,9 @@
var config=this.$pageDefine.config;
config.template=template;
if(layout){
if(layout.indexOf('/')==0){
layout=layout.substr(1);
}
viewLines[modName]=layout.split('/').join('_');
}
var childMixin = {
@@ -607,9 +609,17 @@
return result;
}
return m;
}
,hashCall:null,
onHash:function (call) {
this.hashCall=call;
},
// $at_event:false,
onhashchange:function (e) {
var hash=window.location.hash;
if(Rap.hashCall&&Rap.hashCall(hash)){
return;
}
if(!hash&&Rap.default_page){
Rap.replace(Rap.default_page);
return;
@@ -699,10 +709,6 @@
RapShareData.RapViews.index++;
});
window.addEventListener("popstate", Rap.onhashchange, false);
Rap.buildClear=function(){
localStorage.clear()
location.reload();
};
Rap.build=function (file) {
var div = document.createElement("div");
div.setAttribute('style',"width: 100%;height: 100%; background: white;position: fixed;left: 0;right: 0;text-align: center;padding-top: 30px;top: 0;z-index: 10000;font-size: 21px;");
@@ -723,7 +729,7 @@
}
}
js="(function () {"+js+"})();";
div.textContent="编译完成...";
div.textContent="编译完成...,文件为压缩版本需要自行压缩,在线压缩工具 https://tool.lu/js/";
doSave(js,'text/javascript','rap-all.js');
}
function doSave(value, type, name) {
@@ -756,9 +762,9 @@
}
if(!file){
buildJs();
return;
}
buildJs();
return;
}
var xhr;
if (window.XMLHttpRequest) {

2
rap.laster.min.js vendored

File diff suppressed because one or more lines are too long