From b1ca3ee4b921844426a04485ad34e8a16f19388f Mon Sep 17 00:00:00 2001 From: volleyball26 Date: Mon, 25 Jan 2021 15:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=20vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/tags.js | 35 +++ src/components/common/Sidebar.vue | 30 +-- src/components/page/BaseForm.vue | 350 +++++++++++++++++++----------- 3 files changed, 261 insertions(+), 154 deletions(-) create mode 100644 src/api/tags.js diff --git a/src/api/tags.js b/src/api/tags.js new file mode 100644 index 0000000..53becec --- /dev/null +++ b/src/api/tags.js @@ -0,0 +1,35 @@ +import request from '../utils/request'; + +export const gettagsData = query => { + return request({ + url: 'http://127.0.0.1:8000/tags', + method: 'get', + params: query + }); +}; + + +export const uptagsData = query => { + return request({ + url: 'http://127.0.0.1:8000/tags', + method: 'put', + params: query + }); +}; + +export const addTagrData = query => { + return request({ + url: 'http://127.0.0.1:8000/tags', + method: 'post', + params: query + }); +}; + + +export const deletetagsData = query => { + return request({ + url: 'http://127.0.0.1:8000/tags', + method: 'delete', + params: query + }); +}; \ No newline at end of file diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index cdf6b2c..05d4364 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -72,33 +72,9 @@ export default { title: '文件上传' }, { - icon: 'el-icon-lx-calendar', - index: '3', - title: '表单相关', - subs: [ - { - index: 'form', - title: '基本表单' - }, - { - index: '3-2', - title: '三级菜单', - subs: [ - { - index: 'editor', - title: '富文本编辑器' - }, - { - index: 'markdown', - title: 'markdown编辑器' - } - ] - }, - { - index: 'upload', - title: '文件上传' - } - ] + icon: 'el-icon-lx-tag', + index: 'form', + title: '标签相关' }, { icon: 'el-icon-lx-emoji', diff --git a/src/components/page/BaseForm.vue b/src/components/page/BaseForm.vue index 9beb0dd..64a34d6 100644 --- a/src/components/page/BaseForm.vue +++ b/src/components/page/BaseForm.vue @@ -3,150 +3,246 @@
- 表单 + 标签相关 - 基本表单
+
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 表单提交 - 取消 - - +
+ + 搜索 +
+ 新增标签
+ +
+ + + + + + + + + + + + + +
+ + + + + + + + + + 取 消 + 确 定 + + + + + + + + + + + + + + + 取 消 + 确 定 + +
\ No newline at end of file + + +