Comments (5)
Sooo what stops you from including just a component again? Seems to pretty much work for everyone else 🤔
Try vue-js-toggle-button/src/Button
from vue-js-toggle-button.
@euvl Thanks for the great component. Probably this is more just a documentation issue. Most Vue component packages export a component by default not a plugin although the plugin is very nice. I think this could be solved by just adding a second short paragraph or sentence showing how to import it as a component since that is what many are used to. It wasn't hard but I did need to look in the source to find the path because it wasn't documented.
from vue-js-toggle-button.
If I ref the raw component from src it fails to build with cannot parse <template>
. I'm not sure exactly what's different about my build setup as I use .vue files for SFC like anyone else, but I'm working on an older app that uses gulp + browserify rather than web pack, and I assume there's some config difference that causes the problem.
In any case I've had no trouble importing various vue components (like vuedraggable
) etc. when they export a component and I can just import that, but the plugin thing just doesn't take.
I worked around it by just copying the source into my local assets and importing the component from there, but that's not as nice as being able to use the NPM package.
But, my build issues aside, I would guess that many people would rather import the component and declare it in their own components rather than have a global component declared via plugin install. /shrug Maybe just me though.
from vue-js-toggle-button.
Made a pull request #66 to document importing component directly.
from vue-js-toggle-button.
Hey @aldencolerain , thanks a lot for your PR. Merged 👍
from vue-js-toggle-button.
Related Issues (20)
- Request: Remove scoped attribute on <style> HOT 2
- how to use rtl? HOT 2
- Toggle is not visually focusable
- Focus for accessibility HOT 2
- No animation when sync is true HOT 1
- Toggle button stuck on switch HOT 2
- The button doesn't switch with Vuex HOT 1
- reverse button switch state HOT 1
- text color & padding between text and swticher
- Display both labels
- How can i use this with the cdn inside the simple Html website? HOT 4
- toggle is not very sensitive,click is better
- Support font-size property
- Project Abandoned HOT 1
- Add loading/busy flag to show spinner inside toggle
- Css Issue
- Images /Icons as labels HOT 1
- Not able to test using jest HOT 1
- Can not custom font-weight of labels
- Vue3 support solution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-js-toggle-button.