mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
Jeecg-Boot 2.1.4 版本发布 | 重构较大,较多新功能
This commit is contained in:
@ -5,7 +5,8 @@
|
||||
<span class="action" @click="showClick">
|
||||
<a-icon type="search"></a-icon>
|
||||
</span>
|
||||
<span v-show="shows" class="borders">
|
||||
<!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
|
||||
<component :is="searchMenuComp" v-show="searchMenuVisible || isMobile()" class="borders" :visible="searchMenuVisible" title="搜索菜单" :footer="null" @cancel="searchMenuVisible=false">
|
||||
<a-select
|
||||
class="search-input"
|
||||
showSearch
|
||||
@ -13,16 +14,20 @@
|
||||
placeholder="搜索菜单"
|
||||
optionFilterProp="children"
|
||||
:filterOption="filterOption"
|
||||
:open="isMobile()?true:null"
|
||||
:getPopupContainer="(node) => node.parentNode"
|
||||
:style="isMobile()?{width: '100%',marginBottom:'50px'}:{}"
|
||||
@change="searchMethods"
|
||||
@blur="hiddenClick"
|
||||
>
|
||||
<a-select-option v-for="site in search " :value="site.id">{{site.meta.title}}</a-select-option>
|
||||
<a-select-option v-for="site in searchMenuOptions" :value="site.id">{{site.meta.title}}</a-select-option>
|
||||
</a-select>
|
||||
</span>
|
||||
<!-- update-end author:sunjianlei date:20191@20 for: 解决全局样式冲突的问题 -->
|
||||
</component>
|
||||
<!-- update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
|
||||
<!-- update-end author:sunjianlei date:20191220 for: 解决全局样式冲突的问题 -->
|
||||
<!-- update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
|
||||
<span class="action">
|
||||
<a class="logout_title" target="_blank" href="http://jeecg-boot.mydoc.io">
|
||||
<a class="logout_title" target="_blank" href="http://doc.jeecg.com">
|
||||
<a-icon type="question-circle-o"></a-icon>
|
||||
</a>
|
||||
</span>
|
||||
@ -95,9 +100,11 @@
|
||||
mixins: [mixinDevice],
|
||||
data(){
|
||||
return{
|
||||
//菜单搜索
|
||||
search:[],
|
||||
shows:false
|
||||
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
|
||||
searchMenuOptions:[],
|
||||
searchMenuComp: 'span',
|
||||
searchMenuVisible: false,
|
||||
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -116,10 +123,8 @@
|
||||
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
created() {
|
||||
let lists = []
|
||||
console.log("permissionMenuList: ",this.permissionMenuList)
|
||||
this.searchMenus(lists,this.permissionMenuList)
|
||||
this.search=[...lists]
|
||||
console.log(this.search)
|
||||
this.searchMenuOptions=[...lists]
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
@ -129,10 +134,21 @@
|
||||
})
|
||||
},
|
||||
/* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
watch: {
|
||||
// update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框
|
||||
device: {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.searchMenuVisible = false
|
||||
this.searchMenuComp = this.isMobile() ? 'a-modal' : 'span'
|
||||
},
|
||||
},
|
||||
// update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框
|
||||
},
|
||||
methods: {
|
||||
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
showClick(){
|
||||
this.shows = !this.shows
|
||||
showClick() {
|
||||
this.searchMenuVisible = true
|
||||
},
|
||||
hiddenClick(){
|
||||
this.shows = false
|
||||
@ -141,8 +157,8 @@
|
||||
...mapActions(["Logout"]),
|
||||
...mapGetters(["nickname", "avatar","userInfo"]),
|
||||
getAvatar(){
|
||||
console.log('url = '+ window._CONFIG['imgDomainURL']+"/"+this.avatar())
|
||||
return window._CONFIG['imgDomainURL']+"/"+this.avatar()
|
||||
console.log('url = '+ window._CONFIG['staticDomainURL']+"/"+this.avatar())
|
||||
return window._CONFIG['staticDomainURL']+"/"+this.avatar()
|
||||
},
|
||||
handleLogout() {
|
||||
const that = this
|
||||
@ -189,10 +205,17 @@
|
||||
filterOption(input, option) {
|
||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
searchMethods(value){
|
||||
let jump = this.search.filter(item=>item.id==value)
|
||||
this.$router.push({ path:jump[0].path})
|
||||
// update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
|
||||
searchMethods(value) {
|
||||
let route = this.searchMenuOptions.filter(item => item.id === value)[0]
|
||||
if (route.meta.internalOrExternal === true || route.component.includes('layouts/IframePageView')) {
|
||||
window.open(route.meta.url, '_blank')
|
||||
} else {
|
||||
this.$router.push({ path: route.path })
|
||||
}
|
||||
this.searchMenuVisible = false
|
||||
}
|
||||
// update_end author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
|
||||
/*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
}
|
||||
}
|
||||
@ -203,7 +226,7 @@
|
||||
/* update-begin author:sunjianlei date:20191220 for: 解决全局样式冲突问题 */
|
||||
.user-wrapper .search-input {
|
||||
width: 180px;
|
||||
color: white;
|
||||
color: inherit;
|
||||
|
||||
/deep/ {
|
||||
.ant-select-selection {
|
||||
|
||||
Reference in New Issue
Block a user