ams
ams copied to clipboard
`actions`改名为`methods`
目前的配置:
const config = {
type: 'list',
actions: {
init: function() {
...
}
},
on: {
change: function() { // 透传element的Events事件
...
},
click: function() { // 原生事件
...
}
}
}
优化方案:
actions
改名为methods
,和vue一致,减少概念隔阂(this.callAction
方法废弃,跨区块方法直接使用this.$emitEvent('xxx.xxx')
,调用顺序是先触发events,没有再去触发methods)
const config = {
type: 'list',
methods: {
init: function() {
...
}
},
on: {
change: function() { // 透传element的Events事件
...
},
click: function() { // 原生事件
...
}
}
}