vue 3
first release
vue 3
is the new default
vuetify 3
offered finally a
stabel release
220 commits later
branch is running again
first commit
consumer credit funnel up to date again
3 Party update
Test
Deploy
(aka "the migration build") is a build of Vue 3 that provides configurable Vue 2 compatible behavior.
export function createSvgMap() {
function getSvgNameFromPath(path) {
const pathSplit = path.split("/"),
fileName = pathSplit[pathSplit.length - 1] || "",
svgName = fileName.replace(".svg", "");
return svgName;
}
const modules = import.meta.glob("@/assets/**/*.svg", {
import: "default",
eager: true
}),
svgMap = new Map();
Object.keys(modules).forEach((path) => {
const svgName = getSvgNameFromPath(path);
svgMap.set(svgName, modules[path]);
});
return svgMap;
}
<template>
<component :is="getSvg" :class="className" />
</template>
import { createSvgMap } from "@/js/svgMap.js";
import { h } from "vue";
export default {
props: {
src: {
type: String,
required: true,
validator(value) {
return value.match(/.+\/.+\.svg/g);
}
},
className: {
type: String,
default: ""
}
},
computed: {
name() {
return this.src.match(/.+\/(.+)\.svg/)[1];
},
getSvg() {
const svg = createSvgMap().get(this.name);
return svg && h(svg);
}
}
};
import { createApp } from "vue";
import App from "@/App.vue";
import { registerComponents } from "@/js/register/components.js";
const app = createApp(App);
registerComponents(app);
app.mount("#app");
import InlineSvg from "@/components/common/InlineSvg.vue";
export function registerComponents(app) {
app.component("InlineSvg", InlineSvg);
}
<inline-svg :src="'@/assets/misc/download-document.svg'" class="svgDownload ml-n5 mr-6" />
bus.$emit("page-loading", true);
becomes
this.emitter.emit("page-loading", true);
import mitt from "mitt";
const emitter = mitt();
export function registerGlobalProperties(app) {
app.config.globalProperties.emitter = emitter;
}
export default {
emits: ["process"],
methods: {
onSubmit() {
this.$emit("process");
}
}
};