We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<<返回目录
Model 是SPA类应用程序的核心,包括数据的获取、转换、验证、访问控制等。Model 也提供了一组基本的管理变化的功能。
Model
下面的示例演示了如何定义一个模型,包括自定义方法、设置属性、以及触发该属性变化的事件。
Chassis.Model.define( 'sidebar', { promptColor: function() { var cssColor = prompt( '请输入一个CSS颜色值:' ); this.set({ color: cssColor }); } } ); var sidebar = Chassis.Model.create( 'sidebar' ); sidebar.bind('change:color', function(model, color) { $('#sidebar').css({background: color}); }); sidebar.set({color: 'white'}); sidebar.promptColor();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
<<返回目录
Model
是SPA类应用程序的核心,包括数据的获取、转换、验证、访问控制等。Model
也提供了一组基本的管理变化的功能。下面的示例演示了如何定义一个模型,包括自定义方法、设置属性、以及触发该属性变化的事件。
<<返回目录
The text was updated successfully, but these errors were encountered: