美文网首页
更新概览

更新概览

作者: 奈何明月照沟渠 | 来源:发表于2024-02-23 12:46 被阅读0次

Slot Api

全局Api使用规范

不再使用this.Api的方式,而是需要import {Api1,Api2} from vue 的方式
构造应用实例时

vue2

import Vue from 'vue'
import App from './App.vue'

Vue.config.ignoredElements = [/^app~/]
Vue.use('/*...*/')
Vue.mixin('/*...*/')
Vue.component('/*...*/')
Vue.directive('/*...*/')
Vue.prototype.customProperty = () => {}

new Vue(()=>{
  render: h=> h(App)
}).$mount('#app')

vue3

import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)

app.config.isCustomElement = tag => tag.startsWidth('app-')
app.use('/*...*/')
app.mixin('/*...*/')
app.component('/*...*/')
app.directive('/*...*/')
app.config.globalProperties.customProperty = () => {}
app.mount(App,'#app')

teleport 远程传送

相关文章

网友评论

      本文标题:更新概览

      本文链接:https://www.haomeiwen.com/subject/cuxmadtx.html