mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-18 10:59:10 +08:00
chore: update
This commit is contained in:
parent
cdd451d158
commit
2f8c74078e
@ -8,12 +8,15 @@ const babelOptions = {
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
entry: {
|
||||
index: path.resolve(__dirname, '../packages/element-plus/index.ts'),
|
||||
},
|
||||
entry: path.resolve(__dirname, '../packages/element-plus/index.ts'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../lib'),
|
||||
publicPath: '/',
|
||||
filename: 'index.js',
|
||||
libraryTarget: 'umd',
|
||||
libraryExport: 'default',
|
||||
library: 'ELEMENT',
|
||||
umdNamedDefine: true,
|
||||
},
|
||||
stats: 'verbose',
|
||||
module: {
|
||||
@ -77,7 +80,7 @@ module.exports = {
|
||||
extensions: ['.ts', '.tsx', '.js', '.vue', '.json'],
|
||||
},
|
||||
externals: {
|
||||
vue: 'Vue',
|
||||
vue: 'vue',
|
||||
},
|
||||
plugins: [
|
||||
new VueLoaderPlugin(),
|
||||
|
@ -72,7 +72,7 @@ export {
|
||||
ElInfiniteScroll,
|
||||
}
|
||||
|
||||
export default function install(app: App): void {
|
||||
const install = (app: App): void => {
|
||||
ElAlert(app)
|
||||
ElAvatar(app)
|
||||
ElBacktop(app)
|
||||
@ -109,3 +109,9 @@ export default function install(app: App): void {
|
||||
ElDialog(app)
|
||||
ElInfiniteScroll(app)
|
||||
}
|
||||
|
||||
const elementUI = {
|
||||
install,
|
||||
}
|
||||
|
||||
export default elementUI
|
||||
|
@ -15,7 +15,7 @@ import './assets/styles/fonts/style.css'
|
||||
import icon from './icon.json'
|
||||
|
||||
import App from './app.vue'
|
||||
import install from 'element-plus'
|
||||
import ElementPlus from 'element-plus'
|
||||
if(process.env.NODE_ENV === 'development') require('../src/style/element-ui@2.13.2.css')
|
||||
|
||||
|
||||
@ -40,12 +40,12 @@ app.component('MainFooter', MainFooter)
|
||||
app.component('MainHeader', MainHeader)
|
||||
app.component('SideNav', SideNav)
|
||||
app.component('FooterNav', FooterNav)
|
||||
install(app)
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes,
|
||||
})
|
||||
app.use(ElementPlus)
|
||||
app.use(router)
|
||||
router.isReady().then(()=>{
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { createApp } from 'vue'
|
||||
import install from 'element-plus'
|
||||
import ElementPlus from 'element-plus'
|
||||
import App from './play/index.vue'
|
||||
import '../packages/theme-chalk/src/index.scss'
|
||||
const app = createApp(App)
|
||||
install(app)
|
||||
app.use(ElementPlus)
|
||||
app.mount('#app')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user