//利用require处理 面向对象的方法
//需要引入define.js和jq.js
//文件A
// define(function(){
// let man =function(con){
// let that=this;
// config={
// name:'',
// age:'',
// }
// config=$.extent({},config.con);
// that.init(config);
// }
// man.prototype={
// init:function(config){
// this.name=config.name;
// this.age=config.age;
// }
// }
// return man;
// })
//引用的js文件
// require(['component/test'],function(man){
// let first_config={
// name:"yellow",
// age:"22",
// }
// })
// let firstMan=new man(first_config);
利用define处理面向对象的方法
最新推荐文章于 2022-08-05 14:51:16 发布