Lines 1-11
Link Here
|
1 |
<template> |
1 |
<template> |
2 |
<a v-if="type === 'add'" @click="click_add" :class="class" |
2 |
<a v-if="type === 'add'" @click="$emit('addResource')" :class="class" |
3 |
><font-awesome-icon icon="plus" /> {{ title }}</a |
3 |
><font-awesome-icon icon="plus" /> {{ title }}</a |
4 |
> |
4 |
> |
5 |
<a v-if="type === 'delete'" @click="click_delete" :class="class" |
5 |
<a v-if="type === 'delete'" @click="$emit('deleteResource')" :class="class" |
6 |
><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a |
6 |
><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a |
7 |
> |
7 |
> |
8 |
<a v-if="type === 'edit'" @click="click_edit" :class="class" |
8 |
<a v-if="type === 'edit'" @click="$emit('editResource')" :class="class" |
9 |
><font-awesome-icon icon="pencil" /> {{ $__("Edit") }}</a |
9 |
><font-awesome-icon icon="pencil" /> {{ $__("Edit") }}</a |
10 |
> |
10 |
> |
11 |
</template> |
11 |
</template> |
Lines 32-49
export default {
Link Here
|
32 |
type: String, |
32 |
type: String, |
33 |
}, |
33 |
}, |
34 |
}, |
34 |
}, |
35 |
methods: { |
35 |
emits: ["addResource", "deleteResource", "editResource"], |
36 |
click_add() { |
|
|
37 |
this.$emit("add-clicked") |
38 |
}, |
39 |
click_delete() { |
40 |
this.$emit("delete-clicked") |
41 |
}, |
42 |
click_edit() { |
43 |
this.$emit("edit-clicked") |
44 |
}, |
45 |
}, |
46 |
emits: ["add-clicked", "delete-clicked", "edit-clicked"], |
47 |
name: "Toolbar", |
36 |
name: "Toolbar", |
48 |
} |
37 |
} |
49 |
</script> |
38 |
</script> |
50 |
- |
|
|