From 576e0ddc5a10bbb78d7bcfb9230f42ef029e6b73 Mon Sep 17 00:00:00 2001 From: sunfree <17315650350@163.com> Date: Sun, 30 Jun 2024 22:46:46 +0800 Subject: [PATCH] add new --- src/stores/index.ts | 25 ++- .../classticmanage/ClassticManageView.vue | 175 ++++++++++++------ 2 files changed, 126 insertions(+), 74 deletions(-) diff --git a/src/stores/index.ts b/src/stores/index.ts index eb60ff0..4b2fba0 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -2,20 +2,10 @@ import { reactive, ref } from 'vue' import { defineStore } from 'pinia' import { get } from "@/tools/request" import dayjs from 'dayjs'; -import type { blogInterface, classticFormInterface } from '@/api/admin'; -import type { classticSearchInterface } from '@/api/admin/classtic'; +import type { blogInterface } from '@/api/admin'; export const classticStore = defineStore("classtic", () => { - const searchList = reactive({ - title: "" - }) - - const formList = reactive({ - header: "", - text: "", - descr: "" - }) - const formControl = reactive({ + const addControl = reactive({ open: false, title: "", mode: "", @@ -23,9 +13,16 @@ export const classticStore = defineStore("classtic", () => { }) const delControl = reactive({ - open: false + open: false, + ids: "" + }) + + const editControl = reactive({ + open: false, + ids: "", + title:"" }) - return { formControl, delControl } + return { addControl, delControl,editControl } }) diff --git a/src/views/admin/classticmanage/ClassticManageView.vue b/src/views/admin/classticmanage/ClassticManageView.vue index cdb682a..94f77ff 100644 --- a/src/views/admin/classticmanage/ClassticManageView.vue +++ b/src/views/admin/classticmanage/ClassticManageView.vue @@ -6,22 +6,18 @@ 查询 - 新增 - - 新增 + + - - + + - - + + - - + + @@ -39,8 +35,25 @@

确认删除吗?

- 编辑 + 编辑 + + + + + + + + + + + + +
@@ -50,21 +63,46 @@