Commit 34b35293 by zsh

添加jsx支持、添加element-ui

parent 02c0001f
...@@ -9,9 +9,16 @@ ...@@ -9,9 +9,16 @@
}, },
"corejs": "2", "corejs": "2",
"useBuiltIns": "usage" // 根据已使用的语法添加polyfill, 无需单独再引入(import '@babel/polyfill') "useBuiltIns": "usage" // 根据已使用的语法添加polyfill, 无需单独再引入(import '@babel/polyfill')
}],
[ "@vue/app", { "useBuiltIns": "entry" } ],
["@vue/babel-preset-jsx", {
"injectH": false
}] }]
], ],
"plugins": ["@babel/plugin-syntax-dynamic-import"] "plugins": [
"@babel/plugin-syntax-dynamic-import",
"jsx-v-model"
]
// 类库等代码使用, 且无需引入polyfill // 类库等代码使用, 且无需引入polyfill
// 闭包方式引入, 不会污染全局环境 // 闭包方式引入, 不会污染全局环境
......
...@@ -23,9 +23,17 @@ ...@@ -23,9 +23,17 @@
"@babel/preset-env": "^7.14.8", "@babel/preset-env": "^7.14.8",
"@babel/runtime": "^7.14.8", "@babel/runtime": "^7.14.8",
"@babel/runtime-corejs2": "^7.14.8", "@babel/runtime-corejs2": "^7.14.8",
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
"@vue/babel-preset-jsx": "^1.2.4",
"@vue/cli-plugin-babel": "^4.5.13",
"autoprefixer": "^9.3.1", "autoprefixer": "^9.3.1",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.4",
"babel-plugin-jsx-v-model": "^2.0.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.7.0",
"chalk": "^2.3.0", "chalk": "^2.3.0",
"copy-webpack-plugin": "^4.3.1", "copy-webpack-plugin": "^4.3.1",
"cross-env": "^5.1.3", "cross-env": "^5.1.3",
...@@ -67,7 +75,9 @@ ...@@ -67,7 +75,9 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.17.1", "axios": "^0.17.1",
"core-js": "^2.6.5",
"echarts": "^5.1.2", "echarts": "^5.1.2",
"element-ui": "^2.15.5",
"qs": "^6.10.1", "qs": "^6.10.1",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-awesome-swiper": "^3.1.3", "vue-awesome-swiper": "^3.1.3",
......
...@@ -8,11 +8,14 @@ import createRouter from './router/router' ...@@ -8,11 +8,14 @@ import createRouter from './router/router'
import UsePlugin from 'runner/common/plugins' import UsePlugin from 'runner/common/plugins'
import customPlugin from './public/plugins' import customPlugin from './public/plugins'
import utils from 'utils' import utils from 'utils'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Vuex) Vue.use(Vuex)
Vue.use(VueRouter) Vue.use(VueRouter)
Vue.use(UsePlugin) Vue.use(UsePlugin)
Vue.use(customPlugin) Vue.use(customPlugin)
Vue.use(ElementUI)
const router = createRouter() // 创建router const router = createRouter() // 创建router
const store = createStore() // 创建Vuex const store = createStore() // 创建Vuex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment