@we-debug/plugin-navigate 0.31.0 → 0.31.17
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/CHANGELOG.md +19 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +34 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.js +17 -0
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.31.17](https://github.com/dlhandsome/we-debug/compare/v0.31.16...v0.31.17) (2024-06-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* added types entry ([015dcac](https://github.com/dlhandsome/we-debug/commit/015dcac508adb5fb0a3a140a9dd083d6323a4225))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.31.16](https://github.com/dlhandsome/we-debug/compare/v0.31.15...v0.31.16) (2024-06-20)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @we-debug/plugin-navigate
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [0.31.0](https://github.com/dlhandsome/we-debug/compare/v0.30.1...v0.31.0) (2024-01-03)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @we-debug/plugin-navigate
|
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var NavigatePlugin = {
|
|
4
|
+
install: function () { }
|
|
5
|
+
};
|
|
6
|
+
NavigatePlugin.install = function (weDebug, options) {
|
|
7
|
+
if (!Array.isArray(options))
|
|
8
|
+
options = [options];
|
|
9
|
+
var rules = [];
|
|
10
|
+
options.forEach(function (o) {
|
|
11
|
+
var rule = weDebug.createFormRule(Object.assign({}, {
|
|
12
|
+
title: o.title || '',
|
|
13
|
+
state: {
|
|
14
|
+
name: o.name || '前往'
|
|
15
|
+
},
|
|
16
|
+
desc: o.desc || '',
|
|
17
|
+
type: 'arrow',
|
|
18
|
+
handler: {
|
|
19
|
+
bindTap: function (state) {
|
|
20
|
+
if (!state.disabled) {
|
|
21
|
+
wx.navigateTo({
|
|
22
|
+
url: o.url
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}, options));
|
|
28
|
+
rules.push(rule);
|
|
29
|
+
});
|
|
30
|
+
weDebug.addFormRule(rules, {
|
|
31
|
+
group: '快捷入口'
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
exports.default = NavigatePlugin;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPluginInstance } from '@we-debug/core';
|
|
2
|
+
export * from '@we-debug/core';
|
|
3
|
+
export interface IPlugin extends IPluginInstance {
|
|
4
|
+
installed?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IPluginInitOption {
|
|
7
|
+
title: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
desc?: string;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export type IPluginInitOptions = IPluginInitOption | IPluginInitOption[];
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("@we-debug/core"), exports);
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@we-debug/plugin-navigate",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.17",
|
|
4
4
|
"description": "navigate plugin for we-debug",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/types.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
9
|
},
|
|
@@ -16,5 +17,8 @@
|
|
|
16
17
|
"readme": "ERROR: No README data found!",
|
|
17
18
|
"_id": "@we-debug/plugin-navigate@0.1.2",
|
|
18
19
|
"_commitid": "d1e9ad9",
|
|
19
|
-
"
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@we-debug/core": "^0.31.12"
|
|
22
|
+
},
|
|
23
|
+
"gitHead": "e35cde0bb5df66c43f14c6dd5411139729ef761d"
|
|
20
24
|
}
|