Skip to content

Commit

Permalink
feat:添加动画
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghang committed Sep 22, 2024
1 parent ba1cc4c commit 1ef812a
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@

# 小技巧
@vue.monu





Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-generation-date": "2024-09-18T08:37:41.562Z"
"x-generation-date": "2024-09-22T14:08:38.593Z"
},
"x-strapi-config": {
"path": "/documentation",
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import install from "vue-bag-admin"
import App from "./App.vue"

const {app, framework, plugins} = install(App, {...})
const {app, framework, plugins} = install(App)
```

### 附带框架源码
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-bag-admin",
"private": false,
"version": "5.0.9",
"version": "5.0.0",
"type": "module",
"main": "./lib/vue-bag-admin.cjs.js",
"module": "./lib/vue-bag-admin.es.js",
Expand Down
2 changes: 1 addition & 1 deletion src/app/plugins/router-plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class RouterPlugin {
options.errorRoute ? routes.push(options.errorRoute) : routes.push(defaultErrorRouter); // 这个要放在最后
ctx.router = router || createRouter({
history: createWebHistory(options.base || '/'),
routes:routes, // 合并默认路由与用户配置路由
routes: routes, // 合并默认路由与用户配置路由
...args
});
ctx.app.use(ctx.router)
Expand Down
6 changes: 4 additions & 2 deletions src/packages/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<n-global-style/>
<!-- 多router-view模式 -->
<template v-if="$globalStore.isRouterReload">
<router-view v-if="$globalStore.isIframe" name="iframe"></router-view>
<router-view v-else></router-view>
<router-view v-if="$globalStore.isIframe" name="iframe">
</router-view>
<router-view v-else>
</router-view>
</template>
</n-config-provider>
</template>
Expand Down
1 change: 0 additions & 1 deletion src/packages/install.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'default-passive-events' // 去掉chrome51版本后的事件捕获机制Passive Event Listeners 的警告
import '@/packages/style/tailwind.css'
import "@/packages/style/tailwind.css"
import "@/packages/style/reset.css"
import "@/packages/style/style.less"
import nprogress from 'nprogress'
import 'nprogress/nprogress.css'
Expand Down
8 changes: 6 additions & 2 deletions src/packages/layout/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</n-layout-sider>
<div class="flex h-full flex-col flex-auto overflow-hidden item">
<template v-if="components.LayoutHeaderCum">
<template v-if="$globalStore.configs.isBreadcrumb && ($globalStore.appGroups.length)">
<template v-if="$globalStore.configs.isBreadcrumb && ($globalStore.appGroups.length)">
<n-breadcrumb class="py-2 px-4">
<n-breadcrumb-item v-for="item in $globalStore.breadcrumb">
{{ $global?.helpers?.formatTitle($global, item) }}
Expand All @@ -29,7 +29,11 @@
<TabBar v-if="$globalStore.configs.isTabar"/>
</component>
<n-layout id="layout" class="p-2">
<router-view></router-view>
<router-view v-slot="{ Component }">
<transition mode="out-in">
<component :is="Component"/>
</transition>
</router-view>
</n-layout>
</div>
</n-layout>
Expand Down

0 comments on commit 1ef812a

Please sign in to comment.