ã¬ã¤ã
åºæ¬çãªä½¿ãæ¹
- ã¤ã³ã¹ãã¼ã«
- ã¯ããã«
- Vue ã¤ã³ã¹ã¿ã³ã¹
- ãã³ãã¬ã¼ãæ§æ
- ç®åºããããã£ã¨ã¦ã©ããã£
- ã¯ã©ã¹ã¨ã¹ã¿ã¤ã«ã®ãã¤ã³ãã£ã³ã°
- æ¡ä»¶ä»ãã¬ã³ããªã³ã°
- ãªã¹ãã¬ã³ããªã³ã°
- ã¤ãã³ããã³ããªã³ã°
- ãã©ã¼ã å ¥åãã¤ã³ãã£ã³ã°
- ã³ã³ãã¼ãã³ãã®åºæ¬
ã³ã³ãã¼ãã³ãã®è©³ç´°
- ã³ã³ãã¼ãã³ãã®ç»é²
- ããããã£
- ã«ã¹ã¿ã ã¤ãã³ã
- ã¹ããã
- åç & éåæã³ã³ãã¼ãã³ã
- ç¹å¥ãªåé¡ã«å¯¾å¦ãã
ãã©ã³ã¸ã·ã§ã³ã¨ã¢ãã¡ã¼ã·ã§ã³
- Enter/Leave ã¨ãã©ã³ã¸ã·ã§ã³ä¸è¦§
- ç¶æ ã®ãã©ã³ã¸ã·ã§ã³
åå©ç¨ã¨æ§æ
- ããã¯ã¹ã¤ã³
- ã«ã¹ã¿ã ãã£ã¬ã¯ãã£ã
- æç»é¢æ°ã¨JSX
- ãã©ã°ã¤ã³
- ãã£ã«ã¿ã¼
ãã¼ã«
- åä¸ãã¡ã¤ã«ã³ã³ãã¼ãã³ã
- ãã¹ã
- TypeScript ã®ãµãã¼ã
- ãããã¯ã·ã§ã³ç°å¢ã¸ã®é ä¿¡
ã¹ã±ã¼ã«ã¢ãã
- ã«ã¼ãã£ã³ã°
- ç¶æ 管ç
- ãµã¼ããµã¤ãã¬ã³ããªã³ã°
- ã»ãã¥ãªãã£
å é¨
- ãªã¢ã¯ãã£ãã®æ¢æ±
移è¡
- Vue 1.x ããã®ç§»è¡
- Vue Router 0.7.x ããã®ç§»è¡
- Vuex 0.6.x ãã 1.0 ã¸ã®ç§»è¡
ãã®ä»
- ä»ã®ãã¬ã¼ã ã¯ã¼ã¯ã¨ã®æ¯è¼
- Vue.js ã³ãã¥ããã£ã¸åå ãã¾ããã!
- ãã¼ã ã«ä¼ãã
v2.x 以åã®ããã¥ã¡ã³ãã§ãã v3.x ã®ããã¥ã¡ã³ããè¦ããå ´åã¯ãã¡ã
ãã©ã°ã¤ã³
æçµæ´æ°æ¥: 2018å¹´10æ13æ¥
ãã©ã°ã¤ã³ã¯é常 Vue ã«ã°ãã¼ãã«ã¬ãã«ã§æ©è½ã追å ãã¾ãããã©ã°ã¤ã³ã«å¯¾ãã¦ã¯å³å¯ã«å®ç¾©ãããã¹ã³ã¼ãã¯ããã¾ããããã©ã°ã¤ã³ã¯ããã¤ãã®ã¿ã¤ããããã¾ã:
-
1ã¤ãã¾ãã¯è¤æ°ã®ã°ãã¼ãã«ã»ã¡ã½ããã追å ãã¾ããä¾: vue-custom-element
-
1ã¤ãã¾ãã¯è¤æ°ã®ã°ãã¼ãã«ã»ã¢ã»ããã追å ãã¾ãããã£ã¬ã¯ãã£ã/ãã£ã«ã¿/ãã©ã³ã¸ã·ã§ã³ãªã©ãä¾: vue-touch
ã°ãã¼ãã«ã»ããã¯ã¹ã¤ã³ã«ããã1ã¤ãã¾ãã¯è¤æ°ã®ã³ã³ãã¼ãã³ããªãã·ã§ã³ã追å ãã¾ããä¾: vue-router
Vue.prototype ã«è¨è¿°ãããã¨ã«ããã1ã¤ã¾ãã¯ãè¤æ°ã® Vue ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ããã追å ãã¾ãã
åæã«ä¸è¨ã®ããã¤ãã®çµã¿åãããæ³¨å ¥ããªãããç¬èªã® API ãæä¾ããã©ã¤ãã©ãªãä¾: vue-router
ãã©ã°ã¤ã³ã®ä½¿ç¨
Vue.use()
ã°ãã¼ãã«ã¡ã½ãããå¼ã³åºããã¨ã«ãã£ã¦ãã©ã°ã¤ã³ã使ç¨ãã¾ãããã㯠new Vue()
ãå¼ã³åºãã¦ã¢ããªãèµ·åãããããåã«è¡ãããå¿
è¦ãããã¾ã:
// `MyPlugin.install(Vue)` ãå¼ã³åºãã¾ã
Vue.use(MyPlugin)
new Vue({
// ... ãªãã·ã§ã³
})
ããã¤ãã®ãªãã·ã§ã³ã«ä»»æã§æ¸¡ããã¨ãã§ãã¾ã:
Vue.use(MyPlugin, { someOption: true })
Vue.use
ã¯ãåããã©ã°ã¤ã³ã 1 å以ä¸ä½¿ç¨ãããã¨ãèªåçã«é²ãã¾ãããã®ãããåããã©ã°ã¤ã³ãåæã«è¤æ°åå¼ã³åºãã¦ããä¸åº¦ãããã®ãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ãã¾ããã
vue-router
ã®ãã㪠Vue.js å
¬å¼ãã©ã°ã¤ã³ã«ãã£ã¦æä¾ããããã©ã°ã¤ã³ã¯ãVue
ãã°ãã¼ãã«å¤æ°ã¨ãã¦ä½¿ç¨å¯è½ãªå ´åãèªåçã« Vue.use()
ãå¼ã³ã¾ããããããªããã CommonJS
ã®ãããªã¢ã¸ã¥ã¼ã«ç°å¢ã§ã¯ã常ã«æ示çã« Vue.use()
ãå¼ã¶å¿
è¦ãããã¾ã:
// Browserify ã¾ã㯠Webpack çµç±ã§ CommonJS ã使ç¨
var Vue = require('vue')
var VueRouter = require('vue-router')
// ãããå¼ã³ã ãã®ãå¿ãã¦ã¯ããã¾ãã
Vue.use(VueRouter)
ã³ãã¥ããã£ã®è²¢ç®ã«ããè¨å¤§ãªãã©ã°ã¤ã³ãã©ã¤ãã©ãªã¯ awesome-vue ã§ç¢ºèªã§ãã¾ãã
ãã©ã°ã¤ã³ã®è¨è¿°
Vue.js ãã©ã°ã¤ã³ã¯ install
ã¡ã½ãããå
¬éããå¿
è¦ãããã¾ãããã®ã¡ã½ããã¯ç¬¬ 1 å¼æ°ã¯ Vue
ã³ã³ã¹ãã©ã¯ã¿ã第 2 å¼æ°ã¯ä»»æ㧠options
ãæå®ããã¦å¼ã³åºããã¾ã:
MyPlugin.install = function (Vue, options) {
// 1. ã°ãã¼ãã«ã¡ã½ããã¾ãã¯ããããã£ã追å
Vue.myGlobalMethod = function () {
// ä½ããã®ãã¸ã㯠...
}
// 2. ã°ãã¼ãã«ã¢ã»ããã追å
Vue.directive('my-directive', {
bind (el, binding, vnode, oldVnode) {
// ä½ããã®ãã¸ã㯠...
}
...
})
// 3. 1ã¤ãã¾ãã¯è¤æ°ã®ã³ã³ãã¼ãã³ããªãã·ã§ã³ã注å
¥
Vue.mixin({
created: function () {
// ä½ããã®ãã¸ã㯠...
}
...
})
// 4. ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ããã追å
Vue.prototype.$myMethod = function (methodOptions) {
// ä½ããã®ãã¸ã㯠...
}
}