refactor: remove global import

This commit is contained in:
vben
2021-01-18 23:37:36 +08:00
parent c2f6542b48
commit 6392b7f048
38 changed files with 256 additions and 162 deletions

View File

@@ -14,10 +14,12 @@
</div>
</template>
<script lang="ts">
import type { RouteLocationMatched } from 'vue-router';
import { defineComponent, ref, toRaw, watchEffect } from 'vue';
import { Breadcrumb } from 'ant-design-vue';
import { useI18n } from 'vue-i18n';
import type { RouteLocationMatched } from 'vue-router';
import { useRouter } from 'vue-router';
import { filter } from '/@/utils/helper/treeHelper';
import { REDIRECT_NAME } from '/@/router/constant';
@@ -35,7 +37,7 @@
export default defineComponent({
name: 'LayoutBreadcrumb',
components: { HomeOutlined, Icon },
components: { HomeOutlined, Icon, [Breadcrumb.name]: Breadcrumb },
props: {
theme: propTypes.oneOf(['dark', 'light']),
},

View File

@@ -34,8 +34,15 @@
import { defineComponent, PropType } from 'vue';
import { ListItem } from './data';
import { useDesign } from '/@/hooks/web/useDesign';
import { List, Avatar, Tag } from 'ant-design-vue';
export default defineComponent({
components: {
[Avatar.name]: Avatar,
[List.name]: List,
[List.Item.name]: List.Item,
AListItemMeta: List.Item.Meta,
[Tag.name]: Tag,
},
props: {
list: {
type: Array as PropType<ListItem[]>,