Skip to content

Commit a632e25

Browse files
committed
fix: remove cyclic type
1 parent 2bb9c12 commit a632e25

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

core/src/components/cron-core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ export function useCron(options: CronOptions) {
191191
translate()
192192
})
193193

194-
segments.forEach((s) => {
194+
segments.forEach((s, i) => {
195195
watch(s.cron, () => {
196-
s.onChange?.(s, { segmentMap })
196+
fields[i].onChange?.(s, { segmentMap })
197197
toCron()
198198
})
199199
watch(s.error, (value) => {

core/src/components/cron-segment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ export function useCronSegment(options: FieldOptions) {
8888
return {
8989
id: field.id,
9090
items: field.items,
91-
onChange: field.onChange,
9291
cron,
9392
selected,
9493
error,

0 commit comments

Comments
 (0)