yummygum / vue-flagpack Goto Github PK
View Code? Open in Web Editor NEWFlagpack contains 260+ easily implementable flag icons to use in your design or code project.
Home Page: https://flagpack.xyz
License: MIT License
Flagpack contains 260+ easily implementable flag icons to use in your design or code project.
Home Page: https://flagpack.xyz
License: MIT License
[deleted]
import { Flag } from 'vue-flagpack'
The Flag component gets exported and I am able to use it individually.
Flag
is undefined as it is not exported
Add an export for the flag in the module.exports
Import straight away
exampleI am trying to lazily load the flags in.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
Importing Flagpack as a plugin should work.
I get an error: Unexpected token '<'
.
This might be related with the SSR mode
SSR mode
, Node.js hosting
yarn add vue-flagpack
plugins/vue-flagpack.js
and paste Method A from the docsnuxt.config.js
like: plugins: ["~/plugins/vue-flagpack.js"]
See screenshot.
I'm trying to add flags to a lang switcher, based on @nuxtjs/i18n.
Component should set the flag size without showing Vue warnings
[Vue warn]: Invalid prop: custom validator check failed for prop "size"
The documentation shows "L', "M", "S" (all upper-case) as possible values for the size
prop, however the validator checks for lower-case letters:
Flag.vue: line 32
28: size: {
29: type: String,
30: default: 'm',
31: validator: value => (
32: ['s', 'm', 'l'].indexOf(value) !== -1
33: ),
34: }
There are two possible solutions:
validator
to accept upper-case letters as well, either by adding the upper-case letters to the array: ['s', 'm', 'l', 'S', 'M', 'L']
, or, by changing the input value to lower-case ['s', 'm', 'l'].indexOf(('' + value).toLowerCase())
<v-flag code="US" size="S" />
vue.runtime.esm.js?2b0e:619 [Vue warn]: Invalid prop: custom validator check failed for prop "size".
found in
---> <Flag>
<VForm>
<VCard>
<Pages/user/profile.vue> at pages/user/profile.vue
<Nuxt>
<VMain>
<VApp>
<Default> at layouts/default.vue
<Root>
Hi,
We are eager to work with the new version of flagpack core, main reason being the support for three shaking. Any chance changing the Vue library to support version 2.0 is on your roadmap?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.