Skip to content

Commit 977bb74

Browse files
committed
add indexDb and Nedb Demo
1 parent 8daf16c commit 977bb74

File tree

13 files changed

+20
-20
lines changed

13 files changed

+20
-20
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>vue3-element-electron</title>
7+
<title></title>
88
</head>
99
<body>
1010
<div id="app"></div>

nedbStore.db

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{"name":"","age":"","_id":"2a9H6ypIAD6ZVDia"}
22
{"name":"","age":"","_id":"CdQJoiYSP7gWobjQ"}
33
{"name":"","age":"","_id":"PpvyYzNUwXdnX3MB"}
4+
{"name":"","age":"","_id":"Vbz5Qy8j8kc1xH6d"}
45
{"name":"","age":"","_id":"ciMTWeWe1pQIZGMr"}
56
{"name":"","age":"","_id":"h2IbNY5Yv65JPZaf"}
67
{"name":"","age":"","_id":"yYymdGWiUIJziEns"}

src/layout/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div :class="classObj" class="layout-wrapper">
33
<!--left side-->
4-
<Sidebar class="sidebar-container" v-if="settings.showLeftMenu" />
4+
<Sidebar v-if="settings.showLeftMenu" class="sidebar-container" />
55
<!--right container-->
66
<div class="main-container">
77
<Navbar v-if="settings.showTopNavbar" />

src/layout/components/AppMain.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<div class="app-main" :class="{ 'show-tag-view': settings.showTagsView }">
33
<router-view v-slot="{ Component }">
44
<!--has transition Judging by settings.mainNeedAnimation-->
5-
<transition name="fade-transform" mode="out-in" v-if="settings.mainNeedAnimation">
5+
<transition v-if="settings.mainNeedAnimation" name="fade-transform" mode="out-in">
66
<keep-alive :include="cachedViews">
77
<component :is="Component" :key="key" />
88
</keep-alive>
99
</transition>
1010
<!-- no transition -->
11-
<keep-alive :include="cachedViews" v-else>
11+
<keep-alive v-else :include="cachedViews">
1212
<component :is="Component" :key="key" />
1313
</keep-alive>
1414
</router-view>

src/layout/components/Breadcrumb/Breadcrumb.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<el-breadcrumb class="app-breadcrumb" separator="/">
33
<!--has transition Judging by settings.mainNeedAnimation-->
4-
<transition-group name="breadcrumb" v-if="settings.mainNeedAnimation">
4+
<transition-group v-if="settings.mainNeedAnimation" name="breadcrumb">
55
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
66
<span v-if="item.redirect === 'noRedirect' || index === levelList.length - 1" class="no-redirect">
77
{{ item.meta?.title }}

src/layout/components/Navbar.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<breadcrumb class="breadcrumb-container" />
1111
</div>
1212
<!--nav title-->
13-
<div class="heardCenterTitle" v-if="settings.showNavbarTitle">{{ settings.showNavbarTitle }}</div>
14-
<div class="right-menu rowSC" v-if="settings.ShowDropDown">
13+
<div v-if="settings.showNavbarTitle" class="heardCenterTitle">{{ settings.showNavbarTitle }}</div>
14+
<div v-if="settings.ShowDropDown" class="right-menu rowSC">
1515
<el-dropdown trigger="click" size="medium">
1616
<div class="avatar-wrapper">
1717
<img src="@/assets/layout/animation-image.gif" class="user-avatar" />
@@ -24,7 +24,7 @@
2424
<router-link to="/">
2525
<el-dropdown-item>Home</el-dropdown-item>
2626
</router-link>
27-
<a target="_blank" href="https://github.com/jzfai/vue3-admin-template">
27+
<a target="_blank" href="https://github.com/jzfai/vue3-admin-electron">
2828
<el-dropdown-item>Github</el-dropdown-item>
2929
</a>
3030
<a target="_blank" href="https://juejin.cn/post/7036302298435289095">
@@ -47,7 +47,6 @@ import { computed, getCurrentInstance } from 'vue'
4747
import { ElMessage } from 'element-plus'
4848
import { useStore } from 'vuex'
4949
50-
5150
const store = useStore()
5251
5352
let { proxy } = getCurrentInstance()

src/layout/components/Sidebar/Sidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div id="Sidebar" class="reset-menu-style">
33
<!--logo-->
4-
<Logo :collapse="!isCollapse" v-if="settings.sidebarLogo" />
4+
<Logo v-if="settings.sidebarLogo" :collapse="!isCollapse" />
55
<!--router nav-->
66
<el-scrollbar>
77
<el-menu

src/layout/components/Sidebar/SidebarItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</Link>
1010
</template>
1111
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
12-
<template #title v-if="item.meta">
12+
<template v-if="item.meta" #title>
1313
<item :meta="item.meta" />
1414
<span>{{ item.meta.title }}</span>
1515
</template>

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ app.config.globalProperties.$axiosReq = axiosReq
2929
//import svg-icon doc in https://github.com/anncwb/vite-plugin-svg-icons/blob/main/README.zh_CN.md
3030
import 'virtual:svg-icons-register'
3131
import svgIcon from '@/icons/SvgIcon.vue'
32-
app.component('svg-icon', svgIcon)
32+
app.component('SvgIcon', svgIcon)
3333

3434
//global mount moment-mini
3535
import $momentMini from 'moment-mini'

src/router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export const constantRoutes = [
194194
component: Layout,
195195
children: [
196196
{
197-
path: 'https://github.com/jzfai/vue3-admin-template.git',
197+
path: 'https://github.com/jzfai/vue3-admin-electron.git',
198198
meta: { title: 'External Link', icon: 'link' }
199199
}
200200
]

0 commit comments

Comments
 (0)