Vue.jsのcomputedを使うと、加工済みのデータを即座に受け取ることができます。
See the Pen Vue.js computed sample by webdev (@webdev-jp-net) on CodePen.0
ウェブの技術とか開発環境構築の覚書。
Vue.jsのcomputedを使うと、加工済みのデータを即座に受け取ることができます。
See the Pen Vue.js computed sample by webdev (@webdev-jp-net) on CodePen.0
Vue.js 2では、テンプレートでイベント装飾子を使うと簡単にpreventDefaultやstopPropagationを定義できます。
<a href="#" @click.prevent="ファンクション">link</a>
<a href="#" @click.stop="ファンクション">link</a>
<a href="#" @click.prevent.stop="ファンクション">link</a>
formの枠をクリックで背景色が点滅
リンク先の設定してあるリンクにclickイベントを付与し、.preventと.stopのサンプル
actionでURLが設定してあるformのbuttonにclickイベントを付与し、.preventと.stopのサンプル
See the Pen Vue.js event modifier by webdev (@webdev-jp-net) on CodePen.0