mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-14 06:09:10 +00:00
fix: 修复ops 快捷命令搜索树不生效的问题
This commit is contained in:
@@ -148,12 +148,12 @@ export default {
|
||||
rootNodeAddDom(rootNode) {
|
||||
const { showSearch, showRefresh } = this.treeSetting
|
||||
const searchIcon = `
|
||||
<a class="tree-action-btn" id='search-btn' onclick="onSearch()">
|
||||
<i class='fa fa-search tree-banner-icon'></i>
|
||||
<a class="tree-action-btn" id="search-btn" onclick="onSearch()">
|
||||
<i class="fa fa-search tree-banner-icon"></i>
|
||||
</a>`
|
||||
const refreshIcon = `
|
||||
<a id='tree-refresh' class="tree-action-btn" onclick='refresh()'>
|
||||
<i class='fa fa-refresh'></i>
|
||||
<a id="tree-refresh" class="tree-action-btn" onclick="refresh()">
|
||||
<i class="fa fa-refresh"></i>
|
||||
</a>`
|
||||
const treeActions = `${showSearch ? searchIcon : ''}${showRefresh ? refreshIcon : ''}`
|
||||
const icons = `
|
||||
@@ -306,7 +306,7 @@ export default {
|
||||
this.zTree.hideNodes(treeNodes)
|
||||
}
|
||||
|
||||
let treeUrl = this.treeSetting.treeUrl
|
||||
let treeUrl = this.treeSetting.searchUrl ? this.treeSetting.searchUrl : this.treeSetting.treeUrl
|
||||
const filterField = treeUrl.includes('?') ? `&search=${keyword}` : `?search=${keyword}`
|
||||
if (treeUrl.indexOf('assets/nodes/children/tree') > -1) {
|
||||
treeUrl = treeUrl + '&all=all'
|
||||
@@ -336,14 +336,16 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track:horizontal {
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
div.rMenu {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
@@ -225,6 +225,7 @@ export default {
|
||||
},
|
||||
treeSetting: {
|
||||
treeUrl: '/api/v1/perms/users/self/nodes/children-with-assets/tree/',
|
||||
searchUrl: '/api/v1/perms/users/self/assets/tree/',
|
||||
showRefresh: true,
|
||||
showMenu: false,
|
||||
showSearch: true,
|
||||
|
Reference in New Issue
Block a user