28 lines
616 B
JavaScript
28 lines
616 B
JavaScript
/**
|
|
* Bricks 递归组件逻辑
|
|
*/
|
|
Component({
|
|
properties: {
|
|
item: {
|
|
type: Object,
|
|
value: {}
|
|
}
|
|
},
|
|
methods: {
|
|
onEvent(e) {
|
|
const dataset = e.currentTarget.dataset
|
|
const { actiontype, target, methodname, url, script } = dataset
|
|
this.triggerEvent('bricksaction', { actiontype, target, methodname, url, script, event: e })
|
|
},
|
|
onInput(e) {
|
|
this.triggerEvent('inputchange', { value: e.detail.value, widget: this.data.item })
|
|
},
|
|
onCloseModal(e) {
|
|
this.triggerEvent('modalclose')
|
|
},
|
|
stopPropagation() {
|
|
// 阻止冒泡
|
|
}
|
|
}
|
|
})
|