3 ms·
edit: Disregard, this is wrong. ----- I agree with the rest, but how do you use imported TS enums in your template? Something like this being impossible is re
by Semaphor 4y ago
edit: Disregard, this is wrong.
-----
I agree with the rest, but how do you use imported TS enums in your template? Something like this being impossible is regularly a pain point for me:
slotProps.data.type === ArticleTypes.SomeType
- Pokerkoffer 4y agoStore a reference to the enum locally then you can use it in templates
- deleted 4y ago[deleted]
- trinovantes 4y ago`ArticleTypes` should be automatically available in the template just from importing it if you use script setup Otherwise you also need to return it in the setup function (composition) or store a local copy of it in the data field (options)
- Semaphor 4y agoIt… does. Now I wonder if this was not in 3 from the beginning, or if I simply always assumed this behavior was the same after upgrading from Vue2. Wow. Thanks.