Qwik-react日历插件’@aldabil/react-scheduler’显示但不可用:如何进行故障排除?

huangapple go评论76阅读模式
英文:

Qwik-react calendar plugin '@aldabil/react-scheduler' showing but not functional: How to troubleshoot?

问题

Qwik-react Scheduler未能正常工作。
我尝试在我的qwik应用中使用qwik-react使用“@aldabil/react-scheduler” react插件,但我遇到了这个错误。日历显示出来了,但功能无法正常工作,比如当我点击单元格时,什么都不会发生。

错误:未找到命名导出“Scheduler”。所请求的模块“@aldabil/react-scheduler”是一个CommonJS模块,可能不支持所有模块导出为命名导出。
CommonJS模块可以始终通过默认导出导入

Qwik-react日历插件’@aldabil/react-scheduler’显示但不可用:如何进行故障排除?

Qwik-react日历插件’@aldabil/react-scheduler’显示但不可用:如何进行故障排除?

我期望能在qwik-react应用中运行“@aldabil/react-scheduler”。

英文:

Qwik-react Scheduler not working.
I was trying to use the "@aldabil/react-scheduler" react plugin in my qwik app using qwik-react but I got this error. the calendar is showing but the functionality is not working like when I cliked the cell there's nothing happen there.

Error: Named export 'Scheduler' not found. The requested module '@aldabil/react-scheduler' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export

Qwik-react日历插件’@aldabil/react-scheduler’显示但不可用:如何进行故障排除?

Qwik-react日历插件’@aldabil/react-scheduler’显示但不可用:如何进行故障排除?

I was expecting to make the "@aldabil/react-scheduler" running in qwik-react application

答案1

得分: 1

你可以以这种方式导入React组件来解决你的问题。

这段代码在开发和预览模式下工作。

/** @jsxImportSource react */

import { qwikify$ } from '@builder.io/qwik-react';
import AldabilReactScheduler, { Scheduler } from '@aldabil/react-scheduler';

export const MyScheduler = qwikify$(import.meta.env.DEV ? Scheduler : AldabilReactScheduler.Scheduler, { eagerness: 'hover' });
英文:

You can import the React component in this way to solve your issue.</br>
This code works in dev and preview mode

/** @jsxImportSource react */

import { qwikify$ } from &#39;@builder.io/qwik-react&#39;;
import AldabilReactScheduler, {Scheduler} from &#39;@aldabil/react-scheduler&#39;;

export const MyScheduler = qwikify$(import.meta.env.DEV ? Scheduler: AldabilReactScheduler.Scheduler, { eagerness: &#39;hover&#39; });

huangapple
  • 本文由 发表于 2023年5月28日 15:23:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76350390.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定