|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<a-row> |
|
|
<a-row> |
|
|
<a-col :span="6" style="display: flex;align-items: center;"> |
|
|
|
|
|
|
|
|
|
|
|
<menu-unfold-outlined v-if="collapsed" class="trigger" @click="onCollapsed" /> |
|
|
|
|
|
<menu-fold-outlined v-else class="trigger" @click="onCollapsed" /> |
|
|
|
|
|
<a-cascader v-model:value="value" :options="menuList" :show-search="{ filter }" placeholder="请搜索想进入的管理页面" |
|
|
|
|
|
:field-names="{ label: 'title', value: 'name', children: 'children' }" @change="inputChange" style="margin-left: 10px;width: 100%;"/> |
|
|
|
|
|
|
|
|
<a-col :span="12" style="display: flex;align-items: center;"> |
|
|
|
|
|
<a-space> |
|
|
|
|
|
<menu-unfold-outlined v-if="collapsed" class="trigger" @click="onCollapsed" /> |
|
|
|
|
|
<menu-fold-outlined v-else class="trigger" @click="onCollapsed" /> |
|
|
|
|
|
<a-breadcrumb> |
|
|
|
|
|
<a-breadcrumb-item v-for="(item, index) in routes">{{item.meta.title}}</a-breadcrumb-item> |
|
|
|
|
|
</a-breadcrumb> |
|
|
|
|
|
<a-cascader v-model:value="value" :options="menuList" :show-search="{ filter }" placeholder="请搜索想进入的管理页面" |
|
|
|
|
|
:field-names="{ label: 'title', value: 'name', children: 'children' }" @change="inputChange" |
|
|
|
|
|
style="margin-left: 10px;width: 100%;" /> |
|
|
|
|
|
</a-space> |
|
|
</a-col> |
|
|
</a-col> |
|
|
<a-col :span="18"> |
|
|
|
|
|
|
|
|
<a-col :span="12"> |
|
|
<a-row type="flex" justify="end" :gutter="20"> |
|
|
<a-row type="flex" justify="end" :gutter="20"> |
|
|
<a-col flex="200px"> |
|
|
<a-col flex="200px"> |
|
|
<div>{{time}}</div> |
|
|
<div>{{time}}</div> |
|
|
|
|
|
|
|
|
const collapsed = computed(() => { |
|
|
const collapsed = computed(() => { |
|
|
return store.state.collapsed |
|
|
return store.state.collapsed |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const routes = computed(() => { |
|
|
|
|
|
return store.state.crumbList |
|
|
|
|
|
}) |
|
|
const onCollapsed = () => { |
|
|
const onCollapsed = () => { |
|
|
store.commit('getCollapsed'); |
|
|
store.commit('getCollapsed'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const value = ref<string[]>([]); |
|
|
const value = ref<string[]>([]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const filter : ShowSearchType['filter'] = (inputValue, path) => { |
|
|
const filter : ShowSearchType['filter'] = (inputValue, path) => { |
|
|
const pathLabel = path.map(item => item.title).join(' / '); |
|
|
const pathLabel = path.map(item => item.title).join(' / '); |
|
|
return pathLabel.toLowerCase().includes(inputValue.toLowerCase()); |
|
|
return pathLabel.toLowerCase().includes(inputValue.toLowerCase()); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const inputChange = (val, selectedOptions) => { |
|
|
const inputChange = (val, selectedOptions) => { |
|
|
console.log(val, selectedOptions) |
|
|
console.log(val, selectedOptions) |
|
|
onMenu(selectedOptions[selectedOptions.length - 1].path) |
|
|
onMenu(selectedOptions[selectedOptions.length - 1].path) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |