- ã¯ããã«
- Vue 3, Nuxt 3ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ããªãå¿ è¦ãªã®ã
- ç ´å£çå¤æ´ã®å¦ç¿
- ãã©ã°ã¤ã³ã»ã©ã¤ãã©ãªã®é¸å®
- Vue 2ã³ã³ãã¼ãã³ãã®ç§»è¡ã³ã¹ã
- ãã¤ã°ã¬ã¼ã·ã§ã³å ¨ä½ãéãã¦
- ãããã«
ã¯ããã«
ããã«ã¡ã¯ã ContractSã§ããã³ãã¨ã³ãã¨ã³ã¸ãã¢ããã¦ããæ澤ã§ãã
å æ¥ãä¸æçã« Vue 2.x ãã Vue 3.x ã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¸æºããæ©ä¼ããã£ãããããã®éã®å¦ã³ãå ±æãã¾ãã
ContractS CLMã§ã¯ãVue.js ãç¨ãã¦éçºããã¦ãã¾ãã
Vue.jsã¨Nuxt.jsã¯ãWebéçºã«ããã¦åºãå©ç¨ããã¦ãã人æ°ã®é«ããã¬ã¼ã ã¯ã¼ã¯ã§ãã
æè¡ã®é²åã¨ã¨ãã«ããããã®ãã¼ã¸ã§ã³ãé²åãç¶ãã¦ãã¾ããWebãã¬ã¼ã ã¯ã¼ã¯ã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¯ãéçºè
ã«ã¨ã£ã¦éè¦ãªã¿ã¹ã¯ã§ããæ¬è¨äºã§ã¯ããã®å¿
è¦æ§ã¨çµé¨ã«ã¤ãã¦è¿°ã¹ã¾ãã
Vue 3, Nuxt 3ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ããªãå¿ è¦ãªã®ã
Vue 2ã¯ã2023å¹´ã«EOLï¼End of Lifeï¼ãè¿ãã¾ããã
ããã¯ãVue 2ã®æ°ããæ©è½ãã»ãã¥ãªãã£ããããæä¾ãããªããªã£ããã¨ãæå³ãã¾ããã¾ããNuxt 2.xã®ä¾åé¢ä¿ã«ãããã©ã¤ãã©ãªãæ´æ°ããããã¨ãç¡ããªããããèå¼±æ§ãçºè¦ãããéã®ãããé©ç¨ãé£ãããªãã¾ãã
ãããã£ã¦ãå質ã®ç¶æã¨ã»ãã¥ãªãã£ã®ç¢ºä¿ã®ããã«ãVue 3ããã³Nuxt 3ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ãå¿
è¦ã§ãã
ç ´å£çå¤æ´ã®å¦ç¿
Vue 3ã¸ã®ç§»è¡ã«ã¯ãç ´å£çå¤æ´ãä¼´ãã¾ããããã¯ãVue 2ããå»æ¢ãããæ©è½ãä»æ§ã®å¤§ããªå¤æ´ãªã©ãå«ã¾ãã¾ãã
ãã®ä¸ã§ãå½±é¿ã大ããã¨æããå¤æ´ã¯v-model
ã®æ±ãã§ãã
Vue 3 ããã¯ä»¥ä¸ã®ãããªä»æ§å¤æ´ããªããã¦ãã¾ãã
ãã¼ã¸ã§ã³ | ããã©ã«ãããããã£å | ããã©ã«ãã¤ãã³ãå |
---|---|---|
Vue 2 | value |
input |
Vue 3 | modelValue |
update: modelValue |
Vue 2ã§ã¯ãprops
ã®.sync
修飾åã§ãåã³ã³ãã¼ãã³ãããã®emit
ã¤ãã³ãåãupdateï¼ï¼propåï¼
ã¨ããä»æ§ãããã¾ããã
対ãã¦v-model
ã®ããã©ã«ãã¤ãã³ãåã¯ãä¸è¨ã®è¡¨ã®ããã«.sync
ã¨å½¢å¼ãç°ãªã£ããããVue 3ã§ã¯v-model
ã«ããã¦ãåæ§ã®ä»æ§ã«çµ±ä¸ãããå½¢ã«ãªãã¾ãã
ãã®ãããªå¤æ´ã«ã¤ãã¦å¦ç¿ããå¤æ´ããå¿
è¦ãããã¾ãã
ãã©ã°ã¤ã³ã»ã©ã¤ãã©ãªã®é¸å®
Vue 2ã§ä½¿ç¨ãã¦ãããã©ã°ã¤ã³ãã©ã¤ãã©ãªã®å¤ãã¯ãVue 3ã«å¯¾å¿ãã¦ããªããã®ããããã¯Vue 3ã«å¯¾å¿ããããã«ä»æ§å¤æ´ããããã®ãããã¾ããããã«ããã移è¡ã³ã¹ããé«ããªãã¾ããããã«ãVue 3ã«å¯¾å¿ãã代æ¿ã©ã¤ãã©ãªãåå¨ããªãå ´åãããã¾ãã
ãã®ãããªå ´åãéçºè
ã¯èªãã©ã¤ãã©ãªãæ´æ°ãããããããã¯ä»£æ¿æ段ã模索ããå¿
è¦ãããã¾ããã¾ããæ¢åã®ã©ã¤ãã©ãªã¨ã®äºææ§ã®åé¡ãçºçããå¯è½æ§ãããã¾ãã
ä¾ãã°ãNuxt 3.8ã§[email protected]
ãå°å
¥ããã¨ããã«ãã¨ã©ã¼ãçºçããã¨ããåé¡ãããã¾ãããã®ãããªåé¡ã«å¯¾å¦ããããã«ã¯ãéçºè
ã¯é©åãªä»£æ¿æ段ãè¦ã¤ããå¿
è¦ãããã¾ãã
Vue 2ã³ã³ãã¼ãã³ãã®ç§»è¡ã³ã¹ã
ä»ã¾ã§ Vue 2ã§è¨è¿°ããã¦ããã³ã³ãã¼ãã³ããããã¹ã¦ Vue 3 ã®è¨æ³ã¸å¤æ´ããå¿
è¦ãããã¾ãã
ãããã¯ãã®å¤§ããã«ãããã¾ãããCCLMã®å ´å300è¿ãã®ã³ã³ãã¼ãã³ãããããããããã¹ã¦æ¸ãæããã¨ãªãã¨è¨å¤§ãªæéãããããã¨ã¯æ³åã«å®¹æãã¨æãã¾ãã
ãããããã®å¹çããããæ¹æ³ã«ç»æçãªãã®ã¯ãªããç¾å¨æåãªã®ã¯Vue 2ã®ããã¸ã§ã¯ããVue 2.7ã¾ã§ãã¼ã¸ã§ã³ãä¸ããããã¯ãã¼ãããã¦ããVue 3ã®æ©è½ãåãå
¥ãããã¨ã§ãã
ãã¤ã°ã¬ã¼ã·ã§ã³å ¨ä½ãéãã¦
ä¸è¨ã«æ¸ããããªãã£ãå¦ã³ãç°¡åã«è¨è¿°ãã¾ãã
å ¬å¼æ¨å¥¨ã®ãã©ã°ã¤ã³ã»ã©ã¤ãã©ãªã§ãã¢ããªã±ã¼ã·ã§ã³ã«åããªããã¨ãããã
- ex) ã¹ãã¼ãªã¼è¨è¿°ã¨ãã¦StoryBookãæ¨å¥¨ãã¦ããããViteã§ã®ã¨ã¤ãªã¢ã¹è§£æ±ºå¤±æã¨ãã«ãã¨ã©ã¼ã«ãããHistoreãæ¡ç¨
- æãåã£ã¦æ¢åã®ãã©ã°ã¤ã³ã»ã©ã¤ãã©ãªãå¥ã®ãã©ã°ã¤ã³ã»ã©ã¤ãã©ãªã«å¤æ´ãã
- ex) BootstrapVueããPrimeVueã«å¤æ´
- åå ä¸æã®ãã«ãã¨ã©ã¼ãçºçãã解æ¶ã§ããªãå ´åã¯ãã©ã°ã¤ã³ã»ã©ã¤ãã©ãªã®issuesã確èªãã
ãããã«
ä»ã«ãå¤ãã®èª²é¡ãããã¾ãããä»åã¯ä¸»è¦ãªèª²é¡ãåãä¸ãã¾ããã ãã¤ã°ã¬ã¼ã·ã§ã³ã¯ç¾å¨ãé²è¡ä¸ã§ãããä¸è¨ã«ä¸ããããã«å¤ãã®å¦ã³ãæããè²´éãªçµé¨ã§ããã