How to add meta in route #397
Replies: 11 comments
-
|
https://github.com/hannoeru/vite-plugin-pages#sfc-custom-block-for-route-data |
Beta Was this translation helpful? Give feedback.
-
i cant access isEdit from script in !! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Can you share a repo with repro ? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
@jbaubree can you help me please ? |
Beta Was this translation helpful? Give feedback.
-
|
I don't understand why you wan't to use route for this. You have isEdit in script and you can build your input types and submit button depending on isEdit or not. |
Beta Was this translation helpful? Give feedback.
-
|
You can use route meta to define if you need specific role or auth to show this page for example: // yourPage.vue // router.ts |
Beta Was this translation helpful? Give feedback.
-
|
ok this work, |
Beta Was this translation helpful? Give feedback.
-
|
your edit or add state does not need to be in route meta, or i do not understand why. Edit: you need to move this issue to discussion |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
meta: permission: parent: roles action: !expr > ${isEdit.value ? 'can_update' : 'can_view'} i cant access isEdit from <script>const isEdit = ref(false)</script> in route with vuejs. i Get value like this permission: {parent: 'roles', action: "${isEdit.value ? 'can_update' : 'can_view'}"}Reproduction
no repo
System Info
Used Package Manager
npm
Validations
Beta Was this translation helpful? Give feedback.
All reactions