fix(service-layout): watch route causing enumerate keys

This commit is contained in:
07akioni 2021-02-03 22:13:14 +08:00
parent 2981840442
commit 3bd9b08beb
2 changed files with 2 additions and 10 deletions

View File

@ -68,8 +68,8 @@ export default defineComponent({
})
if (route) {
syncValue(route.path)
watch(route, (to) => {
syncValue(to.path)
watch(toRef(route, 'path'), (path) => {
syncValue(path)
})
}
function doUpdateCollapsed (value: boolean): void {

View File

@ -23,14 +23,6 @@ module.exports = {
__DEV__: process.env.NODE_ENV !== 'production'
},
optimizeDeps: {
include: [
'highlight.js/lib/core',
'highlight.js/lib/languages/cpp',
'highlight.js/lib/languages/javascript',
'highlight.js/lib/languages/python',
'@vicons/fluent/Compose16Regular.js',
'date-fns/locale'
],
exclude: ['__INDEX__']
},
build: {