20200215 - Cms front-end development summary

Here Insert Picture Description
The project directory

package.json
record all project dependencies and script commands
pom file a bit like the maven

webpack.base.conf.js
WebPACK profile for operation of WebPACK

main.js
is the entrance to the project, loaded with many third-party components

On page routing
Here Insert Picture Description
routing small projects

The final will be integrated into the base / router

import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
// 定义路由配置
let routes = []
let concat = (router) => {
  routes = routes.concat(router)
}
// // 导入路由规则
import HomeRouter from '@/module/home/router'
import CmsRouter from '@/module/cms/router'
// 合并路由规则
concat(HomeRouter)
concat(CmsRouter)
export default routes;

About element-ui
to find documents official website

Cross-domain requests
using proxyTable
use proxy mode, a proxy middleware

Paging query

 @current-change="changePage"

This function is to be performed at the time of your conversion page

 changePage:function (page) {
        alert(page);
        this.params.page = page;
        this.query()
      }

Every time conversion page, the update page numbers, and then query query

Here Insert Picture Description

Published 735 original articles · won praise 42 · views 70000 +

Guess you like

Origin blog.csdn.net/qq_36344771/article/details/104331487