fast-vue-multi-pages 1.1.0 → 1.1.2

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.
@@ -9,6 +9,11 @@ export declare class FastVueNative {
9
9
  private static methodInfos;
10
10
  private static getKey;
11
11
  private static showError;
12
+ /**
13
+ * 注册js函数到window对象中,以供客户端调用
14
+ * @private
15
+ */
16
+ private static injectAppJsForNativeCall;
12
17
  /**
13
18
  * 是否是安卓客户端
14
19
  */
@@ -23,6 +23,15 @@ class FastVueNative {
23
23
  static showError(message) {
24
24
  alert("FastAppJs发生错误:" + message);
25
25
  }
26
+ /**
27
+ * 注册js函数到window对象中,以供客户端调用
28
+ * @private
29
+ */
30
+ static injectAppJsForNativeCall() {
31
+ if (!(window["appJs"])) {
32
+ window["appJs"] = FastVueNative;
33
+ }
34
+ }
26
35
  /**
27
36
  * 是否是安卓客户端
28
37
  */
@@ -42,6 +51,7 @@ class FastVueNative {
42
51
  * @param callBack 回调函数
43
52
  */
44
53
  static execute(methodName, methodParams, callBack) {
54
+ this.injectAppJsForNativeCall();
45
55
  const Base64 = require("js-base64");
46
56
  const key = this.getKey();
47
57
  try {
@@ -122,7 +122,8 @@ class FastVueMultiDate {
122
122
  return descriptions.join("");
123
123
  }
124
124
  else if (timestamp < minuteUnit) {
125
- descriptions.push(lodash_1.default.padStart((timestamp / seconds).toString(), 2, "0") + (chinese ? '秒' : ''));
125
+ let second = parseInt((timestamp / seconds).toString());
126
+ descriptions.push(lodash_1.default.padStart(second.toString(), 2, "0") + (chinese ? '秒' : ''));
126
127
  return descriptions.join("");
127
128
  }
128
129
  if (timestamp < hourUnit) {
@@ -9,6 +9,11 @@ export declare class FastVueNative {
9
9
  private static methodInfos;
10
10
  private static getKey;
11
11
  private static showError;
12
+ /**
13
+ * 注册js函数到window对象中,以供客户端调用
14
+ * @private
15
+ */
16
+ private static injectAppJsForNativeCall;
12
17
  /**
13
18
  * 是否是安卓客户端
14
19
  */
@@ -23,6 +23,15 @@ define(["require", "exports", "tslib", "../other/FastVueMultiObject", "../other/
23
23
  FastVueNative.showError = function (message) {
24
24
  alert("FastAppJs发生错误:" + message);
25
25
  };
26
+ /**
27
+ * 注册js函数到window对象中,以供客户端调用
28
+ * @private
29
+ */
30
+ FastVueNative.injectAppJsForNativeCall = function () {
31
+ if (!(window["appJs"])) {
32
+ window["appJs"] = FastVueNative;
33
+ }
34
+ };
26
35
  /**
27
36
  * 是否是安卓客户端
28
37
  */
@@ -42,6 +51,7 @@ define(["require", "exports", "tslib", "../other/FastVueMultiObject", "../other/
42
51
  * @param callBack 回调函数
43
52
  */
44
53
  FastVueNative.execute = function (methodName, methodParams, callBack) {
54
+ this.injectAppJsForNativeCall();
45
55
  var Base64 = require("js-base64");
46
56
  var key = this.getKey();
47
57
  try {
@@ -123,7 +123,8 @@ define(["require", "exports", "tslib", "moment", "lodash", "./FastVueMultiObject
123
123
  return descriptions.join("");
124
124
  }
125
125
  else if (timestamp < minuteUnit) {
126
- descriptions.push(lodash_1.default.padStart((timestamp / seconds).toString(), 2, "0") + (chinese ? '秒' : ''));
126
+ var second = parseInt((timestamp / seconds).toString());
127
+ descriptions.push(lodash_1.default.padStart(second.toString(), 2, "0") + (chinese ? '秒' : ''));
127
128
  return descriptions.join("");
128
129
  }
129
130
  if (timestamp < hourUnit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-vue-multi-pages",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "author": "janesen",
5
5
  "description": "快速搭建VUE项目工具类的基本库,主要用于每个功能页面独立生成html",
6
6
  "main": "./dist/cjs/index.js",