[+] Use dynamic vue rendering
This commit is contained in:
+8
-1
@@ -1,9 +1,16 @@
|
||||
import {createApp} from 'vue'
|
||||
import {createApp, h} from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './scripts/router'
|
||||
import {i18n} from "@/messages";
|
||||
import '@fortawesome/fontawesome-free/css/all.min.css'
|
||||
|
||||
const app = createApp(App).use(router).use(i18n)
|
||||
.component('Dynamic', {
|
||||
props: ['template'],
|
||||
render() {
|
||||
return h({template: this.template})
|
||||
}
|
||||
})
|
||||
|
||||
// app.config.performance = true
|
||||
app.mount('#app')
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="About" class="markdown-content" v-html="html">
|
||||
|
||||
<div id="About" class="markdown-content">
|
||||
<Dynamic :template="html"></Dynamic>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
module.exports = {
|
||||
runtimeCompiler: true,
|
||||
devServer: {
|
||||
disableHostCheck: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user