mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-06 10:44:33 +08:00
Updated another set of components
This commit is contained in:
17
resources/js/components/setting-homepage-control.js
Normal file
17
resources/js/components/setting-homepage-control.js
Normal file
@ -0,0 +1,17 @@
|
||||
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');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user