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