fix: some ts type error
parent
c52cc02e89
commit
bd1f42a5ef
|
@ -9,6 +9,7 @@ import {
|
||||||
ExtractPropTypes,
|
ExtractPropTypes,
|
||||||
onMounted,
|
onMounted,
|
||||||
onBeforeUnmount,
|
onBeforeUnmount,
|
||||||
|
Plugin,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import warning from '../_util/warning';
|
import warning from '../_util/warning';
|
||||||
import ResponsiveObserve, {
|
import ResponsiveObserve, {
|
||||||
|
|
|
@ -213,7 +213,7 @@ const components = [
|
||||||
|
|
||||||
const install = function(app: App) {
|
const install = function(app: App) {
|
||||||
components.forEach(component => {
|
components.forEach(component => {
|
||||||
app.use(component as typeof component & { install: () => void });
|
app.use(component);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.config.globalProperties.$message = message;
|
app.config.globalProperties.$message = message;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import interopDefault from '../_util/interopDefault';
|
||||||
import { ModalLocale, changeConfirmLocale } from '../modal/locale';
|
import { ModalLocale, changeConfirmLocale } from '../modal/locale';
|
||||||
import warning from '../_util/warning';
|
import warning from '../_util/warning';
|
||||||
import { getSlot } from '../_util/props-util';
|
import { getSlot } from '../_util/props-util';
|
||||||
|
import { withInstall } from '../_util/type';
|
||||||
export interface Locale {
|
export interface Locale {
|
||||||
locale: string;
|
locale: string;
|
||||||
Pagination?: Object;
|
Pagination?: Object;
|
||||||
|
@ -88,4 +89,4 @@ LocaleProvider.install = function(app: App) {
|
||||||
return app;
|
return app;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default LocaleProvider;
|
export default withInstall(LocaleProvider);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { App, defineComponent, ExtractPropTypes, inject } from 'vue';
|
import { App, defineComponent, ExtractPropTypes, inject, Plugin } from 'vue';
|
||||||
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
|
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
|
||||||
import CheckOutlined from '@ant-design/icons-vue/CheckOutlined';
|
import CheckOutlined from '@ant-design/icons-vue/CheckOutlined';
|
||||||
import PropTypes, { withUndefined } from '../_util/vue-types';
|
import PropTypes, { withUndefined } from '../_util/vue-types';
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { App, defineComponent, Plugin } from 'vue';
|
||||||
import T, { defaultTableProps } from './Table';
|
import T, { defaultTableProps } from './Table';
|
||||||
import Column from './Column';
|
import Column from './Column';
|
||||||
import ColumnGroup from './ColumnGroup';
|
import ColumnGroup from './ColumnGroup';
|
||||||
import {} from './interface';
|
|
||||||
import { getOptionProps, getKey, getPropsData, getSlot } from '../_util/props-util';
|
import { getOptionProps, getKey, getPropsData, getSlot } from '../_util/props-util';
|
||||||
|
|
||||||
const Table = defineComponent({
|
const Table = defineComponent({
|
||||||
|
|
|
@ -125,9 +125,7 @@ const SingleSelector = defineComponent<SelectorProps>({
|
||||||
{/* Display value */}
|
{/* Display value */}
|
||||||
{!combobox.value && item && !hasTextInput.value && (
|
{!combobox.value && item && !hasTextInput.value && (
|
||||||
<span class={`${prefixCls}-selection-item`} title={title.value}>
|
<span class={`${prefixCls}-selection-item`} title={title.value}>
|
||||||
<Fragment key={item.key || item.value}>
|
<Fragment key={item.key || item.value}>{item.label}</Fragment>
|
||||||
{item.label}
|
|
||||||
</Fragment>
|
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ const List = defineComponent({
|
||||||
const useVirtual = computed(() => {
|
const useVirtual = computed(() => {
|
||||||
const { height, itemHeight, virtual } = props;
|
const { height, itemHeight, virtual } = props;
|
||||||
return !!(virtual !== false && height && itemHeight);
|
return !!(virtual !== false && height && itemHeight);
|
||||||
})
|
});
|
||||||
const inVirtual = computed(() => {
|
const inVirtual = computed(() => {
|
||||||
const { height, itemHeight, data } = props;
|
const { height, itemHeight, data } = props;
|
||||||
return useVirtual.value && data && itemHeight * data.length > height;
|
return useVirtual.value && data && itemHeight * data.length > height;
|
||||||
|
@ -327,7 +327,7 @@ const List = defineComponent({
|
||||||
setInstance,
|
setInstance,
|
||||||
sharedConfig,
|
sharedConfig,
|
||||||
scrollBarRef,
|
scrollBarRef,
|
||||||
fillerInnerRef
|
fillerInnerRef,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
declare module 'component-classes';
|
declare module 'component-classes';
|
||||||
declare module '*vc-*';
|
|
||||||
declare module 'omit.js';
|
declare module 'omit.js';
|
||||||
|
|
||||||
declare module '*.json' {
|
declare module '*.json' {
|
||||||
|
|
Loading…
Reference in New Issue