chore: bump vue@3.0.6 and fix Date prop type (#8215)

This commit is contained in:
neverland
2021-02-25 10:35:03 +08:00
committed by GitHub
parent c054164ba6
commit 70a598cf5a
6 changed files with 126 additions and 234 deletions
+3 -3
View File
@@ -38,15 +38,15 @@ export default createComponent({
showMonthTitle: Boolean,
firstDayOfWeek: Number,
date: {
type: Date as PropType<Date>,
type: Date,
required: true,
},
minDate: {
type: Date as PropType<Date>,
type: Date,
required: true,
},
maxDate: {
type: Date as PropType<Date>,
type: Date,
required: true,
},
},
+2 -2
View File
@@ -101,12 +101,12 @@ export default createComponent({
default: true,
},
minDate: {
type: Date as PropType<Date>,
type: Date,
validator: isDate,
default: () => new Date(),
},
maxDate: {
type: Date as PropType<Date>,
type: Date,
validator: isDate,
default: () => {
const now = new Date();
+3 -3
View File
@@ -31,18 +31,18 @@ const [createComponent] = createNamespace('date-picker');
export default createComponent({
props: {
...sharedProps,
modelValue: Date as PropType<Date>,
modelValue: Date,
type: {
type: String as PropType<DatetimePickerType>,
default: 'datetime',
},
minDate: {
type: Date as PropType<Date>,
type: Date,
default: () => new Date(currentYear - 10, 0, 1),
validator: isDate,
},
maxDate: {
type: Date as PropType<Date>,
type: Date,
default: () => new Date(currentYear + 10, 11, 31),
validator: isDate,
},
+1 -1
View File
@@ -41,7 +41,7 @@ export function mountComponent(RootComponent: Component) {
return {
instance: app.mount(root),
unmount() {
app.unmount(root);
app.unmount();
document.body.removeChild(root);
},
};