24 lines
607 B
JavaScript
24 lines
607 B
JavaScript
import ngModule from '../module';
|
|
import Section from 'salix/components/section';
|
|
import './style.scss';
|
|
|
|
export default class Controller extends Section {
|
|
toggle() {
|
|
const monitor = this.element.querySelector('vn-horizontal');
|
|
const isHidden = monitor.classList.contains('hidden');
|
|
|
|
if (!isHidden)
|
|
monitor.classList.add('hidden');
|
|
else
|
|
monitor.classList.remove('hidden');
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnMonitorIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
require: {
|
|
main: '^vnMonitorIndex'
|
|
}
|
|
});
|