Here we will create the <script> section of the single file component:
- In the src folder, open the App.vue file and clear its contents.
- Import the layout component:
import Layout from './components/Layout.vue';
- Then, we will export a default JavaScript object, with the name property defined as App, define the components property with the imported component, and finally define the data property as a singleton function returning a JavaScript object. In the data property, create the following:
- A labelCol property defined as a JavaScript object, with the span property and the value 4.
- A wrapperCol property defined as a JavaScript object, with the span property and the value 14.
- A form property defined as a JavaScript object, with the name, username, password, email, phone, cellphone, address, zipcode, and country properties all defined as empty strings:
export default {
name: 'App',
components: {
Layout,
...