Skip to content

Commit bd1f42a

Browse files
committed
fix: some ts type error
1 parent c52cc02 commit bd1f42a

File tree

9 files changed

+11
-13
lines changed

9 files changed

+11
-13
lines changed

components/descriptions/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
ExtractPropTypes,
1010
onMounted,
1111
onBeforeUnmount,
12+
Plugin,
1213
} from 'vue';
1314
import warning from '../_util/warning';
1415
import ResponsiveObserve, {

components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ const components = [
213213

214214
const install = function(app: App) {
215215
components.forEach(component => {
216-
app.use(component as typeof component & { install: () => void });
216+
app.use(component);
217217
});
218218

219219
app.config.globalProperties.$message = message;

components/locale-provider/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import interopDefault from '../_util/interopDefault';
55
import { ModalLocale, changeConfirmLocale } from '../modal/locale';
66
import warning from '../_util/warning';
77
import { getSlot } from '../_util/props-util';
8+
import { withInstall } from '../_util/type';
89
export interface Locale {
910
locale: string;
1011
Pagination?: Object;
@@ -88,4 +89,4 @@ LocaleProvider.install = function(app: App) {
8889
return app;
8990
};
9091

91-
export default LocaleProvider;
92+
export default withInstall(LocaleProvider);

components/steps/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { App, defineComponent, ExtractPropTypes, inject } from 'vue';
1+
import { App, defineComponent, ExtractPropTypes, inject, Plugin } from 'vue';
22
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
33
import CheckOutlined from '@ant-design/icons-vue/CheckOutlined';
44
import PropTypes, { withUndefined } from '../_util/vue-types';

components/table/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { App, defineComponent, Plugin } from 'vue';
22
import T, { defaultTableProps } from './Table';
33
import Column from './Column';
44
import ColumnGroup from './ColumnGroup';
5-
import {} from './interface';
65
import { getOptionProps, getKey, getPropsData, getSlot } from '../_util/props-util';
76

87
const Table = defineComponent({

components/vc-select/Selector/SingleSelector.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ const SingleSelector = defineComponent<SelectorProps>({
125125
{/* Display value */}
126126
{!combobox.value && item && !hasTextInput.value && (
127127
<span class={`${prefixCls}-selection-item`} title={title.value}>
128-
<Fragment key={item.key || item.value}>
129-
{item.label}
130-
</Fragment>
128+
<Fragment key={item.key || item.value}>{item.label}</Fragment>
131129
</span>
132130
)}
133131

components/vc-virtual-list/List.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ const List = defineComponent({
8484
},
8585
setup(props) {
8686
// ================================= MISC =================================
87-
const useVirtual = computed(()=>{
87+
const useVirtual = computed(() => {
8888
const { height, itemHeight, virtual } = props;
8989
return !!(virtual !== false && height && itemHeight);
90-
})
90+
});
9191
const inVirtual = computed(() => {
9292
const { height, itemHeight, data } = props;
9393
return useVirtual.value && data && itemHeight * data.length > height;
@@ -144,7 +144,7 @@ const List = defineComponent({
144144
};
145145
}
146146

147-
// Always use virtual scroll bar in avoid shaking
147+
// Always use virtual scroll bar in avoid shaking
148148
if (!inVirtual.value) {
149149
return {
150150
scrollHeight: fillerInnerRef.value?.offsetHeight || 0,
@@ -327,7 +327,7 @@ const List = defineComponent({
327327
setInstance,
328328
sharedConfig,
329329
scrollBarRef,
330-
fillerInnerRef
330+
fillerInnerRef,
331331
};
332332
},
333333
render() {

components/vc-virtual-list/ScrollBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export default defineComponent({
184184
return ptg * enableHeightRange;
185185
},
186186
// Not show scrollbar when height is large thane scrollHeight
187-
getVisible () {
187+
getVisible() {
188188
const { visible } = this.state;
189189
const { height, scrollHeight } = this.$props;
190190

typings/custom-typings.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
declare module 'component-classes';
2-
declare module '*vc-*';
32
declare module 'omit.js';
43

54
declare module '*.json' {

0 commit comments

Comments
 (0)