Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Module '"framework7-vue/bundle"' has no exported member 'registerComponents'

未关闭
#4,302 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
typescript, vite
领域
frontend

调研方向

复现 issue 中的 Vite TypeScript 设置,并检查 src/main.ts 以及 framework7-vue.d.ts 声明,其中报告缺少 registerComponents。确认文档中的 bundle import 与其类型定义一致,然后验证在没有 ignore 注释的情况下该 import 不会产生 TypeScript 错误。

由索引模型根据 Issue 内容生成。

描述

  • Framework7 version: 8.3.4
  • Vue.js version: 3.5.13
  • Platform and Target: [e.g. iOS 11 Cordova app, or Android 8 Chrome browser] Browser
  • Live Link or CodeSandbox: My own codesandbox based on my project - see src\main.ts
Describe the bug

A clear and concise description of what the bug is.

I created a clean Vue 3 project using vite, added Framework7 according to the docs - but it's giving me an import error, I checked the exported bundle and it seems registerComponents isn't exported - at least, not in the framework7-vue.d.ts as typing - which is giving errors in Typescript based projects.

To Reproduce

Steps to reproduce the behavior:

  1. Create a typescript based project with Vite
  2. Install Framework7-vue according to the docs
  3. See import error
Expected behavior

A clear and concise description of what you expected to happen.

No import error

Actual Behavior

Explain what is actually happening

Import error - needing to use comments to tell typescript to ignore the missing type

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Can be circumvented by adding a comment like below:

// @ts-expect-error registerComponents is missing from the typescript definition
主要语言
JavaScript
星标
18.8k
派生
3.2k
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

framework7io/framework7 的其他 Issue

查看 framework7io/framework7 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。