Skip to content

Commit

Permalink
refactor: 基础组件用新的vue类型语法重写
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Jun 6, 2023
1 parent 872447c commit bb8bf4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/meDialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>
<script lang="ts">
import { ElDialog } from 'element-plus';
import { ComponentOptionsMixin, ExtractPropTypes, Ref } from 'vue';
import { ComponentOptionsMixin, ExtractPublicPropTypes, Ref } from 'vue';
import minMax from './hooks/minMax';
const props = {
full: {
Expand All @@ -20,7 +20,7 @@ const props = {
},
};
export default defineComponent<
ComponentProps<typeof ElDialog> & Partial<ExtractPropTypes<typeof props>>,
ComponentProps<typeof ElDialog> & ExtractPublicPropTypes<typeof props>,
{
elDialogRef: Ref<InstanceType<typeof ElDialog> | undefined>;
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/meTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<script lang="ts">
import pagination from './components/pagination.vue';
import { ElTable } from 'element-plus';
import { ComponentCustomProperties, ComponentOptionsMixin, ExtractPropTypes, PropType, Ref } from 'vue';
import { ComponentCustomProperties, ComponentOptionsMixin, ExtractPublicPropTypes, PropType, Ref } from 'vue';
import customColumn from './hooks/customColumn';
import exportTable from './hooks/exportTable';
import printTable from './hooks/print';
Expand Down Expand Up @@ -145,7 +145,7 @@ const emits = ['quickSearch', 'refresh', 'add', 'update:quickSearch'] as unknown
['update:quickSearch']: (searchText: string) => void;
};
export default defineComponent<
ComponentProps<typeof ElTable> & Partial<ExtractPropTypes<typeof props>>,
ComponentProps<typeof ElTable> & ExtractPublicPropTypes<typeof props>,
{
elTableRef: Ref<ELTableInstance | undefined>;
customColumnProps: Ref<ReturnType<typeof customColumn> | undefined>;
Expand Down
8 changes: 4 additions & 4 deletions src/components/meVxeTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<script lang="ts">
import './install';
import pagination from './components/pagination.vue';
import { ComponentCustomProperties, ComponentOptionsMixin, ExtractPropTypes, PropType, Ref } from 'vue';
import { ComponentCustomProperties, ComponentOptionsMixin, ExtractPublicPropTypes, PropType, Ref } from 'vue';
import {
VXEComponent,
VxeTableDefines,
Expand All @@ -105,7 +105,7 @@ import {
} from 'vxe-table';
import { debounce } from 'lodash-es';
const props = {
meClass: [String, Array as PropType<string[]>],
meClass: [String, Array] as PropType<string[] | string>,
name: {
type: String,
default: 'meVxeTable',
Expand All @@ -126,7 +126,7 @@ const props = {
],
},
print: {
type: [Object as PropType<VxeTablePropTypes.PrintConfig>, Boolean],
type: [Object, Boolean] as PropType<VxeTablePropTypes.PrintConfig | boolean>,
default: () => ({}),
},
customColumn: {
Expand Down Expand Up @@ -155,7 +155,7 @@ const emits = ['quickSearch', 'refresh', 'add', 'update:quickSearch'] as unknown
['update:quickSearch']: (searchText: string) => void;
};
export default defineComponent<
ComponentProps<VXEComponent<VxeTableProps, VxeTableEventProps>> & Partial<ExtractPropTypes<typeof props>>,
ComponentProps<VXEComponent<VxeTableProps, VxeTableEventProps>> & ExtractPublicPropTypes<typeof props>,
{ vxeTableRef: Ref<VxeTableInstance | undefined> },
Record<string, any>,
Record<string, any>,
Expand Down

0 comments on commit bb8bf4d

Please sign in to comment.