@afeefa/vue-app 0.0.68 → 0.0.69
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.69
|
package/package.json
CHANGED
@@ -24,6 +24,8 @@
|
|
24
24
|
v-if="menu"
|
25
25
|
:value="date"
|
26
26
|
no-title
|
27
|
+
:type="type"
|
28
|
+
v-bind="$attrs"
|
27
29
|
@input="dateChanged"
|
28
30
|
/>
|
29
31
|
</v-menu>
|
@@ -36,7 +38,7 @@ import { formatDate } from '@a-vue/utils/format-date'
|
|
36
38
|
import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
|
37
39
|
|
38
40
|
@Component({
|
39
|
-
props: ['value', 'validator']
|
41
|
+
props: ['value', 'validator', 'type']
|
40
42
|
})
|
41
43
|
export default class ADatePicker extends Mixins(ComponentWidthMixin) {
|
42
44
|
value_ = null
|
@@ -62,7 +64,7 @@ export default class ADatePicker extends Mixins(ComponentWidthMixin) {
|
|
62
64
|
|
63
65
|
get date () {
|
64
66
|
return this.value_
|
65
|
-
? this.value_.toISOString().substr(0, 10)
|
67
|
+
? this.value_.toISOString().substr(0, this.type === 'month' ? 7 : 10)
|
66
68
|
: null
|
67
69
|
}
|
68
70
|
|
@@ -78,7 +80,14 @@ export default class ADatePicker extends Mixins(ComponentWidthMixin) {
|
|
78
80
|
|
79
81
|
get formattedDate () {
|
80
82
|
const date = this.value_
|
81
|
-
|
83
|
+
if (!date) {
|
84
|
+
return null
|
85
|
+
}
|
86
|
+
if (this.type === 'month') {
|
87
|
+
const monthName = date.toLocaleString('default', { month: 'long' })
|
88
|
+
return monthName + ' ' + date.getFullYear()
|
89
|
+
}
|
90
|
+
return formatDate(new Date(date))
|
82
91
|
}
|
83
92
|
|
84
93
|
get validationRules () {
|
@@ -88,7 +88,7 @@
|
|
88
88
|
class="topbar"
|
89
89
|
>
|
90
90
|
<v-app-bar-nav-icon
|
91
|
-
class="sidebarToggleButton mr-2 ml-
|
91
|
+
class="sidebarToggleButton mr-2 ml-3"
|
92
92
|
@click="toggleDrawer"
|
93
93
|
/>
|
94
94
|
|
@@ -97,7 +97,7 @@
|
|
97
97
|
|
98
98
|
<v-container
|
99
99
|
fluid
|
100
|
-
class="pa-8 pt-
|
100
|
+
class="pa-8 pt-2"
|
101
101
|
>
|
102
102
|
<sticky-header />
|
103
103
|
|
@@ -229,7 +229,7 @@ export default class App extends Vue {
|
|
229
229
|
width: 100%;
|
230
230
|
left: 0;
|
231
231
|
top: 0;
|
232
|
-
padding: .2rem 1rem;
|
232
|
+
padding: .2rem 1.1rem;
|
233
233
|
}
|
234
234
|
|
235
235
|
.a-breadcrumbs {
|