Catalog npm
Back to packageRELEASE DETAILS

1.3.12

npm

@0x30/vue-navigation

## 安装

animekeepaliveroutervue3
Published5 Jan 2024
Direct dependencies8
Transitive dependenciesNot calculated

README

Current package documentation

@0x30/vue-navigation

安装

pnpm install @0x30/vue-navigation

使用

初始化

component 方式

import { Navigator } from '@0x30/vue-navigation'

createApp(
  <Navigator>
    <Home />
  </Navigator>
).mount('#app')

plugin 方式

import { navigation } from '@0x30/vue-navigation'

createApp(<Home />)
  .use(navigation)
  .mount('#app')

操作方法

import { push, replace, to } from '@0x30/vue-navigation'

/**
 * 推出 一个 div 到当前之上
 */
push(<div />)

/**
 * replace 当前
 */
replace(<div />)

/**
 * repace 与 push 的辅助方式
 */
to(true)(<div />)

返回

import { back, blackBoxBack, backToHome } from '@0x30/vue-navigation'

/**
 * 返回方法
 */
back()

/**
 * 黑箱返回
 * 当页面前往 一个页面后 可以移除掉一些之前的页面
 * 
 *  a -> b -> c -> d
 *  blackBoxBack(2)
 *  a -> d
 */
blackBoxBack()

/**
 * 回到rootView
 */
backToHome()

hooks 方法

  • onWillAppear 页面即将出现,执行动画之前
  • onDidAppear 页面已经出现,执行动画完成
  • onWillDisappear 页面即将消失,执行动画之前
  • onDidDisappear 页面已经消失,执行动画完成
  • useTransitionEnter 进入动画配置
  • useTransitionLeave 离开动画配置
  • useLeaveBefore 页面返回之前的拦截方法
  • useQuietPage 设置当前页面为安静的页面
  • usePageMate 配置当前页面的 基础信息
  • getCurrentPageMate 获取当前页面的 配置信息
  • onPageChange 当前发生变化
  • useProgressExitAnimated 配置渐进式动画

特殊说明

  • 此库不是 router,只是一种管理组件的方式
  • 此库所有页面均活跃,这不是内存泄漏,这符合ios视图导航的设计
  • 此库没有路由表,没有嵌套路由
  • 此库假定所有的页面组件均为fixed,且大小与屏幕一致
  • 此库只适用于极小众的项目,比如: 混合开发app内嵌的h5app

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 8

Native requirements
8 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
sass
Environment
{
  "local_name": "sass",
  "alias": false,
  "peer_metadata": null
}
^1.69.7development
vite
Environment
{
  "local_name": "vite",
  "alias": false,
  "peer_metadata": null
}
^5.0.10development
vue-tsc
Environment
{
  "local_name": "vue-tsc",
  "alias": false,
  "peer_metadata": null
}
^1.8.27development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.9.5development
vite-plugin-dts
Environment
{
  "local_name": "vite-plugin-dts",
  "alias": false,
  "peer_metadata": null
}
^1.7.3development
@vitejs/plugin-vue-jsx
Environment
{
  "local_name": "@vitejs/plugin-vue-jsx",
  "alias": false,
  "peer_metadata": null
}
^3.1.0development
vite-plugin-css-injected-by-js
Environment
{
  "local_name": "vite-plugin-css-injected-by-js",
  "alias": false,
  "peer_metadata": null
}
^3.3.1development
vue
Environment
{
  "local_name": "vue",
  "alias": false,
  "peer_metadata": null
}
^3.3.0peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "0cc01a5fd40def96d8e8f4bc044795d57b3bd3dd",
  "tarball": "https://registry.npmjs.org/@0x30/vue-navigation/-/vue-navigation-1.3.12.tgz",
  "fileCount": 6,
  "integrity": "sha512-O0SJ7Dkl7S1m5TVl40jxxRTXH9blZCBL5zzUh2XU99n5qcfk83YKU5Dg/kwu0P+eNr3vZfsjr5DMDiBe44zJlA==",
  "signatures": [
    {
      "sig": "MEYCIQCZ0jP7RHQgmVVxJIr/NWNIzzPWJEtzJvWse1BirmE8EQIhAPz2irmKcav6A2+Bj2BsJWLt8aBhRW8DnX2JTUpp0ypx",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 31005
}

Repository

PENDING
0x30/vue-navigation

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:34 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:18cd8ab2ff3db2a60f340e4e3e1feeee21dbad896115897dee3df21cc71fcc68

Other collected versions

1.3.184 Nov1.3.177 Jul1.3.1620 Jun1.3.1521 May1.3.1418 Oct1.3.138 JanView all collected versions →