Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 define 方法中 require 参数名称依赖? #897

Closed
alvin2ye opened this issue Aug 17, 2013 · 1 comment
Closed

在 define 方法中 require 参数名称依赖? #897

alvin2ye opened this issue Aug 17, 2013 · 1 comment

Comments

@alvin2ye
Copy link

define(function(require, exports, module) {
    var BottomMenu = require('bottom-menu');
    var bm = new BottomMenu('#bottom-menu');
    bm.render();
});

这断,经过 Rails 的 compile 会变成

define(function(e){var t=e("bottom-menu"),n=new t("#bottom-menu");n.render()});

执行错误, 将 e 改回,又可以执行

@afc163
Copy link
Member

afc163 commented Aug 17, 2013

#259

@afc163 afc163 closed this as completed Aug 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants