mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
Some improvements for "Modal" example (#2754)
* Rename CSS file to match with other examples * Merge script tags
This commit is contained in:
parent
60ec66be68
commit
8e34f455ad
@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Vue.js Modal Example</title>
|
||||
<script src="../../dist/vue.js"></script>
|
||||
<link rel="stylesheet" href="modal.css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<!-- template for the modal component -->
|
||||
@ -38,13 +38,6 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// register modal component
|
||||
Vue.component('modal', {
|
||||
template: '#modal-template'
|
||||
})
|
||||
</script>
|
||||
|
||||
<!-- app -->
|
||||
<div id="app">
|
||||
<button id="show-modal" @click="showModal = true">Show Modal</button>
|
||||
@ -59,6 +52,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// register modal component
|
||||
Vue.component('modal', {
|
||||
template: '#modal-template'
|
||||
})
|
||||
|
||||
// start app
|
||||
new Vue({
|
||||
el: '#app',
|
||||
|
@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
/*
|
||||
* the following styles are auto-applied to elements with
|
||||
* The following styles are auto-applied to elements with
|
||||
* transition="modal" when their visibility is toggled
|
||||
* by Vue.js.
|
||||
*
|
Loading…
Reference in New Issue
Block a user