So I come from a React background and I was wondering how I could mimic this line: var modal = <Login/>
Here's what I have so far, but the output of the variable is a string instead:
<template src="./App.html"></template>
<script>
import 'jquery'
import 'uikit'
import 'uikit/dist/css/uikit.min.css'
import Login from '@/Login.vue'
import Register from '@/Register.vue'
export default {
name: 'app',
components: {
"Login": Login,
"Register": Register
},
data: function () {
return {
message: "first",
modal: {
body: "test",
title: "body"
}
}
},
methods: {
modal_open: function(type) {
if (type === "login")
{
this.modal = {
body: Login,
title: "login"
}
}
else
{
this.modal = {
body: Register,
title: "Register"
}
}
},
}
}
</script>