nuxt-community / nuxt-property-decorator

Property decorators for Nuxt (base on vue-property-decorator)
https://github.com/kaorun343/vue-property-decorator
MIT License
399 stars 34 forks source link

layout does not work #40

Closed oppianmatt closed 4 years ago

oppianmatt commented 5 years ago

https://codesandbox.io/s/py6rwml0jq?fontsize=14&module=%2Fpages%2Ftwo.vue

specifying the layout as a string, method, etc all doesn't work and always uses the default layout, only object based specification works

there is this issue that was closed https://github.com/nuxt-community/nuxt-property-decorator/issues/14

amritk commented 5 years ago

I am experiencing this bug as well, but only with the error page(layout)

skyrpex commented 5 years ago

Looks like it's working on the provided link. It also works in my project.

amritk commented 5 years ago

Yea it works in the link, but it seems to only be broken when trying to set the layout of an error page using the class structure.

amritk commented 5 years ago

Try this https://codesandbox.io/embed/7zl9q0w470 and trigger the error page by hitting a route which doesn't exist

husayt commented 5 years ago

It works for me. Am I missing something?

amritk commented 5 years ago

@husayt did you try my codesandbox? https://codesandbox.io/embed/7zl9q0w470

husayt commented 5 years ago

Yes, but I couldn't notice any problem with that.

On Wed, 5 Jun 2019, 20:07 Amrit Kahlon, notifications@github.com wrote:

@husayt https://github.com/husayt did you try my codesandbox? https://codesandbox.io/embed/7zl9q0w470

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nuxt-community/nuxt-property-decorator/issues/40?email_source=notifications&email_token=AAI5PLGNB2Q7POLDEH43DDDPZAFGHA5CNFSM4HE7V44KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXAWWZQ#issuecomment-499215206, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI5PLAE6KM6WR4XQWE4TTTPZAFGHANCNFSM4HE7V44A .

amritk commented 5 years ago

Type in a route which does not exist to see the error page, you will see that it uses the default layout, instead of the "second" layout which is specified in the error component.

husayt commented 4 years ago

Try latest nuxt. This seems like the same issue https://github.com/nuxt/nuxt.js/pull/6479