Element: [Bug Report] The type definition of `$loading` conflicts with Nuxt.js $loading

Created on 7 Oct 2019  ·  16Comments  ·  Source: ElemeFE/element

Element UI version

2.12.0

OS/Browsers version

Any

Vue version

2.6.10

Reproduction Link

https://github.com/sirixdb/sirix-web-frontend

Steps to reproduce

  1. Clone the repository: git clone https://github.com/sirixdb/sirix-web-frontend.git
  2. npm run dev

What is Expected?

Start without an exception.

What is actually happening?

TS2430: Interface 'NuxtApp' incorrectly extends interface 'Vue'.
Types of property '$loading' are incompatible.
Property 'open' is missing in type 'NuxtLoading' but required in type '{ open: (params: LoadingConfig) => { close: () => any; }; }'.

stale

Most helpful comment

Same here! Can't find my way around this!

EDIT

For better comprehension of the error and reference:

Screen Shot 2019-10-15 at 10 46 04 PM

Using Nuxt 2.0.0 and all Typescript suite

All 16 comments

I second this

This is quite a serious issue, you basically can't use Element with Nuxt and Typescript...

Yes, basically as I'm just starting with the front-end I'm thinking about switching to another UI-framework. Don't think this will be fixed somehow in the near future :(

Same here! Can't find my way around this!

EDIT

For better comprehension of the error and reference:

Screen Shot 2019-10-15 at 10 46 04 PM

Using Nuxt 2.0.0 and all Typescript suite

Yes, basically as I'm just starting with the front-end I'm thinking about switching to another UI-framework. Don't think this will be fixed somehow in the near future :(

Same here, I need to quickly move forward, I switched to Element from Vuetify. Considering switching back!

I also consider to switch / maybe everyone using Nuxt currently in conjunction with Element-UI...

Interesting thread @JohannesLichtenberger here.

Nuxt will migrate to $progress instead of $loading in Nuxt 3.0 (doesn't solve immediate issue).

In the meantime... Sweeping the dust under the rug (By P-de-jong).

Change your tsconfig.json:

"compilerOptions": {
    "skipLibCheck": true
}

Yeah, but that's also only a workaround, but well...

Because I needed skipLibCheck to false, I used the following :
tsconfig.json :

"paths": {
    "element-ui": [".sink.d.ts"] // empty file
}

Cast @island205, please reply guys! Please don’t abandon element-ui, people need it.

I have the impression, that it's not really maintained at the moment!? At least also the commits are missing it seems...

@JohannesLichtenberger it’s unclear for me as well. Mostly they ignore issues and PRs and just push commits about once a month. State of framework is unclear. But despite minor bugs, it’s one of best frameworks I ever saw for vue. I think if it will be abandoned, it could be forked and supported by other people.

We use it in our startup project without major issues, except very buggy nav menu that I managed to patch.

Oh okay, I'm very new to the frontend world in general, but I've heard, that also Boostrap.js and the other UI-frameworks are used a lot!? That said, yes... I guess as it has over 40000 stars, it's simply going to be forked. At least it seems strange that such a big framework is not really maintained judging the commits and PRs and so on...

@JohannesLichtenberger element is best ui framework imo. Only not well maintained and doesn’t have responsive design. I have thoughts on forking it and fixing some of it bugs, because developers seems to be unavailable even for PRs. The other frameworks such as quasar or vuetify based on material design, which isn’t good for desktop IMO.

Bootstrap doesn’t have many things element have, such as multiple components for different data. Bootstrap good only for landing pages or if you want to create own components. Just compare what it provides with element.

As matter of fact, I've been using Vuetify for a quite a few projects and was very happy about it. Only thing as mentioned previously, is that look and feel is more suitable for desktop.

You can style override styles easily, it offers awesome responsive, spacing helpers classes, full components library. You can build whatever you want in no time with very decent look and feel.

I chose Element because of its simplicity and nice looking, disappointed by the lack of support tho. I'll switch back to Vuetify.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings