搜索功能完善

This commit is contained in:
2023-07-06 13:58:57 +08:00
parent d8e6771cfe
commit 9017864f82
13 changed files with 736 additions and 83 deletions

View File

@@ -15,19 +15,52 @@
<el-menu-item class="menu-item" index="/paper"><i class="el-icon-s-management" style="color: #5b6bc9"></i> </el-menu-item>
</el-menu>
<SearchInput class="HeaderInput"></SearchInput>
<el-button v-if="this.$route.path!=='/paper'" class="HeaderSubmitBtn" type="success" round icon="el-icon-thumb">提交项目</el-button>
<el-button v-if="this.$route.path ==='/paper'" class="HeaderSubmitBtn" type="primary" round icon="el-icon-edit">发布文章</el-button>
<el-button v-if="this.$route.path!=='/paper'" class="HeaderSubmitBtn" type="success" round icon="el-icon-thumb">提交项目</el-button>
<el-button @click="openPublishDialog" v-if="this.$route.path ==='/paper'" class="HeaderSubmitBtn" type="primary" round icon="el-icon-edit">发布文章</el-button>
<el-dialog
:visible.sync="openPublishArticle"
width="55vw"
append-to-body
:close-on-click-modal="false"
>
<div slot="title" class="dialog-title" style="display: flex;flex-direction: row;flex-wrap: nowrap;justify-content: space-between;align-items: center">
<span class="title-text" style="font-size: 18px;font-weight: bold;">发布文章</span>
</div>
<div>
<PublishArticle></PublishArticle>
</div>
</el-dialog>
</div>
</template>
<script>
import SearchInput from "@/components/Home/SearchInput.vue";
import PublishArticle from "@/components/Paper/PublishArticle.vue";
import Vue from "vue";
export default {
name: "HeaderComponent",
components: {SearchInput},
components: {PublishArticle, SearchInput},
data() {
return {}
return {
openPublishArticle:false,
}
},
methods:{
openPublishDialog(){
if(this.$cookie.get('username')){
this.openPublishArticle=true;
}else{
Vue.prototype.$notify.error({
title: '错误',
message: "请先登录!",
offset: 50
});
}
},
}
}
</script>