Comments (4)
Version 1.2.0 now falls back to the components name
in case the defined blockSource
is not available.
from vue-bem.
Sorry @monachilada, I did not see that you added a ticket... A blockSource setting is already available, but looks like I forgot to document it.
By fallback do you mean per component or on global scope? On global it should already wokr. If you donโt define a value in your options it will usethe โnameโ fallback.
from vue-bem.
Yes, I figured out the blockSource setting from digging through the code. But it's not quite what I meant. Let's say I'm doing something like this globally:
import vueBem from '@verstaerker/vue-bem';
Vue.use(vueBem, {
blockSource: 'blockName',
});
If I set blockName: 'blah'
in my component, I'm all good. But if it's not defined, I'd love it to fallback to name
as normal.
Use case: 90% of my components will have the same block name as the component name, however one or two should be simplified.
For example I would like the block name for a component called 'base-button'
to simply be 'button'
.
from vue-bem.
@monachilada Thank you for the feedback. I think this could be a common case for some developers. I will give it some additional thought. Adding a simple name
fallback would be easy.
from vue-bem.
Related Issues (7)
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-bem.