【文件属性】:
文件名称:ampersand-mixins:扩展多个混合
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-15 16:39:06
JavaScript
&混合素
使用“与号”混合器将多个混合器混合到单个“与”号对象中。 &混合-合并所有&特定的属性,例如道具,事件,绑定等。
“&”号为其大多数模块提供了扩展功能。 它提供了自动道具合并等功能。
这种方法的缺点之一是它只允许扩展一个对象。 Ampersand.extend还允许混入,但不合并其任何属性。 这是“&”混合器为您提供帮助的地方。
安装
npm install ampersand-mixins
用法
mixins(目标,[mixins],选项)
var mixins = require ( 'ampersand-mixins' ) ;
var SomeView = View . extend ( {
props : {
foo : 'string' ,
} ,
events : {
'click button' : 'clickButton'
【文件预览】:
ampersand-mixins-master
----.gitignore(947B)
----ampersand-mixins.js(6KB)
----README.md(2KB)
----LICENSE(1KB)
----package.json(456B)