|
|
@ -6,7 +6,7 @@
|
|
|
|
window.require = function(path) {
|
|
|
|
window.require = function(path) {
|
|
|
|
var result = window;
|
|
|
|
var result = window;
|
|
|
|
if (path.indexOf('antd') < 0 ||
|
|
|
|
if (path.indexOf('antd') < 0 ||
|
|
|
|
path.indexOf('antd/components/') < 0) {
|
|
|
|
path.indexOf('antd/lib/') < 0) {
|
|
|
|
throw 'There should not have modules here 1.';
|
|
|
|
throw 'There should not have modules here 1.';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var namespaces = path.split('/');
|
|
|
|
var namespaces = path.split('/');
|
|
|
@ -14,7 +14,7 @@ window.require = function(path) {
|
|
|
|
if (i === namespaces.length - 1) {
|
|
|
|
if (i === namespaces.length - 1) {
|
|
|
|
key = capitalizeFirstLetter(key);
|
|
|
|
key = capitalizeFirstLetter(key);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (key !== 'components') {
|
|
|
|
if (key !== 'lib') {
|
|
|
|
if (result[key]) {
|
|
|
|
if (result[key]) {
|
|
|
|
result = result[key];
|
|
|
|
result = result[key];
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|