mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
36 lines
595 B
Vue
36 lines
595 B
Vue
<template>
|
|
<div>
|
|
<modal name="foo" :width="300" :height="140">
|
|
Woot
|
|
</modal>
|
|
<p>Hi from <b>{{ name }}</b>.</p>
|
|
<button @click="$modal.show('foo')">
|
|
Open modal
|
|
</button>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
asyncData ({ req }) {
|
|
return {
|
|
name: req ? 'server' : 'client'
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style>
|
|
body {
|
|
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
color: #2c3e50;
|
|
padding: 50px;
|
|
}
|
|
|
|
.v--modal {
|
|
text-align: center;
|
|
padding: 50px;
|
|
}
|
|
</style>
|