// views/index.js
import Login from './Login.vue'
import NotFound from './404.vue'
export default {Login, NotFound}
// routes.js
import Vue from 'vue';
import Router from 'vue-router';
import {Login, NotFound} from './views'
import Login from './Login.vue'
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
})
]
<template> // modal template
<div v-if="isActive">
<slot></slot>
</div>
</template>
<script>
export default {
data: {
isActive: false
},
methods: {
open() {
this.isActive = true
},
close() {
this.isActive = false
}
}
</script>
<modal :show="show" @close="show=false">
<custom-input></custom-input>
</modal>
<button @click="show=true">
<modal ref="myModal">
<custom-input></custom-input>
</modal>
<button @click="$refs.myModal.open()">
import * as views from './views'
но тоже не самое красивое решение.