]>
BookStack Code Mirror - bookstack/blobdiff - resources/js/components/event-emit-select.js
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TS: Converted dom and keyboard nav services
[bookstack]
/
resources
/
js
/
components
/
event-emit-select.js
diff --git
a/resources/js/components/event-emit-select.js
b/resources/js/components/event-emit-select.js
index cf0215850d07c6f4acb2c98c2899cf373e87dba0..f722a25e71b75faebb784b0ddbc044af3099fd76 100644
(file)
--- a/
resources/js/components/event-emit-select.js
+++ b/
resources/js/components/event-emit-select.js
@@
-1,4
+1,5
@@
-import {onSelect} from "../services/dom";
+import {onSelect} from '../services/dom.ts';
+import {Component} from './component';
/**
* EventEmitSelect
/**
* EventEmitSelect
@@
-10,20
+11,16
@@
import {onSelect} from "../services/dom";
*
* All options will be set as the "detail" of the event with
* their values included.
*
* All options will be set as the "detail" of the event with
* their values included.
- *
- * @extends {Component}
*/
*/
-class EventEmitSelect {
+export class EventEmitSelect extends Component {
+
setup() {
this.container = this.$el;
this.name = this.$opts.name;
setup() {
this.container = this.$el;
this.name = this.$opts.name;
-
onSelect(this.$el, () => {
this.$emit(this.name, this.$opts);
});
}
}
onSelect(this.$el, () => {
this.$emit(this.name, this.$opts);
});
}
}
-
-export default EventEmitSelect;
\ No newline at end of file