paraview-lite
Version:
Lite ParaView client for Scientific Visualization on the Web
34 lines (32 loc) • 611 B
JavaScript
// ----------------------------------------------------------------------------
// Component
// ----------------------------------------------------------------------------
export default {
name: 'CollapsableItem',
props: {
icon: {
type: String,
default: 'build',
},
small: {
type: Boolean,
default: false,
},
},
data() {
return {
collapsed: this.small,
};
},
methods: {
toggle() {
this.collapsed = !this.collapsed;
},
open() {
this.collapsed = false;
},
collapse() {
this.collapsed = true;
},
},
};