From 3c71cc74e6dd5f1015329c64e11e8ec1cd7a97c1 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Wed, 31 Aug 2022 18:11:16 +0800 Subject: [PATCH] 新增编辑页 日志列表接口 --- src/components/swichLabel/edit.vue | 58 ++++++++++++++++++++++++++++++---------------------------- 1 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/components/swichLabel/edit.vue b/src/components/swichLabel/edit.vue index fe13332..7a6ab8a 100644 --- a/src/components/swichLabel/edit.vue +++ b/src/components/swichLabel/edit.vue @@ -1,7 +1,6 @@ <template> <div class="blog-main"> - <MyOwO v-if="1==1"></MyOwO> - <div v-else class="edit-main fade"> + <div class="edit-main fade"> <div class="edit-info"> <div class="edit-info-body blog-container "> 配置项 @@ -21,8 +20,7 @@ <div class="edit-article-value"> <a-select v-model="typeId" :allowClear="true" mode="default" placeholder="日志分类" :getPopupContainer="getCalendarContainer()" style="width: 100%;"> - <a-select-option v-for="(item,index) in this.blogArticleType" :key="index" - :value="item.id"> + <a-select-option v-for="(item,index) in blogArticleType" :key="index" :value="item.id"> {{ item.typeName }} </a-select-option> </a-select> @@ -256,30 +254,23 @@ <div class="edit-tool blog-container"> <div class="edit-tool-item" style="gap: 0px;"> - <div style="display: flex;width: 350px;"> + <div style="display: flex;width: 290px;"> <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 5px;"> <span>日志选取:</span> </div> - <a-select v-model="articleTypeId" mode="default" placeholder="" - :getPopupContainer="getCalendarContainer()" style="width: 100%;"> - <a-select-option value="1"> - 十里平湖霜满天 - </a-select-option> - <a-select-option value="2"> - 寸寸青丝愁华年 - </a-select-option> - <a-select-option value="3"> - 对月形单望相护 - </a-select-option> - <a-select-option value="4"> - 只羡鸳鸯不羡仙 - </a-select-option> - <a-select-option value="5"> - 江水春沉沉 - </a-select-option> - <a-select-option value="9"> - 上有双竹林 - </a-select-option> + <a-select v-model="articleTypeId" placeholder="键入搜索.." :showSearch="true" + :getPopupContainer="getCalendarContainer()"> + <!-- <a-select-option v-for="(item,index) in blogArticleTitleList" :key="index" + :value="item.id"> + {{ item.title }} + </a-select-option> --> + <template #dropdownRender="{ menuNode: menu }"> + {{menu}} + <a-divider style="margin: 4px 0" /> + <div style="padding: 4px 8px; cursor: pointer" @mousedown="e => e.preventDefault()"> + <a-icon type="down"></a-icon> 更多 + </div> + </template> </a-select> <a-button style="margin-left: 10px;"> <a-icon type="reload"></a-icon> @@ -293,12 +284,12 @@ <span class="myTip">(触发前提示手动保存)</span> </div> - <div style="display: flex;width: 350px;"> + <div style="display: flex;"> <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 5px"> <span>草稿列表:</span> </div> - <a-select v-model="articleTypeId" mode="default" placeholder="" - :getPopupContainer="getCalendarContainer()" style="width: 100%;"> + <a-select mode="default" placeholder="" :getPopupContainer="getCalendarContainer()" + style="width: 100%;"> <a-select-option value="1"> 十里平湖霜满天 </a-select-option> @@ -397,6 +388,10 @@ queryBlogArticleType } from '../../api/blogArticleType.js' + import { + queryBlogArticlePrivateList + } from '../../api/blogArticle.js' + import MyOwO from '../common/MyOwO.vue' import VueMarkdown from 'vue-markdown' @@ -415,6 +410,12 @@ queryBlogArticleType({}).then((res) => { this.blogArticleType = res.data; }) + + queryBlogArticlePrivateList({ + pageSize: 10 + }).then((res) => { + this.blogArticleTitleList = res.data.records; + }) }, data() { return { @@ -422,6 +423,7 @@ articleTypeId: "", typeId: "", blogArticleType: [], + blogArticleTitleList: [], } }, methods: { -- Gitblit v1.9.1