安装
npm install xe-utils vxe-table
新建文件夹:
import { App, createApp } = 'vue'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
export function useTable (app: App) {
app.use(VXETable)
}
main.ts中引入
import { createApp } from 'vue'
import App from './App.vue'
// 引入挂载
import { useTable } from './plugins/index'
createApp(App).use(useTable).mount('#app')