diff --git a/CHANGE.md b/CHANGE.md
index ebf1cac..eb4c71f 100644
--- a/CHANGE.md
+++ b/CHANGE.md
@@ -1,7 +1,7 @@
### Button
可以考虑是否支持 @click,而不用 @click.native
### Input
-使用 v-model
+使用 v-model,增加 on-input-change // todo 考虑更名
### RadioGroup
使用 v-model
### Radio
@@ -44,4 +44,5 @@ Caspanel 的 sublist 从 prop -> data
### Select
model 改为 value,支持 v-model
### Page
-class 改为 className
\ No newline at end of file
+class 改为 className
+### DatePicker
diff --git a/README.md b/README.md
index 942732d..2824bc3 100644
--- a/README.md
+++ b/README.md
@@ -27,10 +27,10 @@
- [ ] Table
- [x] Select
- [x] Slider
-- [ ] DatePicker
-- [ ] TimePicker
+- [x] DatePicker
+- [x] TimePicker
- [x] Cascader
-- [ ] Transfer
+- [x] Transfer
- [x] InputNumber
- [x] Rate
- [x] Upload
diff --git a/examples/app.vue b/examples/app.vue
index 3e790f6..9d30575 100644
--- a/examples/app.vue
+++ b/examples/app.vue
@@ -47,6 +47,7 @@ li + li { border-left: solid 1px #bbb; padding-left: 10px; margin-left: 10px; }
Backtop
Page
Transfer
+ Date
diff --git a/examples/main.js b/examples/main.js
index 99accb3..c77659b 100644
--- a/examples/main.js
+++ b/examples/main.js
@@ -152,6 +152,10 @@ const router = new VueRouter({
{
path: '/transfer',
component: require('./routers/transfer.vue')
+ },
+ {
+ path: '/date',
+ component: require('./routers/date.vue')
}
]
});
diff --git a/examples/routers/date.vue b/examples/routers/date.vue
index ab2476f..4d1751c 100644
--- a/examples/routers/date.vue
+++ b/examples/routers/date.vue
@@ -1,14 +1,178 @@
-
-
-
-
-
-
-
+
+ {{ val1 }}
+
+
change
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/date-picker/base/confirm.vue b/src/components/date-picker/base/confirm.vue
index 551174c..00f1e44 100644
--- a/src/components/date-picker/base/confirm.vue
+++ b/src/components/date-picker/base/confirm.vue
@@ -4,8 +4,8 @@
{{ t('i.datepicker.selectDate') }}
{{ t('i.datepicker.selectTime') }}
- {{ t('i.datepicker.clear') }}
- {{ t('i.datepicker.ok') }}
+ {{ t('i.datepicker.clear') }}
+ {{ t('i.datepicker.ok') }}
diff --git a/src/components/date-picker/picker/date-picker.js b/src/components/date-picker/picker/date-picker.js
index 8e0a33c..c6b67da 100644
--- a/src/components/date-picker/picker/date-picker.js
+++ b/src/components/date-picker/picker/date-picker.js
@@ -23,11 +23,11 @@ export default {
value: {}
},
created () {
- if (!this.value) {
+ if (!this.currentValue) {
if (this.type === 'daterange' || this.type === 'datetimerange') {
- this.value = ['',''];
+ this.currentValue = ['',''];
} else {
- this.value = '';
+ this.currentValue = '';
}
}
diff --git a/src/components/date-picker/picker/time-picker.js b/src/components/date-picker/picker/time-picker.js
index b0f77c0..7925596 100644
--- a/src/components/date-picker/picker/time-picker.js
+++ b/src/components/date-picker/picker/time-picker.js
@@ -24,11 +24,11 @@ export default {
value: {}
},
created () {
- if (!this.value) {
+ if (!this.currentValue) {
if (this.type === 'timerange') {
- this.value = ['',''];
+ this.currentValue = ['',''];
} else {
- this.value = '';
+ this.currentValue = '';
}
}
this.panel = getPanel(this.type);
diff --git a/src/components/input/input.vue b/src/components/input/input.vue
index eb87d80..33982e2 100644
--- a/src/components/input/input.vue
+++ b/src/components/input/input.vue
@@ -19,7 +19,8 @@
@keyup.enter="handleEnter"
@focus="handleFocus"
@blur="handleBlur"
- @input="handleInput">
+ @input="handleInput"
+ @change="handleChange">