Skip to content

Commit

Permalink
fix: date-picker ts type error
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jan 7, 2021
1 parent 61f087a commit bf7c62f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/date-picker/createPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function createPicker<P>(
TheCalendar: DefineComponent<P>,
props: any,
name: string,
): DefineComponent<any> {
): any {
return defineComponent({
name,
mixins: [BaseMixin],
Expand Down
8 changes: 4 additions & 4 deletions components/date-picker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import {
} from './interface';

const WrappedRangePicker = (wrapPicker(
RangePicker,
RangePicker as any,
RangePickerProps,
'date',
) as unknown) as DefineComponent<RangePickerPropsTypes>;

const WrappedWeekPicker = (wrapPicker(
WeekPicker,
WeekPicker as any,
WeekPickerProps,
'week',
) as unknown) as DefineComponent<WeekPickerPropsTypes>;

const DatePicker = (wrapPicker(
createPicker(VcCalendar, DatePickerProps, 'ADatePicker'),
createPicker(VcCalendar as any, DatePickerProps, 'ADatePicker'),
DatePickerProps,
'date',
) as unknown) as DefineComponent<DatePickerPropsTypes> & {
Expand All @@ -36,7 +36,7 @@ const DatePicker = (wrapPicker(
};

const MonthPicker = (wrapPicker(
createPicker(MonthCalendar, MonthPickerProps, 'AMonthPicker'),
createPicker(MonthCalendar as any, MonthPickerProps, 'AMonthPicker'),
MonthPickerProps,
'month',
) as unknown) as DefineComponent<MonthPickerPropsTypes>;
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"@vue/cli-plugin-eslint": "^4.0.0",
"@vue/compiler-sfc": "^3.0.4",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^5.1.0",
"@vue/eslint-config-typescript": "^7.0.0",
"@vue/test-utils": "^2.0.0-beta.2",
"acorn": "^7.0.0",
"autoprefixer": "^9.6.0",
Expand Down Expand Up @@ -152,6 +152,7 @@
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"mockdate": "^2.0.2",
"node-emoji": "^1.10.0",
"nprogress": "^0.2.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"postcss": "^7.0.6",
Expand Down Expand Up @@ -193,16 +194,14 @@
"vue-router": "^4.0.0",
"vue-server-renderer": "^2.6.11",
"vue-style-loader": "^4.1.2",
"vue-virtual-scroller": "^1.0.0",
"vuex": "^4.0.0-beta.2",
"webpack": "^4.28.4",
"webpack-bundle-analyzer": "^3.8.0",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14",
"webpack-merge": "^4.1.1",
"webpackbar": "^4.0.0",
"xhr-mock": "^2.5.1",
"node-emoji": "^1.10.0"
"xhr-mock": "^2.5.1"
},
"dependencies": {
"@ant-design-vue/use": "^0.0.1-0",
Expand Down

0 comments on commit bf7c62f

Please sign in to comment.