Coder Social home page Coder Social logo

vbenjs / vben-admin-thin-next Goto Github PK

View Code? Open in Web Editor NEW
2.0K 2.0K 865.0 11.57 MB

vue-vben-admin-2.0 mini template.vue3,vite,typescript

Home Page: https://vvbin.cn/thin/next

License: MIT License

Shell 0.05% JavaScript 3.19% TypeScript 48.22% HTML 0.34% Vue 44.02% Less 3.49% CSS 0.69%
template

vben-admin-thin-next's People

Contributors

anncwb avatar canvascat avatar chen-xt avatar et2012 avatar fengbindev avatar fuckdoctors avatar init-center avatar jiangmaniu avatar jinmao88 avatar jq002 avatar leocaan avatar littlecxm avatar liu-ya avatar liuwave avatar ljw-codeking avatar lzdjack avatar m69w avatar mikasa33 avatar miofly avatar mynetfan avatar noahlann avatar shinigami92 avatar troyzhxu avatar vben-admin avatar weilence avatar wellssu0 avatar wendell0316 avatar xiaoxian521 avatar ztw2010 avatar zuihou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vben-admin-thin-next's Issues

pnpm install 提示 ERR_PNPM_INVALID_OVERRIDE_SELECTOR  Cannot parse the "//" selector in the overrides

拉取代码后,安装依赖提示

pnpm install 提示 ERR_PNPM_INVALID_OVERRIDE_SELECTOR  Cannot parse the "//" selector in the overrides

fix

"resolutions": {
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
"bin-wrapper": "npm:bin-wrapper-china",
"rollup": "^2.56.3"
},

删除package.json 中的 //。一行

antd 的 Typography 组件的样式导入有问题

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.

  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)

  • 已在 Issues 中搜索了相关的关键词

  • 不是 ant design vue 组件库的 Bug

描述 Bug

请清晰地描述此 Bug 的具体表现。

views 中新增一个页面,使用 ant design vue 组件库中的 Typography 组件,yarn dev 开发时能够正常加载显示,但是 yarn preview 预览时提示报错,关键的错误信息如下:

[vite]: Rollup failed to resolve import ".../f/node_modules/ant-design-vue/es/typography-paragraph/style/index" from "src/views/sys/about/index.vue".
This is most likely unintended because it can break your application at runtime.

意思就是找不到 Typography 组件的样式。

复现 Bug

请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码

  1. 为了能够快速复现,修改原项目中的 About 页面即可,该文件路径为:src/views/sys/about/index.vue,页面内容修改如下:
<template>
  <div>
    <Typography>
      <TypographyTitle>测试排版</TypographyTitle>
      <TypographyParagraph>
        1.  中文文档地址为 vben-admin-doc,采用 Vitepress 开发。如发现文档有误,欢迎提 pr 帮助我们改进。 <br />
        2. 英文文档暂时没有时间来写,欢迎有时间的同学来帮忙写英文文档。 <br />
        3. 感谢作者开源!!!
      </TypographyParagraph>
    </Typography>
  </div>
</template>

<script language="ts" setup>
  import { Typography, TypographyParagraph, TypographyTitle } from 'ant-design-vue';
</script>
  1. 使用 yarn dev 开发观看页面正常,使用 yarn preview 打包预览就会报错。

傻瓜式解决 Bug

报错信息说就是找不到 Typography 组件的样式,于是我阅读了一下 ant design vue 关于该组件的代码,发现 TypographyTitle、TypographyParagraph、TypographyText 等等以 Typography 开头的组件其实均在共用一个 typography 样式文件,因此修改导入部分的代码,让它能够正确导入改组件的样式即可。

由于我不懂前端,就采用以下方式比较傻瓜式的针对性方案,临时解决了以上 bug,但是不具备通用性,因为不确定是否也有同样的组件出现类似情况。需要作者进行优化处理。

傻瓜式解决办法:
修改 build/vite/plugin/styleImport.ts 文件中导入组件样式的代码如下,大概从第 16 行开始:

export function configStyleImportPlugin(isBuild: boolean) {
  if (!isBuild) {
    return [];
  }
  const styleImportPlugin = styleImport({
    libs: [
      {
        libraryName: 'ant-design-vue',
        esModule: true,
        resolveStyle: (name) => {
+          // 处理 typography 组件
+          let new_name = name;
+          const name_list = name.split('-');
+          if (name_list[0] === 'typography') {
+            new_name = name_list[0];
+          }
+          return `ant-design-vue/es/${new_name}/style/index`;
        },
      },
    ],
  });
  return styleImportPlugin;
}

系统信息

  • 操作系统: Mac 11.5.2
  • Node 版本: 14.17.1
  • 包管理器 (npm/yarn/pnpm) 及其版本: 1.22.11
  • vben admin 版本:2.7.1
  • ant design vue 版本:2.2.6
  • vute 版本:2.5.0

作者辛苦了,开源不易,加油!!!

拉到本地后,运行yarn serve 报错。

(node:28344) UnhandledPromiseRejectionWarning: Error: [vite]: Rollup failed to resolve import "@vue/composition-api" from "node_modules\vue-demi\lib\v2\index.esm.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at onRollupWarning (E:\dengxj\vue\vben-test-001\node_modules\vite\dist\node\chunks\dep-6f99a5ef.js:40308:19)
at Object.onwarn (E:\dengxj\vue\vben-test-001\node_modules\vite\dist\node\chunks\dep-6f99a5ef.js:71042:17)
at Object.onwarn (E:\dengxj\vue\vben-test-001\node_modules\vite\node_modules\rollup\dist\shared\rollup.js:19541:20)
at ModuleLoader.handleResolveId (E:\dengxj\vue\vben-test-001\node_modules\vite\node_modules\rollup\dist\shared\rollup.js:18451:26)
at E:\dengxj\vue\vben-test-001\node_modules\vite\node_modules\rollup\dist\shared\rollup.js:18418:22
at async Promise.all (index 1)
at async ModuleLoader.fetchStaticDependencies (E:\dengxj\vue\vben-test-001\node_modules\vite\node_modules\rollup\dist\shared\rollup.js:18416:34)
at async Promise.all (index 0)
at async ModuleLoader.fetchModule (E:\dengxj\vue\vben-test-001\node_modules\vite\node_modules\rollup\dist\shared\rollup.js:18393:9)
at async Promise.all (index 0)
(Use node --trace-warnings ... to show where the warning was created)
(node:28344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:28344) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

ApiSelect组件,在选择的时候报错,但是不影响使用

Describe the bug

使用APISelect组件,我的formSchema如下:

{
          field: 'personId',
          component: 'ApiSelect',
          label: '人员名称',
          required: true,
          componentProps: {
            api:getAllUserItem,
            resultField:'items',
            labelField: 'realName',
            valueField: 'id',
            numberToString:true,
          }

在选择的时候,浏览器控制台会打印错误日志,但是不影响使用
image

Reproduction

很希望APISelect这个组件带有搜索功能

System Info

  • 浏览器Microsoft Edge:版本 92.0.902.62 (官方内部版本) (64 位)
    -vben-admin-thin-next:2.6.1

项目安装依赖报错

项目更新为2.8的版本,我本地 node 版本是 14.16.0,导致安装包失败?看报错需要升级node版本为16以上,是必须这么干吗?

更改主题色配置不生效

BUG描述

更改主题色配置不生效

环境信息:

  • 操作系统: Windows10
  • Node版本: 12.13.0
  • vbem-admin-thin-next:2.0.0-rc.17
  • vite-plugin-style-import版本: 0.4.6
  • ant-design-vue版本:2.0.0-rc.8

重现步骤

1: 更改build/config/lessModifyVars.ts文件

2: 启动项目发现主题色配置修改不生效

附加信息

去除按需加载css插件后,全量引入ant-design.less文件, 主题色配置会生效
可能是 vite-plugin-style-import中的esModule配置未生效?

vben-admin-thin-next 引入表格组件TableSetting设置勾选列报错

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

image
image

复现 Bug

暂未解决

系统信息

  • 操作系统:
  • Node 版本:
  • 包管理器 (npm/yarn/pnpm) 及其版本:

pnpm运行时报错

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

使用pnpm安装依赖后运行pnpm run dev打开项目异常

复现 Bug

  1. 运行pnpm i
  2. 安装缺失的@ant-design/colors @ant-design/icons-vue moment qs
  3. 运行pnpm dev
  4. 打开预览
  5. 会有报错提示

Snipaste_2021-09-27_17-10-20

系统信息

  • 操作系统: macos 11.6
  • Node 版本: v16.10.0
  • 包管理器 (npm/yarn/pnpm) 及其版本: pnpm 6.15.1

PS: 经筛查,更新vite版本至2.5.10后可解决

template下面多个标签tab页无法切换

Describe the bug

A clear and concise description of what the bug is..

Reproduction

template下面多个标签tab页无法切换且会导致所有的路由都无法加载,只有刷新页面才可以解决
类似于下面这种情况:
<template> <span>1</span> <span>2</span> </template>
即使很简单的标签也会出现该问题,经过测试再最新版@2.4.2中也会出现该问题

System Info

  • vben admin版本:2.3.0
  • Operating System: win10
  • Node version:v14.9.0
  • Package manager (npm/yarn/pnpm) and version:[email protected]

打包生产时报错

描述 Bug

[vite]: Rollup failed to resolve import "/Users/xxx/Documents/Vue/ant-design-vue/es/config-provider/style/index" from "src/App.vue?vue&type=script&setup=true&lang.ts". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.externalerror during build: Error: [vite]: Rollup failed to resolve import "/Users/xxx/Documents/Vue/ant-design-vue/es/config-provider/style/index" from "src/App.vue?vue&type=script&setup=true&lang.ts". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it tobuild.rollupOptions.external at onRollupWarning (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/[email protected]@vite/dist/node/chunks/dep-98dbe93b.js:52150:19) at onwarn (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/[email protected]@vite/dist/node/chunks/dep-98dbe93b.js:51935:13) at Object.onwarn (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/[email protected]@rollup/dist/shared/rollup.js:20515:13) at ModuleLoader.handleResolveId (/Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/[email protected]@rollup/dist/shared/rollup.js:19864:26) at /Users/xxx/Documents/Vue/ant-design-vue-vite-template/node_modules/[email protected]@rollup/dist/shared/rollup.js:19856:26 at processTicksAndRejections (internal/process/task_queues.js:93:5)
请清晰地描述此 Bug 的具体表现。

复现 Bug

请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码

系统信息

  • 操作系统: Mac OS
  • Node 版本: 14.15.1
  • 包管理器 (npm/yarn/pnpm) 及其版本: 6.14.9

项目运行问题

Vben Admin 2.0 精简版拉下来 通过“npm install"、”npm run serve“ 跟 ”yarn install“ 、 ”yarn serve" 都跑不起来

why eslint not work

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug

A clear and concise description of what the bug is..

eslint can not work, here is my screen shot

image

Reproduction

Please describe the steps of the problem in detail to ensure that we can restore the correct problem

just yarn and it just happened...

System Info

  • Operating System:mac
  • Node version: 12.6
  • Package manager (npm/yarn/pnpm) and version: yarn 1.19.2

Sync package.json with vue-vben-admin to fix yarn install error

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

Execute yarn install resulting in gifsicle pre-build test failed. See vbenjs/vue-vben-admin#1438 (comment) for detail.

Sync package.json with vue-vben-admin may fix this yarn install error

复现 Bug

Execute yarn install in terminal.

系统信息

  • 操作系统: Windows 10 1604 build 14393.2214 (x64)
  • Node 版本: v16.13.1
  • 包管理器 (npm/yarn/pnpm) 及其版本: yarn v1.22.11/v3.1.1

.env的配置是否用.development.env而非.env.development

Subject of the feature

Describe your issue here.

Problem

If the feature requests relates to a problem, please describe the problem you are trying to solve here.

Expected behaviour

What should happen? Please describe the desired behaviour.

Alternatives

What are the alternative solutions? Please describe what else you have considered?

2.7.1 打包报错

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

拉取 2.7.1 版本并解决冲突后,进行打包,控制台报错
image
随后我检查了报错部分的代码,发现是 src/views/sys/error-log/index.vue 文件中有导入 src/api/demo/error 文件的代码,而在 src/api/demo 目录下并不存在文件名为 error 开头的文件
image

复现 Bug

系统信息

  • 操作系统: macOS Big Sur(11.5.2)
  • Node 版本: v12.22.0
  • 包管理器 (npm/yarn/pnpm) 及其版本: yarn(1.22.11)

不打tag吗?

这个版本不跟admin一样打tag吗?这样如何知道怎么修改本地代码呢

TypeError: Cannot read property 'endsWith' of undefined

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug

删除yarn.lock文件yarn install安装依赖,运行yarn dev,vite无法启动,报错:
image

Reproduction

Please describe the steps of the problem in detail to ensure that we can restore the correct problem

System Info

  • Operating System:
  • Node version:
  • Package manager (npm/yarn/pnpm) and version:

打包后无法切换系统主题颜色,且a标签为黑色无主题颜色

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

打包后无法切换系统主题颜色,且a标签为黑色无主题颜色

a {
    color: inherit;
    text-decoration: inherit;
}

会覆盖a标签的颜色。
尝试在设置中清空缓存并返回登录页无效。

复现 Bug

下载最新版vben-admin-thin-next 2.8.0

yarn build 或 yarn preview

系统信息

  • 操作系统: Windows 10
  • Node 版本: 8.0.0
  • 包管理器 (npm/yarn/pnpm) 及其版本: yarn: 1.22.17
  • "ant-design-vue": "2.2.8",

Sync `stylelint.config.js` with `vue-vben-admin` to fix .vue file lint error

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

请清晰地描述此 Bug 的具体表现。

run yarn lint:stylelint resulting in:

src/App.vue
 10:12  ✖  Unknown word  CssSyntaxError

src/layouts/default/index.vue
 17:12  ✖  Unknown word  CssSyntaxError

src/layouts/iframe/index.vue
 13:12  ✖  Unknown word  CssSyntaxError

src/layouts/page/index.vue
 28:12  ✖  Unknown word  CssSyntaxError

<More error omitted>

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Applying fix in vbenjs/vue-vben-admin@c2b207d fix this issue

复现 Bug

run yarn lint:stylelint

系统信息

  • 操作系统: Windows 10 1604 build 14393.2214 (x64)
  • Node 版本: v16.13.1
  • 包管理器 (npm/yarn/pnpm) 及其版本: yarn v1.22.11/v3.1.1

proxy无效

.env.development文件配置如下

# Whether to open mock
VITE_USE_MOCK = false

# public path
VITE_PUBLIC_PATH = /
VITE_PROXY=[["/c","http://121.196.122.107:8090"]]

VITE_GLOB_API_URL=/c

进行http请求地址为项目地址:localhost:3001,而不是这里配置的/c地址。
http请求如下:

getList = (input: GetIdentityUsersInput) =>
    defHttp.get<PagedResultDto<IdentityUserDto>>({
      url: '/api/identity/users',
      params: {
        filter: input.filter,
        sorting: input.sorting,
        skipCount: input.skipCount,
        maxResultCount: input.maxResultCount,
      },
      headers: {
        ignoreCancelToken: true,
      },
    });

[bug]-BasicTable中设置了某列为edit=true后,设置rowKey的值会导致内存泄漏

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug

设置列属性名称为可编辑的,这个时候如果设置rowKey,会有bug

export function getBasicColumns(): BasicColumn[] {
  return [
    {
      title: 'ID',
      dataIndex: 'taskId',
      width: 200,
    },
    {
      title: '名称',
      dataIndex: 'taskName',
      edit: true,
      width: 200,
    },
    {
      title: '准确率',
      dataIndex: 'accuracy',
      width: 200,
    },
    {
      title: '开始时间',
      width: 300,
      dataIndex: 'startTs',
    },
    {
      title: '结束时间',
      width: 300,
      dataIndex: 'endTs',
    },
    {
      title: '状态',
      dataIndex: 'status',
    },
  ];
}

// setup
const [registerTable, { getSelectRowKeys, getSelectRows }] = useTable({
        title: '数据列表',
        columns: getBasicColumns(),
        bordered: true,
        dataSource: props.dataset,
        canResize: false,
        pagination: {
          total: props.total,
          defaultPageSize: props.pageSize,
        },
        showIndexColumn: false,
        rowKey: 'taskId',
        rowSelection: {
          type: 'checkbox',
        },
        actionColumn: {
          width: 250,
          title: '操作',
          dataIndex: 'action',
          slots: { customRender: 'action' },
        },
      });

image

Reproduction

Please describe the steps of the problem in detail to ensure that we can restore the correct problem

System Info

  • Operating System:
  • Node version:
  • Package manager (npm/yarn/pnpm) and version:

最新版本-设置按钮移动到了右上角

最新版本-设置按钮移动到了右上角。设置菜单里面 有个全屏内容,点击后直接全屏了,按了esc也无法恢复。但是由于一下子全屏,导致设置按钮也看不到了。

原来的情况是 设置按钮是 在右侧中间浮动的就不存在这个问题,建议解决!另外还是建议一个浮动设置按钮就行了,不能像其他admin后台似的 浮动菜单过多 都占用正常页面了

command not found

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

vben-admin:2.8.0
git clone https://github.com/anncwb/vben-admin-thin-next
yarn install
image

系统信息

  • 操作系统: macOS Big Sur 11.6.1
  • Node 版本: v16.13.0
  • 包管理器 (npm/yarn/pnpm) 及其版本: yarn 1.22.17

2.7.1打包报错

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 已阅读 文档.
  • 确保您的代码已是最新或者所报告的 Bug 在最新版本中可以重现. (部分 Bug 可能已经在最近的代码中修复)
  • 已在 Issues 中搜索了相关的关键词
  • 不是 ant design vue 组件库的 Bug

描述 Bug

打包时出现以下报错信息,与 #40 表现相似:
[vite]: Rollup failed to resolve import "F:/git/vben-admin-thin-next/node_modules/ant-design-vue/es/tab-pane/style/index" from "src\components\QuotaTree\src\QuotaTree.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build:
Error: [vite]: Rollup failed to resolve import "F:/git/vben-admin-thin-next/node_modules/ant-design-vue/es/tab-pane/style/index" from "src\components\QuotaTree\src\QuotaTree.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.

我的业务代码只写了一个QuotaTree组件,其中引用了ant-design-vue的Tabs组件,import语句为:
import { Tabs, TabPane, AutoComplete } from 'ant-design-vue';
猜测是自动引入相关css文件导致

复现 Bug

请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码

系统信息

  • 操作系统: Windows 11
  • Node 版本: 14.17.3
  • 包管理器 (npm/yarn/pnpm) 及其版本: yarn 1.22.5

`Button`组件

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug

Button 组件引入时会报警告,全局 AButton 没有这个问题

警告:
192.168.1.30-1634782917635.log

Reproduction

<template>
  <div class="p-4">
    <Button>123</Button>
    <GrowCard :loading="loading" class="enter-y" />
    <SiteAnalysis class="!my-4 enter-y" :loading="loading" />
    <div class="md:flex enter-y">
      <VisitRadar class="md:w-1/3 w-full" :loading="loading" />
      <VisitSource class="md:w-1/3 !md:mx-4 !md:my-0 !my-4 w-full" :loading="loading" />
      <SalesProductPie class="md:w-1/3 w-full" :loading="loading" />
    </div>
  </div>
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  import GrowCard from './components/GrowCard.vue';
  import SiteAnalysis from './components/SiteAnalysis.vue';
  import VisitSource from './components/VisitSource.vue';
  import VisitRadar from './components/VisitRadar.vue';
  import SalesProductPie from './components/SalesProductPie.vue';
  import { Button } from '/@/components/Button';
  const loading = ref(true);

  setTimeout(() => {
    loading.value = false;
  }, 1500);
</script>

System Info

  • Operating System: Windows
  • Node version: 14.17.0
  • Package manager (npm/yarn/pnpm) and version: yarn 1.22.5

您好,自建vue页面内容无法热更新是什么原因呢

我按照文档创建页面和路由,菜单可正常显示,但是新建页面的视图不更新,需要重启服务才会生效.。我尝试将自己写的代码拷贝至自带的关于页面发现没有这种问题。第一次接触该项目。望大佬看到能帮忙解惑

docker中部署后,启动卡在启动页面

描述 Bug

在docker中部署了代码,yarn dev后卡在启动页面,后台报如下错误

8:24:35 AM [vite] Internal server error: The service is no longer running
  Plugin: vite:esbuild
  File: /workspaces/vben-admin-thin-next-main/src/main.ts
      at /workspaces/vben-admin-thin-next-main/node_modules/esbuild/lib/main.js:1276:29
      at sendRequest (/workspaces/vben-admin-thin-next-main/node_modules/esbuild/lib/main.js:625:14)
      at start (/workspaces/vben-admin-thin-next-main/node_modules/esbuild/lib/main.js:1274:9)
      at Object.transform2 [as transform] (/workspaces/vben-admin-thin-next-main/node_modules/esbuild/lib/main.js:1324:5)
      at /workspaces/vben-admin-thin-next-main/node_modules/esbuild/lib/main.js:1920:55
      at new Promise (<anonymous>)
      at Object.transform (/workspaces/vben-admin-thin-next-main/node_modules/esbuild/lib/main.js:1920:14)
      at Object.transform (/workspaces/vben-admin-thin-next-main/node_modules/esbuild/lib/main.js:1751:62)
      at transformWithEsbuild (/workspaces/vben-admin-thin-next-main/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:22222:38)
      at async TransformContext.transform (/workspaces/vben-admin-thin-next-main/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:22271:32)
      at async Object.transform (/workspaces/vben-admin-thin-next-main/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:42396:30)
      at async doTransform (/workspaces/vben-admin-thin-next-main/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:56801:29) (x2)

系统信息

  • 操作系统:
    使用vscode插件remote-container创建的nodejs16+typescriptdocker环境
  • Node 版本: v16.13.0
  • 包管理器 (npm/yarn/pnpm) 及其版本: yarn(1.22.15), nom(8.1.0)

安装依赖问题

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug

感觉是依赖自己勇到的包有问题。
最开始拉的精简版本的包,vben2.7.0的版本,线上部署一段时间,本地打包也是正常,但是一段时间后线上部署出现问题,报错题图如下:
image
删除自己本地的依赖包重新安装就出错了,后面看了issue大概就是升级到2.8.0后就可以解决安装依赖的问题,但是我升级到2.8.0后又依然出现了类似错误:(每次出现的错误都是途中圈出的包内命令出错如gifsicle这个处理图片的包)
image

Reproduction

2.7.0精简版本的包,删除node_modules,重新安装依赖

System Info

  • Operating System: window10
  • Node version: 16.13.0
  • Package manager (npm/yarn/pnpm) and version: npm 8.1.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.