mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-24 01:40:43 +08:00
17 lines
574 B
JavaScript
17 lines
574 B
JavaScript
import {Component} from "./component";
|
|
|
|
export class SettingHomepageControl extends Component {
|
|
|
|
setup() {
|
|
this.typeControl = this.$refs.typeControl;
|
|
this.pagePickerContainer = this.$refs.pagePickerContainer;
|
|
|
|
this.typeControl.addEventListener('change', this.controlPagePickerVisibility.bind(this));
|
|
this.controlPagePickerVisibility();
|
|
}
|
|
|
|
controlPagePickerVisibility() {
|
|
const showPagePicker = this.typeControl.value === 'page';
|
|
this.pagePickerContainer.style.display = (showPagePicker ? 'block' : 'none');
|
|
}
|
|
} |