添加ElementUI

This commit is contained in:
MengYX 2019-07-03 22:54:29 +08:00
parent fd6c246769
commit 295925a823
5 changed files with 66 additions and 6 deletions

54
package-lock.json generated
View File

@ -1749,6 +1749,14 @@
"integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=",
"dev": true "dev": true
}, },
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz",
"integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
"requires": {
"babel-runtime": "6.x"
}
},
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
@ -1856,6 +1864,11 @@
"babylon": "^6.18.0" "babylon": "^6.18.0"
} }
}, },
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
},
"babel-loader": { "babel-loader": {
"version": "8.0.6", "version": "8.0.6",
"resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.0.6.tgz", "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.0.6.tgz",
@ -1910,7 +1923,6 @@
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": { "requires": {
"core-js": "^2.4.0", "core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0" "regenerator-runtime": "^0.11.0"
@ -1919,8 +1931,7 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.11.1", "version": "0.11.1",
"resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz", "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz",
"integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk="
"dev": true
} }
} }
}, },
@ -3400,8 +3411,7 @@
"deepmerge": { "deepmerge": {
"version": "1.5.2", "version": "1.5.2",
"resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz", "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz",
"integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=", "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
"dev": true
}, },
"default-gateway": { "default-gateway": {
"version": "5.0.2", "version": "5.0.2",
@ -3712,6 +3722,19 @@
"integrity": "sha1-NjaFFOtxljKpFDXzyfV8mLR9gd4=", "integrity": "sha1-NjaFFOtxljKpFDXzyfV8mLR9gd4=",
"dev": true "dev": true
}, },
"element-ui": {
"version": "2.10.1",
"resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.10.1.tgz?cache=0&sync_timestamp=1562053824530&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-ui%2Fdownload%2Felement-ui-2.10.1.tgz",
"integrity": "sha1-EBEBblDnb12ub7+chuU7blP8ues=",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
}
},
"elliptic": { "elliptic": {
"version": "6.5.0", "version": "6.5.0",
"resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.0.tgz", "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.0.tgz",
@ -6775,6 +6798,11 @@
"integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=",
"dev": true "dev": true
}, },
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm-run-path": { "npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz", "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz",
@ -8344,6 +8372,11 @@
"integrity": "sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc=", "integrity": "sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc=",
"dev": true "dev": true
}, },
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
},
"resolve": { "resolve": {
"version": "1.11.1", "version": "1.11.1",
"resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.11.1.tgz", "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.11.1.tgz",
@ -9400,6 +9433,11 @@
"neo-async": "^2.6.0" "neo-async": "^2.6.0"
} }
}, },
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
"integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
},
"through2": { "through2": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz", "resolved": "https://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz",
@ -9917,6 +9955,12 @@
"resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz", "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz",
"integrity": "sha1-pysaQqTYKnIepDjRtr9V5mGVxjc=" "integrity": "sha1-pysaQqTYKnIepDjRtr9V5mGVxjc="
}, },
"vue-cli-plugin-element": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/vue-cli-plugin-element/download/vue-cli-plugin-element-1.0.1.tgz",
"integrity": "sha1-NOWPtls2z1mvrxT1AyiOXleLFVQ=",
"dev": true
},
"vue-hot-reload-api": { "vue-hot-reload-api": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.3.tgz", "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.3.tgz",

View File

@ -8,6 +8,7 @@
}, },
"dependencies": { "dependencies": {
"core-js": "^2.6.5", "core-js": "^2.6.5",
"element-ui": "^2.4.5",
"register-service-worker": "^1.6.2", "register-service-worker": "^1.6.2",
"vue": "^2.6.10" "vue": "^2.6.10"
}, },
@ -15,6 +16,7 @@
"@vue/cli-plugin-babel": "^3.9.0", "@vue/cli-plugin-babel": "^3.9.0",
"@vue/cli-plugin-pwa": "^3.9.0", "@vue/cli-plugin-pwa": "^3.9.0",
"@vue/cli-service": "^3.9.0", "@vue/cli-service": "^3.9.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
} }
} }

View File

@ -1,6 +1,14 @@
<template> <template>
<div id="app"> <div id="app">
<img alt="Vue logo" src="./assets/logo.png"> <img src="./assets/logo.png">
<div>
<p>
If Element is successfully added to this project, you'll see an
<code v-text="'<el-button>'"></code>
below
</p>
<el-button>el-button</el-button>
</div>
<HelloWorld msg="Welcome to Your Vue.js App"/> <HelloWorld msg="Welcome to Your Vue.js App"/>
</div> </div>
</template> </template>

View File

@ -1,6 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import './registerServiceWorker' import './registerServiceWorker'
import './plugins/element.js'
Vue.config.productionTip = false Vue.config.productionTip = false

5
src/plugins/element.js Normal file
View File

@ -0,0 +1,5 @@
import Vue from 'vue'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Element)