Vue+node.js Study Notes

Source: Internet
Author: User

First, build the Vue development environment

vue Init webpack newmall

cnpm Install

npm Run Dev

Second, test static page

Copy the CSS in the static page

SRC directory to create Views folder, specifically placed pages.

First create a Goodslist page

Copy the static HTML in

Introducing CSS

Change route

At this point, the 8080 Port home page can display the product list

Attention:

When you introduce a path, you can

import goodslist from ' @/views/goodslist.vue '

@ defined location in build/webpack.base.conf

Here the picture resources in the root directory of static, and the location of the CSS static resources are not the same

Third, split components

Create a Compontents folder to place components specifically

Cut the header portion of the Goodslist page into the Navheader.vue file under Compontents

At this point the Goodslist page needs

1. Introduction of Navheader Components

2. Registering components

3. Using components

Iv. about Slots

A value in the Breadcrumb navigator is not fixed, so use the slot

Navbread page

Goodslist page

In this way, the goods is inserted into the specified slot.

Vue+node.js Study Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.