Script

The <script> tag contains the JavaScript code associated with the component. It should export the component definition object.

Here's an example of a <script> tag:

<script>
export default {
data () {
return {
movies: [
{ title: 'Star Wars' },
{ title: 'Blade Runner' },
],
}
},
}
</script>

In this example, the component will have a data hook returning an initial state with a movies array.

The <script> tag is optional if you don't need any options in the component options, which defaults to an empty object.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.140.5