§ Fox 2.0 全局API
§ fox
安装fox
// 导入
import fox from '@fox-js/fox'
// 安装fox
Vue.use(fox)
1
2
3
4
2
3
4
§ 参数FoxOptions
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| defaultOperationType | OperationType | push | 默认操作类型(push/put) |
| modulePathResolve | Function | 模块解析函数 | |
| hashMonitor | boolean | true | 路由跳转是否基于URL hash的变化 |
| defaultPath | string | / | 默认加载的路由对应路径 |
| query | string | base query | |
| routes | Array<RouteConfig> | 路由配置列表 | |
| notFound | RouteConfig | 404显示路由配置 |
§ Options API
options模式下的全局API
§ $fox
获取当前Fox实例
§ $router
获取当前Fox Router实例
§ $route
获取当前route
← API