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.
- package/dist/cjs/native/FastVueNative.d.ts +5 -0
- package/dist/cjs/native/FastVueNative.js +10 -0
- package/dist/cjs/other/FastVueMultiDate.js +2 -1
- package/dist/esm/native/FastVueNative.d.ts +5 -0
- package/dist/esm/native/FastVueNative.js +10 -0
- package/dist/esm/other/FastVueMultiDate.js +2 -1
- package/package.json +1 -1
@@ -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
|
-
|
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) {
|
@@ -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
|
-
|
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) {
|