这个是我的web.js
文件
define(function(){
const[init,share,update] = [Symbol(),...Symbol()];
class webShow {
[init](){
this[share]();
this[update]();
}
[share](){
}
[update](){
}
}
return webShow;
})
然后是主文件main.js
require(['web'], function (web){
var web = new web();
web[init]();
});
可是它报init is not defined
如果不用模块化管理上面是不会报错的,这是什么原因?
web.js
main.js