From 35c7b841f41398ab270d9316e41e841ec6bfd9c0 Mon Sep 17 00:00:00 2001
From: chengkun <chengkun@ishangstudy.com>
Date: Mon, 15 Sep 2025 15:00:41 +0800
Subject: [PATCH] 提交

---
 app/admin/view/blog/index.html |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/app/admin/view/blog/index.html b/app/admin/view/blog/index.html
index 67c054f..191970d 100644
--- a/app/admin/view/blog/index.html
+++ b/app/admin/view/blog/index.html
@@ -25,30 +25,34 @@
                     <el-card>
                         <template #header>
                             <div class="card-header">
-                                <span>文章列表</span>
+                                <span>文章列表({{listCount}})</span>
                                 &emsp;
                                 <el-link href="/admin/blog/add.html" type="primary" class="header_add_btn" icon="CirclePlusFilled" :underline="false">添加</el-link>
                             </div>
                         </template>
-                        <el-table :data="list" :tree-props="{children: 'children'}" row-key="id" default-expand-all border style="width: 100%" ref="tableRef">
+                        <el-table :data="blogList" :tree-props="{children: 'children'}" row-key="id" default-expand-all border style="width: 100%" ref="tableRef">
                             <el-table-column label="名称" prop="title"></el-table-column>
                             <!-- <el-table-column label="菜单索引" prop="menu_index"></el-table-column> -->
                             <el-table-column label="添加时间" prop="create_time" width="150">
                                 <template #default="scope">
-                                   {{formatDate(scope.row['create_time'])}}
+                                    {{formatDate(scope.row['create_time'])}}
                                 </template>
                             </el-table-column>
                             <el-table-column label="状态" width="150" align="center">
                                 <template #default="scope">
-                                    <el-switch v-model="scope.row.show_menu" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ccc" :active-value="1" :inactive-value="0" inline-prompt active-text="发布" inactive-text="下架" @change="updateShowMenu(scope.row)" />
+                                    <el-switch v-model="scope.row.status" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ccc" :active-value="1" :inactive-value="0" inline-prompt active-text="发布" inactive-text="未发布" @change="changeBlogStatus(scope.row.id)" />
                                 </template>
                             </el-table-column>
                             <el-table-column label="操作选项" fixed="right" width="150" :align="alignValue(200)">
                                 <template #default="scope">
-                                    <el-button icon="edit" type="primary" @click="Edit(scope.row)"></el-button>
+                                    <el-button icon="edit" type="primary" @click="editBlog(scope.row.id)" circle></el-button>
+                                    <el-button icon="Delete" type="danger" @click="deleteBlog(scope.row.id)" circle></el-button>
                                 </template>
                             </el-table-column>
                         </el-table>
+                        <div style="text-align: right;margin-top: 15px">
+                            <el-pagination background @current-change="getBlogList" layout="prev, pager, next" :page-size="searchForm.limit" hide-on-single-page="true" :total="listCount"></el-pagination>
+                        </div>
                     </el-card>
                 </el-main>
                 <el-footer></el-footer>

--
Gitblit v1.9.0