首页优化(自加组件)
This commit is contained in:
1615
klp-ui/src/components/HomeModules/QuickAccessGroup.vue
Normal file
1615
klp-ui/src/components/HomeModules/QuickAccessGroup.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
|||||||
<span class="top-menu-title">{{ (menu.meta && menu.meta.title) || menu.name }}</span>
|
<span class="top-menu-title">{{ (menu.meta && menu.meta.title) || menu.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="reference" class="sidebar-section-title" :class="{ 'is-collapse': isCollapse }">
|
<div ref="topMenuTrigger" slot="reference" class="sidebar-section-title" :class="{ 'is-collapse': isCollapse }" tabindex="0">
|
||||||
<div class="section-title-inner">
|
<div class="section-title-inner">
|
||||||
<div class="section-icon">
|
<div class="section-icon">
|
||||||
<svg-icon v-if="activeTopMenuIcon" :icon-class="activeTopMenuIcon" />
|
<svg-icon v-if="activeTopMenuIcon" :icon-class="activeTopMenuIcon" />
|
||||||
@@ -141,6 +141,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
sectionPopoverVisible: {
|
||||||
|
handler(val) {
|
||||||
|
if (!val) this.releasePopoverFocus()
|
||||||
|
}
|
||||||
|
},
|
||||||
$route: {
|
$route: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(newRoute) {
|
handler(newRoute) {
|
||||||
@@ -165,8 +170,16 @@ export default {
|
|||||||
this.$router.push('/')
|
this.$router.push('/')
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.sectionPopoverVisible = false
|
this.sectionPopoverVisible = false
|
||||||
|
this.releasePopoverFocus()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
releasePopoverFocus() {
|
||||||
|
if (typeof document === 'undefined') return
|
||||||
|
const el = document.activeElement
|
||||||
|
if (el && typeof el.blur === 'function') el.blur()
|
||||||
|
const trigger = this.$refs && this.$refs.topMenuTrigger
|
||||||
|
if (trigger && typeof trigger.focus === 'function') trigger.focus()
|
||||||
|
},
|
||||||
autoSelectTopMenu(currentPath) {
|
autoSelectTopMenu(currentPath) {
|
||||||
const topMenus = this.$store.state.permission.topMenuList
|
const topMenus = this.$store.state.permission.topMenuList
|
||||||
if (topMenus.length === 0) return
|
if (topMenus.length === 0) return
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<statistic-group />
|
<quick-access-group />
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<!-- 右栏 -->
|
<!-- 右栏 -->
|
||||||
@@ -37,10 +37,6 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div>
|
|
||||||
<statistic-group />
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- <AllApplications />
|
<!-- <AllApplications />
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
@@ -54,7 +50,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import StatisticGroup from '@/components/HomeModules/StatisticGroup.vue'
|
import QuickAccessGroup from '@/components/HomeModules/QuickAccessGroup.vue'
|
||||||
// import AllApplications from '@/components/HomeModules/AllApplications.vue'
|
// import AllApplications from '@/components/HomeModules/AllApplications.vue'
|
||||||
// import MiniCalendar from '@/components/HomeModules/MiniCalendar.vue'
|
// import MiniCalendar from '@/components/HomeModules/MiniCalendar.vue'
|
||||||
|
|
||||||
@@ -62,7 +58,7 @@ export default {
|
|||||||
name: 'Index',
|
name: 'Index',
|
||||||
components: {
|
components: {
|
||||||
// PanelGroup,
|
// PanelGroup,
|
||||||
StatisticGroup,
|
QuickAccessGroup,
|
||||||
// AllApplications,
|
// AllApplications,
|
||||||
// MiniCalendar,
|
// MiniCalendar,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user