@ray-js/lamp-schedule-core 1.0.4-beta-10 → 1.0.4-beta-11
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.
|
@@ -17,6 +17,13 @@ import { LOCAL_TIMER_CATEGORY } from '../constant';
|
|
|
17
17
|
import { getAll, useLocalTimerCloudProperty } from '../utils/ScheduleCloudProperty';
|
|
18
18
|
import { getTimerState, getTimerReducer } from '../context/timer';
|
|
19
19
|
import { timerReportParser } from '../dpParser';
|
|
20
|
+
const sortDataList = dataList => {
|
|
21
|
+
return dataList.sort((a, b) => {
|
|
22
|
+
const aTime = a.time;
|
|
23
|
+
const bTime = b.time;
|
|
24
|
+
return aTime.localeCompare(bTime);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
20
27
|
|
|
21
28
|
// 添加本地定时
|
|
22
29
|
export const useLocalTimerAdd = isSupportLocalTimer => {
|
|
@@ -261,8 +268,9 @@ export const useLocalTimerList = isSupportLocalTimer => {
|
|
|
261
268
|
isAppPush: false
|
|
262
269
|
};
|
|
263
270
|
});
|
|
271
|
+
const sortedLocalTimerList = sortDataList(_localTimerList);
|
|
264
272
|
resolve({
|
|
265
|
-
timers:
|
|
273
|
+
timers: sortedLocalTimerList
|
|
266
274
|
});
|
|
267
275
|
}).catch(err => {
|
|
268
276
|
ScheduleLogger.error('useLocalTimerList getAll error:', err);
|