Vue-form-generator: Switch styling doesn't work

Created on 30 Aug 2017  路  5Comments  路  Source: vue-generators/vue-form-generator

I was trying to get the switch field working correctly. It renders as a normal checkbox and only had the correct styling after I included the css file referenced on the jsfiddle demo

Most helpful comment

I think the problem stems from the documentation, which never explicitly states that you need to import the CSS for the non-core package. I created a PR for this, @lionel-bijaoui and @GreymondTheLong, hope that helps!

https://github.com/icebob/vue-form-generator/pull/305

All 5 comments

Could you make a jsfiddle?

I modified the original jsfiddle and removed the css file.

https://jsfiddle.net/gfg3Lmw4/

For anyone else who is having this issue, here is how I was able to resolve it in my src/main.js:

import "vue-form-generator/dist/vfg.css";

I'm sorry but I don't understand where is the problem.
If you remove the style, of course it will not be styled.
It fallback to checkbox but still work as intended.
Like @ekingery said, if you want the style, you need to import it.

I think the problem stems from the documentation, which never explicitly states that you need to import the CSS for the non-core package. I created a PR for this, @lionel-bijaoui and @GreymondTheLong, hope that helps!

https://github.com/icebob/vue-form-generator/pull/305

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sjordan1975 picture sjordan1975  路  5Comments

kiankji picture kiankji  路  4Comments

icetee picture icetee  路  4Comments

Stephen9s picture Stephen9s  路  4Comments

miseeger picture miseeger  路  4Comments