Bundled output for commit c4c0f3934e [skip ci]
This commit is contained in:
parent
c4c0f3934e
commit
78963071bb
2 changed files with 2 additions and 2 deletions
|
|
@ -1134,7 +1134,7 @@ var _24 = function($window, mount0) {
|
|||
var router = coreRouter($window)
|
||||
var currentResolve, currentComponent, currentRender, currentArgs, currentPath
|
||||
var RouteComponent = {view: function() {
|
||||
return currentRender(Vnode(currentComponent, null, currentArgs, undefined, undefined, undefined))
|
||||
return [currentRender(Vnode(currentComponent, null, currentArgs, undefined, undefined, undefined))]
|
||||
}}
|
||||
function defaultRender(vnode1) {
|
||||
return vnode1
|
||||
|
|
|
|||
2
mithril.min.js
vendored
2
mithril.min.js
vendored
|
|
@ -38,6 +38,6 @@ h?h=!1:"/"!==h.charAt(0)&&(m=new Date(h),isNaN(m.getTime())||(h=m));var m=k.spli
|
|||
g&&(g=t(function(){g=null;b()}))}}function f(b,e,f){var g=b.indexOf("?"),h=b.indexOf("#"),m=-1<g?g:-1<h?h:b.length;if(-1<g){var g=J(b.slice(g+1,-1<h?h:b.length)),k;for(k in g)e[k]=g[k]}if(-1<h)for(k in e=J(b.slice(h+1)),e)f[k]=e[k];return b.slice(0,m)}function h(){switch(q.charAt(0)){case "#":return e("hash").slice(q.length);case "?":return e("search").slice(q.length)+e("hash");default:return e("pathname").slice(q.length)+e("search")+e("hash")}}function k(e,g,h){var k={},n={};e=f(e,k,n);if(null!=
|
||||
g){for(var t in g)k[t]=g[t];e=e.replace(/:([^\/]+)/g,function(b,e){delete k[e];return g[e]})}(t=E(k))&&(e+="?"+t);(n=E(n))&&(e+="#"+n);m?(h&&h.replace?b.history.replaceState(null,null,q+e):b.history.pushState(null,null,q+e),b.onpopstate()):b.location.href=q+e}var m="function"===typeof b.history.pushState,t="function"===typeof setImmediate?setImmediate:setTimeout,q="#!",g;return{setPrefix:function(b){q=b},getPath:h,setPath:k,defineRoutes:function(e,g,k){function t(){var b=h(),m={},n=f(b,m,m),q;for(q in e){var u=
|
||||
new RegExp("^"+q.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(u.test(n)){n.replace(u,function(){for(var f=q.match(/:[^\/]+/g)||[],h=[].slice.call(arguments,1,-2),k=0;k<f.length;k++)m[f[k].replace(/:|\./g,"")]=decodeURIComponent(h[k]);g(e[q],m,b,q)});return}}k(b,m)}m?b.onpopstate=n(t):"#"===q.charAt(0)&&(b.onhashchange=t);t();return t},link:function(b){b.dom.setAttribute("href",q+b.attrs.href);b.dom.onclick=function(b){b.preventDefault();b.redraw=!1;b=this.getAttribute("href");
|
||||
0===b.indexOf(q)&&(b=b.slice(q.length));k(b,void 0,void 0)}}}};w.route=function(b,e){function n(b){return b}var f=T(b),h,k,m,t,q,g={view:function(){return m(u(k,null,t,void 0,void 0,void 0))}},l=function(b,l,u){k="div";m=n;t=null;e(b,g);f.defineRoutes(u,function(e,f,g){var l="function"!==typeof e.view,p=n,r=h=function(n){r===h&&(h=null,k=null!=n?n:l?"div":e,m=p,t=f,q=g,b.redraw(!0))},u=function(){r()};l&&("function"===typeof e.render&&(p=e.render.bind(e)),"function"===typeof e.onmatch&&(u=e.onmatch));
|
||||
0===b.indexOf(q)&&(b=b.slice(q.length));k(b,void 0,void 0)}}}};w.route=function(b,e){function n(b){return b}var f=T(b),h,k,m,t,q,g={view:function(){return[m(u(k,null,t,void 0,void 0,void 0))]}},l=function(b,l,u){k="div";m=n;t=null;e(b,g);f.defineRoutes(u,function(e,f,g){var l="function"!==typeof e.view,p=n,r=h=function(n){r===h&&(h=null,k=null!=n?n:l?"div":e,m=p,t=f,q=g,b.redraw(!0))},u=function(){r()};l&&("function"===typeof e.render&&(p=e.render.bind(e)),"function"===typeof e.onmatch&&(u=e.onmatch));
|
||||
u.call(e,r,f,g)},function(){f.setPath(l,null,{replace:!0})})};l.link=f.link;l.prefix=f.setPrefix;l.set=f.setPath;l.get=function(){return q};return l}(window,w.mount);w.withAttr=function(b,e,n){return function(f){return e.call(n||this,b in f.currentTarget?f.currentTarget[b]:f.currentTarget.getAttribute(b))}};w.prop=M;w.render=N.render;w.redraw=I.publish;w.request=H.request;w.jsonp=H.jsonp;w.parseQueryString=J;w.buildQueryString=E;w.version="1.0.0";"undefined"!==typeof module?module.exports=w:window.m=
|
||||
w};
|
||||
Loading…
Add table
Add a link
Reference in a new issue