mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Converted breadcrumb-listing to new component system
This commit is contained in:
@ -1,17 +1,14 @@
|
||||
|
||||
|
||||
class BreadcrumbListing {
|
||||
|
||||
constructor(elem) {
|
||||
this.elem = elem;
|
||||
this.searchInput = elem.querySelector('input');
|
||||
this.loadingElem = elem.querySelector('.loading-container');
|
||||
this.entityListElem = elem.querySelector('.breadcrumb-listing-entity-list');
|
||||
setup() {
|
||||
this.elem = this.$el;
|
||||
this.searchInput = this.$refs.searchInput;
|
||||
this.loadingElem = this.$refs.loading;
|
||||
this.entityListElem = this.$refs.entityList;
|
||||
|
||||
// this.loadingElem.style.display = 'none';
|
||||
const entityDescriptor = elem.getAttribute('breadcrumb-listing').split(':');
|
||||
this.entityType = entityDescriptor[0];
|
||||
this.entityId = Number(entityDescriptor[1]);
|
||||
this.entityType = this.$opts.entityType;
|
||||
this.entityId = Number(this.$opts.entityId);
|
||||
|
||||
this.elem.addEventListener('show', this.onShow.bind(this));
|
||||
this.searchInput.addEventListener('input', this.onSearch.bind(this));
|
||||
|
Reference in New Issue
Block a user