dataease-dm/frontend/src/components/canvas/utils/events.js

40 lines
478 B
JavaScript
Raw Normal View History

2021-03-25 19:16:32 +08:00
// 编辑器自定义事件
const events = {
2021-06-24 13:54:58 +08:00
redirect(url) {
if (url) {
window.location.href = url
}
},
2021-03-25 19:16:32 +08:00
2021-06-24 13:54:58 +08:00
alert(msg) {
if (msg) {
alert(msg)
}
}
2021-03-25 19:16:32 +08:00
}
const mixins = {
2021-06-24 13:54:58 +08:00
methods: events
2021-03-25 19:16:32 +08:00
}
const eventList = [
2021-06-24 13:54:58 +08:00
{
key: 'redirect',
label: '跳转事件',
event: events.redirect,
param: ''
},
{
key: 'alert',
label: 'alert 事件',
event: events.alert,
param: ''
}
2021-03-25 19:16:32 +08:00
]
export {
2021-06-24 13:54:58 +08:00
mixins,
events,
eventList
}