Migrate media thread views to composition API
This commit is contained in:
parent
77eebafb79
commit
44578048aa
22 changed files with 1144 additions and 598 deletions
24
src/main.js
24
src/main.js
|
|
@ -41,27 +41,6 @@ app.use(analytics);
|
|||
app.use(VueClipboard);
|
||||
app.use(audioPlayer);
|
||||
|
||||
// Add bubble functionality to custom events.
|
||||
// From here: https://stackoverflow.com/questions/41993508/vuejs-bubbling-custom-events
|
||||
app.use((instance) => {
|
||||
instance.$bubble = function $bubble(eventName, ...args) {
|
||||
// Emit the event on all parent components
|
||||
let component = this;
|
||||
let arg = args.at(0);
|
||||
let stop = false;
|
||||
if (arg) {
|
||||
// Add a "stopPropagation" function so that we can do v-on:<eventname>.stop="..."
|
||||
arg.stopPropagation = () => {
|
||||
stop = true;
|
||||
}
|
||||
}
|
||||
do {
|
||||
component.$emit(eventName, ... args);
|
||||
component = component.$parent;
|
||||
} while (!stop && component);
|
||||
};
|
||||
});
|
||||
|
||||
// Register a global custom directive called `v-blur` that prevents focus
|
||||
app.directive('blur', {
|
||||
mounted: function (el) {
|
||||
|
|
@ -182,6 +161,9 @@ app.use(i18n);
|
|||
app.$i18n = i18n;
|
||||
app.config.globalProperties.$i18n = i18n;
|
||||
|
||||
app.provide("globalT", i18n.global.t);
|
||||
app.provide("globalSanitize", app.config.globalProperties.$sanitize);
|
||||
|
||||
app.use(matrix, { store: store, i18n: i18n });
|
||||
|
||||
// Set $matrix inside data store
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue