mirror of https://gitee.com/karson/fastadmin.git
JS模块支持空操作重定向到_empty
parent
16e02f643f
commit
842cfbedeb
|
|
@ -146,7 +146,13 @@ require(['jquery', 'bootstrap'], function ($, undefined) {
|
|||
//加载相应模块
|
||||
if (Config.jsname) {
|
||||
require([Config.jsname], function (Controller) {
|
||||
Controller[Config.actionname] != undefined && Controller[Config.actionname]();
|
||||
if (Controller.hasOwnProperty(Config.actionname)) {
|
||||
Controller[Config.actionname]();
|
||||
} else {
|
||||
if (Controller.hasOwnProperty("_empty")) {
|
||||
Controller._empty();
|
||||
}
|
||||
}
|
||||
}, function (e) {
|
||||
console.error(e);
|
||||
// 这里可捕获模块加载的错误
|
||||
|
|
|
|||
Loading…
Reference in New Issue