https://github.com/ntohq/buefy-next?tab = readme-ov-file#2-import-and-use-buefy
,安装了buefy-next
"buefy": "npm:@ntohq/buefy-next@^0.1.2",
import Buefy from 'buefy'
import 'buefy/dist/buefy.css';
import {BuefyConfig} from "buefy/types/components";
const config: BuefyConfig = {
defaultLocale: 'en',
};
const app = createApp(App);
app.use(Buefy, config);
在此之后出现以下错误
Overload 1 of 2, '(plugin: Plugin<[BuefyConfig]>, options_0: BuefyConfig): App<Element>', gave the following error.
Argument of type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to parameter of type 'Plugin<[BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type 'FunctionPlugin<[BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type '(app: App<any>, options_0: BuefyConfig) => any'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' provides no match for the signature '(app: App<any>, options_0: BuefyConfig): any'.
Overload 2 of 2, '(plugin: Plugin<[config: BuefyConfig]>, options: [config: BuefyConfig]): App<Element>', gave the following error.
Argument of type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to parameter of type 'Plugin<[config: BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type 'FunctionPlugin<[config: BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type '(app: App<any>, config: BuefyConfig) => any'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' provides no match for the signature '(app: App<any>, config: BuefyConfig): any'.
34 | defaultLocale: 'en',
35 | };
> 36 | app.use(Buefy, config);
|
^^^^^
请指导我,我在做什么错。
提前感谢您可以解决这个问题吗?看起来它不喜欢配置参数。 buefy-next readme不包括将配置对象传递到app.use