Skip to content

🧐[问题]顶部导航自动导入功能怎么关闭 #134

@unfetteredman2020

Description

@unfetteredman2020

🧐 问题描述

下载安装了插件后, 每一个组件的上面都有这个自动导入的模块,这个是怎么配置的, 没找到如果关闭或者开启的配置项,希望大佬可以说明一下

💻 示例代码

这个是配置文件.dumirc.ts

import { defineConfig } from 'dumi';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));

export default defineConfig({
  title: 'DesktopKit',
  sitemap: { hostname: 'https://procomponents.ant.design' },
  alias: {
    '@ant-design/pro-components': path.resolve(dirname, 'src'),
  },
  conventionRoutes: {
    // to avoid generate routes for .dumi/pages/index/components/xx
    exclude: [/index\/components\//],
  },
  metas: [
    {
      property: 'og:site_name',
      content: 'DesktopKit',
    },
    {
      'data-rh': 'keywords',
      property: 'og:image',
      content: 'https://procomponents.ant.design/icon.png',
    },
    {
      property: 'og:description',
      content: '🏆 让中后台开发更简单',
    },
    {
      name: 'keywords',
      content: '中后台,admin,Ant Design,ant design,Table,react,alibaba',
    },
    {
      name: 'description',
      content: '🏆 让中后台开发更简单 包含 table form 等多个组件。',
    },
    {
      name: 'apple-mobile-web-app-capable',
      content: 'yes',
    },
    {
      name: 'apple-mobile-web-app-status-bar-style',
      content: 'black-translucent',
    },
    {
      name: 'theme-color',
      content: '#1890ff',
    },
    {
      name: 'google-site-verification',
      content: '9LDp--DeEC-xOggsHl_t1MlR_1_2O972JpSUu8NZKMU',
    },
  ],
  hash: true,
  mfsu: false,
  analytics: {
    ga_v2: 'G-RMBLDHGL1N',
  },
  favicons: [
    'https://gw.alipayobjects.com/zos/rmsportal/rlpTLlbMzTNYuZGGCVYM.png',
  ],
   resolve: {
    // docDirs: [{ type: 'doc', dir: 'docs' }],
    atomDirs: [{ type: 'component', dir: 'src/packages' }],
    codeBlockMode: 'passive',
  },
  styles: [`.markdown table{table-layout: fixed;}`],
  locales: [
    { id: 'zh-CN', name: '中文' },
    { id: 'en-US', name: 'English' },
  ],
  // ssr: {},
  themeConfig: {
    showImport: false,
    name: 'DesktopKit',
    logo: 'https://gw.alipayobjects.com/zos/antfincdn/upvrAjAPQX/Logo_Tech%252520UI.svg',
    socialLinks: {
      github: 'https://github.com/ant-design/pro-components',
    },
    lastUpdated: true,
    hero: {
      title: '',
      description: '🏆 让中后台开发更简单',
      actions: {
        text: '🏮🏮 快速开始 →',
        link: '/docs/intro',
      },
    },

    hash: true,
    ignoreMomentLocale: true,
    features: [
      {
        image:
          'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/q48YQ5X4ytAAAAAAAAAAAAAAFl94AQBr',
        title: '简单易用',
        description: '在 Ant Design 上进行了自己的封装,更加易用',
      },
      {
        image:
          'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
        title: 'Ant Design',
        description: '与 Ant Design 设计体系一脉相承,无缝对接 Ant Design 项目',
      },
      {
        image:
          'https://gw.alipayobjects.com/zos/antfincdn/Eb8IHpb9jE/Typescript_logo_2020.svg',
        title: 'TypeScript',
        description:
          '使用 TypeScript 开发,提供完整的类型定义文件,无需频繁打开官网',
      },
    ],
    nav: {
      'zh-CN': [
        { title: '文档', link: '/docs' },
        { title: '组件', link: '/components/overview' },
        { title: 'Changelog', link: '/changelog' },
        { title: 'Playground', link: '/playground' },
      ],
      'en-US': [
        { title: 'Docs', link: '/en-US/docs' },
        { title: 'Components', link: '/en-US/components' },
        { title: 'Changelog', link: '/en-US/changelog' },
        { title: 'Playground', link: '/en-US/playground' },
      ],
    },
    // sidebar: {
    //   '/components': [
    //     {
    //       title: '',
    //       children: [
    //         {
    //           title: 'Components - 组件总览',
    //           link: '/components',
    //         },
    //         {
    //           title: 'AceEditor - 代码编辑器',
    //           link: '/components/ace-editor',
    //         },
    //       ],
    //     },
    //   ],
    // },
    navs: {
      'en-US': [
        null,
        {
          title: 'GitHub',
          path: 'https://github.com/ant-design/pro-components',
        },
      ],
      'zh-CN': [
        null,
        {
          title: 'GitHub',
          path: 'https://github.com/ant-design/pro-components',
        },
      ],
    },
  },
});

🚑 其他信息

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions