标签:stand -o index vue hal params keyword 组件 http
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)
import Books from ‘@/views/books/Books‘
export default new Router({
routes: [
{ path: ‘/‘, name: ‘Books‘, component: Books }, // 图书增删改查
案例
]
})
<template>
<div>
<h1>图书管理系统</h1>
<div style="margin: 30px;">
<button @click="addNew">新增图书</button>
<BookEdit
v-show=‘dialogVisible‘
:visible.sync=‘dialogVisible‘
:data=‘editData‘