Vue3 相关笔记

记录 Vue3 使用过程中的问题和解决方案

main

全局属性可以通过 appconfig.globalProperties 绑定
vue3

import { createApp } from 'vue'

createApp(App).config.globalProperties.$yourFunc = () => {//...}

vue2

import Vue from 'vue';
Vue.prototype.$yourFunc = () => {//...};

setup