From f82fcad0942faabd49d788bf7027092f76c23b3e Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Wed, 21 Oct 2020 15:32:04 +0800 Subject: [PATCH] fix: review amour1688 error --- components/modal/index.tsx | 18 ++++++++++++++++-- components/radio/Radio.tsx | 3 --- components/transfer/index.tsx | 2 -- components/transfer/renderListBody.tsx | 3 ++- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/components/modal/index.tsx b/components/modal/index.tsx index eef26df6b..0894a2407 100644 --- a/components/modal/index.tsx +++ b/components/modal/index.tsx @@ -1,5 +1,5 @@ import { App } from 'vue'; -import Modal, { destroyFns, ModalFuncProps } from './Modal'; +import Modal, { destroyFns, ModalFunc, ModalFuncProps } from './Modal'; import modalConfirm from './confirm'; import InfoCircleOutlined from '@ant-design/icons-vue/InfoCircleOutlined'; import CheckCircleOutlined from '@ant-design/icons-vue/CheckCircleOutlined'; @@ -80,4 +80,18 @@ Modal.install = function(app: App) { return app; }; -export default Modal; +export default Modal as typeof Modal & { + readonly info: ModalFunc; + + readonly success: ModalFunc; + + readonly error: ModalFunc; + + readonly warn: ModalFunc; + + readonly warning: ModalFunc; + + readonly confirm: ModalFunc; + + readonly destroyAll: () => void; +}; diff --git a/components/radio/Radio.tsx b/components/radio/Radio.tsx index b5389f0ef..aa5a33fb3 100644 --- a/components/radio/Radio.tsx +++ b/components/radio/Radio.tsx @@ -26,9 +26,6 @@ export type RadioProps = Partial>; export default defineComponent({ name: 'ARadio', - model: { - prop: 'checked', - }, props: radioProps, emits: ['update:checked', 'update:value', 'change', 'blur', 'focus'], setup() { diff --git a/components/transfer/index.tsx b/components/transfer/index.tsx index 08ddd91e7..bad8a700f 100644 --- a/components/transfer/index.tsx +++ b/components/transfer/index.tsx @@ -66,8 +66,6 @@ const Transfer = defineComponent({ }), setup() { return { - selectedKeys: [], - targetKeys: [], separatedDataSource: null, configProvider: inject('configProvider', defaultConfigProvider), }; diff --git a/components/transfer/renderListBody.tsx b/components/transfer/renderListBody.tsx index fe6a4c375..a0ef4b450 100644 --- a/components/transfer/renderListBody.tsx +++ b/components/transfer/renderListBody.tsx @@ -101,11 +101,12 @@ const ListBody = defineComponent({ mounted ? `${prefixCls}-content-item-highlight` : '', { tag: 'ul', + class: `${prefixCls}-content`, onScroll: this.handleScroll, }, ); return ( - + {items} );