@monoui/vuejs 1.1.47 → 1.1.49
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.
- package/dist/main.js +13 -13
- package/package.json +2 -2
- package/src/components/Date/DatePicker.vue +18 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoui/vuejs",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.49",
|
|
4
4
|
"description": "This project will contain MonoFor UI Framework",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"repository": "git@gitlab.com:monoui/vuejs.git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vue-sweetalert2": "^4.2",
|
|
43
43
|
"vue-template-compiler": "^2.6.12",
|
|
44
44
|
"vue-test-utils": "^1.0.0-beta.11",
|
|
45
|
-
"vue2-datepicker": "^3.
|
|
45
|
+
"vue2-datepicker": "^3.11.1",
|
|
46
46
|
"vuejs-noty": "^0.1.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="datePicker">
|
|
3
3
|
<date-picker
|
|
4
|
+
:ref="refKey"
|
|
4
5
|
:value="datetime"
|
|
5
6
|
@input="updateDate($event)"
|
|
6
7
|
:type="type"
|
|
@@ -15,6 +16,8 @@
|
|
|
15
16
|
:clearable="clearable"
|
|
16
17
|
:second-options="[]"
|
|
17
18
|
:shortcuts="!range && shortcutsEnable ? shortcuts : []"
|
|
19
|
+
@change="handleChange"
|
|
20
|
+
:open.sync="open"
|
|
18
21
|
>
|
|
19
22
|
<template #header="{ emit }" v-if="!shortcutsEnable && todayHeader">
|
|
20
23
|
<button class="mx-btn mx-btn-text" @click="emit(new Date())">
|
|
@@ -72,6 +75,7 @@ export default {
|
|
|
72
75
|
},
|
|
73
76
|
data() {
|
|
74
77
|
return {
|
|
78
|
+
open: false,
|
|
75
79
|
momentFormat: {
|
|
76
80
|
stringify: date => {
|
|
77
81
|
return date ? moment(date).format(this.dateFormat) : "";
|
|
@@ -107,6 +111,15 @@ export default {
|
|
|
107
111
|
}
|
|
108
112
|
},
|
|
109
113
|
props: {
|
|
114
|
+
closeOnSelect: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: true
|
|
117
|
+
},
|
|
118
|
+
refKey: {
|
|
119
|
+
required: false,
|
|
120
|
+
type: String,
|
|
121
|
+
default: "muiDatePicker"
|
|
122
|
+
},
|
|
110
123
|
/**
|
|
111
124
|
* value.
|
|
112
125
|
* It's used to bind v-model value from parent component to child component's input value.
|
|
@@ -286,6 +299,11 @@ export default {
|
|
|
286
299
|
}
|
|
287
300
|
},
|
|
288
301
|
methods: {
|
|
302
|
+
handleChange(value, type) {
|
|
303
|
+
if (!this.range && this.type === "datetime") {
|
|
304
|
+
if (type === "minute") this.open = false;
|
|
305
|
+
}
|
|
306
|
+
},
|
|
289
307
|
/**
|
|
290
308
|
* updateDate
|
|
291
309
|
* @input update value when input value changes
|