mirror of https://github.com/apache/cloudstack.git
Add an event when the button is clicked from the parent component
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
fea280e98f
commit
ef8d5ce19c
|
|
@ -405,6 +405,10 @@ export default {
|
|||
eventBus.$on('async-job-complete', () => {
|
||||
this.fetchData()
|
||||
})
|
||||
eventBus.$on('exec-action', (action, isGroupAction) => {
|
||||
console.log(action, isGroupAction)
|
||||
this.execAction(action, isGroupAction)
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
if (this.device === 'desktop') {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@
|
|||
:actions="actions"
|
||||
:selectedRowKeys="selectedRowKeys"
|
||||
:dataView="true"
|
||||
:resource="resource"/>
|
||||
:resource="resource"
|
||||
@exec-action="(action) => execAction(action, action.groupAction && !dataView)" />
|
||||
</div>
|
||||
<div slot="resource">
|
||||
<resource-view
|
||||
|
|
@ -40,10 +41,11 @@
|
|||
|
||||
<script>
|
||||
import { api } from '@api'
|
||||
import { mixinDevice } from '@/utils/mixin.js'
|
||||
import eventBus from '@/config/eventBus'
|
||||
import AutogenView from '@/views/AutogenView.vue'
|
||||
import ResourceView from '@/components/view/ResourceView'
|
||||
import ActionButton from '@/components/view/ActionButton'
|
||||
import { mixinDevice } from '@/utils/mixin.js'
|
||||
|
||||
export default {
|
||||
name: 'PublicIpResource',
|
||||
|
|
@ -158,6 +160,9 @@ export default {
|
|||
},
|
||||
toggleLoading () {
|
||||
this.loading = !this.loading
|
||||
},
|
||||
execAction (action, isGroupAction) {
|
||||
eventBus.$emit('exec-action', action, isGroupAction)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue