Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amanda-test

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amanda-test - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "amanda-test",
"version": "1.0.3",
"version": "1.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,40 +0,8 @@

import {
createRouter,
createWebHashHistory,
createWebHistory,
RouteRecordRaw,
} from "vue-router";
import VueRouter from "vue-router";
export const router = createRouter({
history: createWebHashHistory(),
routes: [],
});
const router = new VueRouter()
/**
* 注册路由
* @param routes 路由配置
*/
export const registerRoute = (routes) => {
if (Array.isArray(routes)) {
routes.forEach((route) => router.addRoute(route));
} else {
router.addRoute(routes);
}
};
/**
* 设置路由模式
* @param mode "hash" | "history"
*/
export const setRouterMode = (mode) => {
if (mode === "history") {
router.options.history = createWebHistory();
}
};
router.beforeEach((to, from, next) => {
next();
});
export default router
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc