File tree Expand file tree Collapse file tree 6 files changed +93
-25
lines changed Expand file tree Collapse file tree 6 files changed +93
-25
lines changed Original file line number Diff line number Diff line change 19
19
},
20
20
"dependencies" : {
21
21
"@vue-js-cron/core" : " 2.0.0" ,
22
- "@vue-js-cron/light" : " ^1.0.0 " ,
22
+ "@vue-js-cron/light" : " ^1.0.1 " ,
23
23
"@vue-js-cron/vuetify" : " 2.0.0"
24
24
}
25
25
}
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <v-app >
3
+
4
+ <v-card class =" code-example" >
5
+ <v-toolbar dense class =" elevation-1" >
6
+ <v-toolbar-title v-if =" title" >{{title}}</v-toolbar-title >
7
+
8
+ <v-spacer ></v-spacer >
9
+
10
+ <v-tooltip bottom >
11
+ <template #activator =" {attrs , on } " >
12
+ <v-btn v-bind =" attrs" v-on =" on" icon @click =" viewSource = !viewSource" >
13
+ <v-icon >mdi-code-tags</v-icon >
14
+ </v-btn >
15
+ </template >
16
+ <span >View source</span >
17
+ </v-tooltip >
18
+
19
+ </v-toolbar >
20
+
21
+ <v-expand-transition >
22
+ <div v-show =" viewSource" class =" source" >
23
+ <slot name =" source" ></slot >
24
+ </div >
25
+ </v-expand-transition >
26
+
27
+ <v-card-text >
28
+ <slot ></slot >
29
+ </v-card-text >
30
+ </v-card >
31
+
32
+ <v-card-text >
33
+
34
+ </v-card-text >
35
+ <slot name =" code" ></slot >
36
+
37
+ </v-app >
38
+ </template >
39
+
40
+ <script >
41
+ export default {
42
+ props: {
43
+ title: {
44
+ type: String ,
45
+ default: ' '
46
+ }
47
+ },
48
+ data () {
49
+ return {
50
+ viewSource: false
51
+ }
52
+ },
53
+ }
54
+ </script >
55
+
56
+ <style >
57
+ .code-example pre {
58
+ margin : 0 !important ;
59
+ }
60
+ .code-example .source {
61
+ margin : 0.2em ;
62
+ }
63
+ .code-example {
64
+ overflow-wrap : unset ;
65
+ }
66
+
67
+ </style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" getting-started-light" >
3
- <div >{{value}}</div >
3
+ <div class = " mb-2 " >{{value}}</div >
4
4
<CronLight v-model =" value" @error =" error=$event" ></CronLight >
5
5
</div >
6
6
</template >
@@ -18,12 +18,3 @@ export default {
18
18
}
19
19
}
20
20
</script >
21
-
22
- <style scoped>
23
-
24
- .getting-started-light > div {
25
- margin-top : 10px ;
26
- margin-bottom : 6px ;
27
- }
28
-
29
- </style >
Original file line number Diff line number Diff line change 18
18
<!-- period selection -->
19
19
<v-col v-if =" period.prefix" class =" flex-grow-0" >{{period.prefix}}</v-col >
20
20
<v-col cols =" auto" >
21
- <v-select class =" fit" v-bind =" period.attrs" :items =" period.items" @input =" period.events.input" return-object dense :menu-props =" {'offset-y': true}" ></v-select >
21
+ <v-select class =" fit" v-bind =" period.attrs" :items =" period.items" @input =" period.events.input" item-value = " id " dense :menu-props =" {'offset-y': true}" ></v-select >
22
22
</v-col >
23
23
<v-col v-if =" period.suffix" class =" flex-grow-0" >{{period.suffix}}</v-col >
24
24
Original file line number Diff line number Diff line change 1
1
# Custom Periods
2
2
3
- ## Code
3
+ <code-example >
4
+ <template v-slot:source >
4
5
5
6
<<< @/src/.vuepress/components/custom-periods.vue
6
7
7
- ## Result
8
-
9
- <custom-periods / >
8
+ </ template >
9
+ < custom-periods />
10
+ </ code-example >
Original file line number Diff line number Diff line change @@ -33,13 +33,16 @@ Vue.use(cronLight)
33
33
34
34
Now you can use the component ` CronLight ` .
35
35
36
- #### Code
36
+ < br />
37
37
38
- <<< @/src/.vuepress/components/getting-started-light.vue
38
+ <code-example title =" CronLight example " >
39
+ <template v-slot:source >
39
40
40
- #### Result
41
+ <<< @/src/.vuepress/components/getting-started-light.vue
41
42
43
+ </template >
42
44
<getting-started-light />
45
+ </code-example >
43
46
44
47
#### API
45
48
@@ -71,13 +74,16 @@ Vue.use(cronVuetify)
71
74
72
75
Now you can use the component ` CronVuetify ` .
73
76
74
- #### Code
77
+ < br />
75
78
76
- <<< @/src/.vuepress/components/getting-started-vuetify.vue
79
+ <code-example title =" CronVuetify example " >
80
+ <template v-slot:source >
77
81
78
- #### Result
82
+ <<< @/src/.vuepress/components/getting-started-vuetify.vue
79
83
84
+ </template >
80
85
<getting-started-vuetify />
86
+ </code-example >
81
87
82
88
#### API
83
89
@@ -116,13 +122,16 @@ Now you can use the component `CronCore`. The default [scoped slot](https://vuej
116
122
- ` period ` - defines which fields are visible
117
123
- ` error ` - error message
118
124
119
- #### Code
125
+ < br />
120
126
121
- <<< @/src/.vuepress/components/getting-started-renderless.vue
127
+ <code-example title =" CronCore example " >
128
+ <template v-slot:source >
122
129
123
- #### Result
130
+ <<< @/src/.vuepress/components/getting-started-renderless.vue
124
131
132
+ </template >
125
133
<getting-started-renderless />
134
+ </code-example >
126
135
127
136
#### API
128
137
You can’t perform that action at this time.
0 commit comments