Technology Sharing

Vue Notes 13-Other

2024-07-08

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Global API migration

Adjust the global API from Vue.xxx to the instance (app).

Vue2 Global API (Vue)Vue3 Instance API (app)
Vue.config.xxxapp.config.xxx
Vue.config.productTipRemove
Vue.componentapp.component
Vue.directiveapp.directive
Vue.mixinapp.mixin
Vue.useapp.use
Vue.prototypeapp.config.globalProperties

Other changes

The data option should be declared as a function.
Transition class name changed.
Removed keyCode as a modifier for v-on, and also no longer supports config.keyCodes.
Remove the v-on.native modifier.
Remove a filter.