mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-02-01 15:23:03 +00:00
by welefen
This commit is contained in:
parent
3465c3b059
commit
e88df343b5
@ -12,6 +12,7 @@ global.think_require = function(name){
|
||||
if (_alias[name]) {
|
||||
var obj = require(_alias[name]);
|
||||
if (typeof obj == 'function') {
|
||||
//修正子类继承的方法获取到正确的文件名
|
||||
obj.prototype.__filename = _alias[name];
|
||||
};
|
||||
return obj;
|
||||
@ -28,6 +29,7 @@ global.think_require = function(name){
|
||||
if (result) {
|
||||
var obj = require(result);
|
||||
if (typeof obj == 'function') {
|
||||
//修正子类继承的方法获取到正确的文件名
|
||||
obj.prototype.__filename = result;
|
||||
};
|
||||
return obj;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user