Vue.js Vita・PS4 notes - sonokonakamura777/javascripttraining GitHub Wiki
注意事項
- 19999pxでCSS設定したらVitaが落ちた
- router-linkでv-on:focus使うときはv-on:focus.nativeにする。
- router-linkにかぎらずcomponentではnatvieファンクションはnatvieを付けないとだめ。
@focus.native="something= true"
- DOMがupdateされるとFocusはずれる?
- Use
this.$nextTick(function() {};);
to callback after DOM update
メモ
-
v-model インプットとアウトプットをバインドしたいときに使う。syntax sugar for
-
v-model doesn’t care about the initial value provided to an input or a textarea. It will always treat the Vue instance data as the source of truth.
-
For languages that require an IME (Chinese, Japanese, Korean etc.), you’ll notice that v-model doesn’t get updated during IME composition. If you want to cater for these updates as well, use input event instead.
-
v-html: raw html.
-
v-once: one-time interpolation.
render text only once<span v-once>This will never change: </span>
-
v-bind: one-way binding, a boolean attribute is removed if its value is falsy. .
The shorthand is <img :src="imageSrc">
-
v-if: conditional binding, the node is removed if its value is falsy.
-
v-for: loop binding
-
v-on: attaching event listner
@click is the shorthand for v-on:click
-
v-model: two-way