• 图书管理前端页面


    1.图书管理页面
    1.1 http/apis.js 添加后端请求路由
    import { get, post, put, del } from './index'
    // 书籍管理接口
    export const getBookList = (params, headers) => get("/books/book/", params,
    headers)
    export const addBook = (params, headers) => post("/books/book/", params, headers)
    export const editBook = (params, headers) => put("/books/book/", params, headers)
    export const delBook = (params, headers) => del("/books/book/", params, headers)
    1.2 router/index.js 添加路由

    import Books from '@/views/books/Books'
    export default new Router({
    routes: [
    { path: '/', name: 'Books', component: Books }, // 图书增删改查
    案例
    ]
    })
    1.3 srcviewsooksBooks.vue 父组件

    1.4 srccomponentsBookEdit.vue 子组件 1.5 src/mian.js 引入ElementUI

    // The Vue build version to load with the import command
    // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
    import Vue from 'vue'
    import App from './App'
    import router from './router'
    Vue.config.productionTip = false
    // 使用 elementui
    // npm i element-ui -S 安装到当前项目
    import ElementUI from 'element-ui'
    import 'element-ui/lib/theme-chalk/index.css'
    Vue.use(ElementUI)
    /* eslint-disable no-new */
    new Vue({
    el: '#app',
    router,
    components: { App },
    template: ''
    })

  • 相关阅读:
    python 【第一篇】初识python
    python 【目录】
    python 爬虫必知必会
    MySQL测试代码
    MySQL学习笔记
    pycharm社区版无database 解决方法
    windows python flask上传文件出现IOError: [Errno 13] Permission denied: 'E:\git\test\static\uploads'的解决方法
    ubuntu下python flask环境搭建
    windows下的python flask环境搭建
    Mockito (十四)
  • 原文地址:https://www.cnblogs.com/lll11115/p/13898726.html
Copyright © 2020-2023  润新知