ohos-router 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ ## 上传步骤
2
+ npm -v
3
+ npm publish
4
+
5
+ 确认 registry 地址是否正确
6
+ npm config get registry
7
+
8
+ 必须为 https://registry.npmjs.org/。如果仍是镜像地址(如 https://registry.npmmirror.com),请重置:
9
+
10
+ npm config set registry https://registry.npmjs.org/
11
+
12
+ npm config set //registry.npmjs.org/:_authToken=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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohos-router",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "鸿蒙路由管理插件",
5
5
  "main": "main.js",
6
6
  "scripts": {
package/router-plugin.ts CHANGED
@@ -5,7 +5,7 @@ export function abnerRouter(isExecute: boolean = true): HvigorPlugin {
5
5
  return {
6
6
  pluginId: 'abnerRouter',
7
7
  apply(node: HvigorNode) {
8
- pluginStart(node, isExecute, [])
8
+ pluginStart(node, isExecute, [],"")
9
9
  }
10
10
  }
11
11
  }
@@ -15,7 +15,18 @@ export function abnerRouterFilter(isExecute: boolean = true, filterModule: strin
15
15
  return {
16
16
  pluginId: 'abnerRouter',
17
17
  apply(node: HvigorNode) {
18
- pluginStart(node, isExecute, filterModule)
18
+ pluginStart(node, isExecute, filterModule,"")
19
+ }
20
+ }
21
+ }
22
+
23
+ //模块路由共用
24
+ export function abnerRouterFilterModule(isExecute: boolean = true,
25
+ filterModule: string[] = [],moduleName:string): HvigorPlugin {
26
+ return {
27
+ pluginId: 'abnerRouter',
28
+ apply(node: HvigorNode) {
29
+ pluginStart(node, isExecute, filterModule,moduleName)
19
30
  }
20
31
  }
21
32
  }