utiller 1.0.124 → 1.0.125
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/lib/utiller/index.js +15 -4
- package/package.json +1 -1
- package/template/sample.package.json +1 -1
package/lib/utiller/index.js
CHANGED
|
@@ -166,10 +166,6 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
166
166
|
this.init();
|
|
167
167
|
this.env = "dev";
|
|
168
168
|
}
|
|
169
|
-
/**
|
|
170
|
-
* 執行為了避免沒意義的任務重複執行, 像是search 輸入關鍵字後, 不應該每次onchange就呼叫一次建議列表, 應該等到打完後500ms後在去 執行搜尋任務
|
|
171
|
-
* */
|
|
172
|
-
|
|
173
169
|
|
|
174
170
|
(0, _createClass2["default"])(Utiller, [{
|
|
175
171
|
key: "isValidVersionOfString",
|
|
@@ -218,6 +214,21 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
218
214
|
numbers[last] = numbers[last] + delta;
|
|
219
215
|
return numbers.join(".");
|
|
220
216
|
}
|
|
217
|
+
}, {
|
|
218
|
+
key: "performActionWithoutTimingIssue",
|
|
219
|
+
value: function performActionWithoutTimingIssue() {
|
|
220
|
+
var task = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
|
|
221
|
+
return true;
|
|
222
|
+
};
|
|
223
|
+
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
224
|
+
this.syncDelay(wait).then(function () {
|
|
225
|
+
return task();
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* 執行為了避免沒意義的任務重複執行, 像是search 輸入關鍵字後, 不應該每次onchange就呼叫一次建議列表, 應該等到打完後500ms後在去 執行搜尋任務
|
|
230
|
+
* */
|
|
231
|
+
|
|
221
232
|
}, {
|
|
222
233
|
key: "executeTimeoutTask",
|
|
223
234
|
value: function executeTimeoutTask(functionOfAsyncTask) {
|
package/package.json
CHANGED