File tree Expand file tree Collapse file tree 5 files changed +25
-2
lines changed Expand file tree Collapse file tree 5 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1
1
2
2
// *
3
3
import { AnySegment } from '../types'
4
+ import util from '../util'
4
5
5
6
function strToArray ( str ) {
6
7
if ( str !== '*' ) {
@@ -24,6 +25,9 @@ function arrayToStr (arr, field) {
24
25
return null
25
26
}
26
27
}
28
+ if ( ! util . isSquence ( items . map ( item => item . value ) ) ) {
29
+ return null
30
+ }
27
31
return new AnySegment ( )
28
32
}
29
33
Original file line number Diff line number Diff line change @@ -158,6 +158,15 @@ function populate (obj, map) {
158
158
return res
159
159
}
160
160
161
+ function isSquence ( numbers ) {
162
+ for ( let i = 1 ; i < numbers . length ; i ++ ) {
163
+ if ( numbers [ i - 1 ] + 1 !== numbers [ i ] ) {
164
+ return false
165
+ }
166
+ }
167
+ return true
168
+ }
169
+
161
170
export default {
162
171
range,
163
172
Range,
@@ -167,5 +176,6 @@ export default {
167
176
deepMerge,
168
177
isObject,
169
178
traverse,
170
- populate
179
+ populate,
180
+ isSquence
171
181
}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import '@vue-js-cron/element-plus/dist/element-plus.css'
4
4
import CronLight from '@vue-js-cron/light'
5
5
import '@vue-js-cron/light/dist/light.css'
6
6
import CronVuetify from '@vue-js-cron/vuetify'
7
+ import '@vue-js-cron/vuetify/dist/vuetify.css'
7
8
8
9
import { createVuetify } from 'vuetify'
9
10
import * as components from 'vuetify/components'
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ Then you need to register `vue-js-cron/vuetify` with `app.use()`
70
70
71
71
``` js
72
72
import cronVuetify from ' @vue-js-cron/vuetify'
73
+ import ' @vue-js-cron/vuetify/dist/vuetify.css'
73
74
74
75
app .use (cronVuetify)
75
76
```
Original file line number Diff line number Diff line change 17
17
<v-list class =" pa-0 ma-0" >
18
18
<v-row v-for =" (itemRow, index) in itemRows" :key =" index" no-gutters >
19
19
<v-col v-for =" (item, index) in itemRow" :key =" index" >
20
- <v-list-item v-if =" item" @click =" select(item)" :active =" isSelected(item)" >{{item.text}}</v-list-item >
20
+ <v-list-item v-if =" item" class =" vcron-v-item" @click =" select(item)" :active =" isSelected(item)" >
21
+ <v-list-item-text >{{item.text}}</v-list-item-text >
22
+ </v-list-item >
21
23
</v-col >
22
24
</v-row >
23
25
</v-list >
@@ -50,4 +52,9 @@ export default {
50
52
</script >
51
53
52
54
<style >
55
+
56
+ .vcron-v-item div {
57
+ overflow : visible ;
58
+ }
59
+
53
60
</style >
You can’t perform that action at this time.
0 commit comments