This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--save - production dependency | |
--save-dev - development dependency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Вопрос: Можно ли во Vue.js использовать несколько экземпляров ( instance )? | |
Ответ: Да. Во Vue.js можно использовать сколько угодно экземпляров ( instance ). Под каждый instance создается точка монтирования. | |
Например, так: | |
<div id="app1"></div> | |
<div id="app2"></div> | |
new Vue({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Связка v-if + v-else требует не только того, чтобы блок с v-else располагался непосредственно после блока с директивой v-if. Данная связка также требует однотипности блоков. | |
То есть, блок с директивой v-if и блок с директивой v-else должны иметь один тип - div, section, article и так далее. | |
Например: | |
<section v-if="check"></section> | |
<section v-else></section> | |
<div v-if="check"></div> | |
<div v-else></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computed Property - хоть и называется вычисляемым свойством, на самом деле таковым ( свойством ) не является. | |
По факту это обычная функция, которая использует реальные свойства для вычисления и возвращает результат своего вычисления. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vueRouter, vueResource].forEach(p => Vue.use(p)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://code.visualstudio.com/docs/editor/codebasics#_multiple-selections-multicursor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="Aligner"> | |
<div class="Aligner-item Aligner-item--top">…</div> | |
<div class="Aligner-item">…</div> | |
<div class="Aligner-item Aligner-item--bottom">…</div> | |
</div> | |
.Aligner { | |
display: flex; | |
align-items: center; | |
justify-content: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install package into your project folder via npm: | |
npm i pixel-glass --save-dev | |
2. Place your mock-ups into img (or any other) folder of your project. | |
3. Add this code into <head> element of your page: | |
<!-- Pixel Glass --> | |
<style> | |
HTML { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media only screen and ( min-width: 768px ) { | |
.is-table-row { | |
display: table; | |
} | |
.is-table-row > [ class*='col-' ] { | |
float: none; | |
display: table-cell; | |
vertical-align: top; | |
} | |
} |