bem / bem-components Goto Github PK
View Code? Open in Web Editor NEWSet of components for sites development
Home Page: https://bem.info/libraries/classic/bem-components/6.0.0/
License: Other
Set of components for sites development
Home Page: https://bem.info/libraries/classic/bem-components/6.0.0/
License: Other
For example we can use BEM.declMix
.
cc @dfilatov
cc @deepsweet
Simplify BEMJSON and JS API for button
block.
cc @dfilatov
Based on #158
See bem/bem-core#188 for details
В bemhtml.js раскрывается как this.mods.only - icon и bem make падает с ошибкой icon is not defined.
bem -v
0.5.24
In case of simple content
like content: { elem: 'control' }
we can treat empty content
as { elem: 'control' }
.
Here is "patch":
block input, content, !this.ctx.content: { elem: 'control' }
Так не выставляется:
{
block: 'radio-button',
content: {
elem: 'radio',
content: 'abc'
}
}
Так выставляется:
{
block: 'radio-button',
content: [{
elem: 'radio',
content: 'abc'
}]
}
{ block: 'input', mods: { size: 's' }, name: 'my-name', value: {
block: 'i-bem', elem: 'i18n',
keyset: 'my-keyset', key: 'my-key'
}, content: { elem: 'input' } }
Remove: __sample, __samples, _has-sample
If we try to commit some BEM-item with tests, we should run it in precommit hook.
We can use configs like in bem-core
.
cc @dfilatov
Simplify BEMJSON and JS API for attach
block.
cc @dfilatov
cc @mishanga
Стоит хотя бы одному блоку link поставить js: true, все остальные ссылки тоже подключают js, и как следствие не работает дефолтный переход по href. Наверное стоит убрать js в модификатор pseudo как было в bem-bl
IE меньше 9 ругается на true, должно быть строка или число.
beforeSetMod : {
'focused' : {
true : function() {
return !this.hasMod('disabled');
}
}
}
if you want to know your form has any changes its easy to subscribe to it like this:
this.bindTo(this.domElem, 'change', function(e) { // this.domElem is form
this.trigger('change');
});
as you know dom elems, like input trigger it's change only on blur, bem inputs has cool mechanism to solve that problem.
so my advice is to add this.elem('control').change(); after this bem change trigger: https://github.com/bem/bem-components/blob/v1/common.blocks/input/input.js#L71
According to this issue in jetbrains issue tracker, it's better to use
/**
* @class Button
* @extends BEM.DOM
*/
BEM.DOM.decl('button', /** @lends Button */ {
// Button code
}, /** @static Button */{
//static Button methods
}
then @namespace, like now.
I can make a pull request with changes in jsdoc, if you agree.
We already can use block_mod
everywhere except i-bem.js and BEMHTML.
Simplify BEMJSON and JS API for input
block.
cc @dfilatov
Research the possibility and do it if we can.
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.