General article address:

Vue. Js base will not? — This article is enough

Vue whole family barrel Webpack Git Axios Element- UI

7. Permission list

7.1 Displaying permission List Components through Routes

1, first create the power folder and write Rights. Vue initialization code structure



Importing a file in a route:



By defining child routes in the child routing rules of the home route, components can be loaded as routes

7.2 Draw breadcrumb navigation and card view

Effect:



Breadcrumb navigation:



Card view:

7.3 Invoking an API to Obtain Permission List Data

API interface:



Define the date data, put a rightsLists



Define methods: request data, determine whether it is successful, and return data if it is successful



Now that we have the list, let’s render the list

7.4 UI structure of rendering Permission List

Stripe discoloration interlaced:

The el-tag needs to be registered in element.js,

Display as needed, using V-IF judgment.

7.5 Relationships among Roles, Rights, and Users