Vue Attract: Sort/filterable table based on Vue

Initial commit implementing sortable and filterable tables for attract
using Vue.
This commit is contained in:
2019-02-12 09:08:37 +01:00
parent a5bae513e1
commit 2f5f73843d
29 changed files with 776 additions and 30 deletions

View File

@@ -0,0 +1,42 @@
const TEMPLATE =`
<div class="pillar-dropdown">
<div class="pillar-dropdown-button"
:class="buttonClasses"
@click="toggleShowMenu"
>
<slot name="button"/>
</div>
<div class="pillar-dropdown-menu"
v-show="showMenu"
v-click-outside="closeMenu"
>
<slot name="menu"/>
</div>
</div>
`;
let DropDown = Vue.component('pillar-dropdown', {
template: TEMPLATE,
data() {
return {
showMenu: false
}
},
computed: {
buttonClasses() {
return {'is-open': this.showMenu};
}
},
methods: {
toggleShowMenu(event) {
event.preventDefault();
event.stopPropagation();
this.showMenu = !this.showMenu;
},
closeMenu(event) {
this.showMenu = false;
}
},
});
export { DropDown }