From 295925a8231a73db5d09b258ff1aeedfd86d2ac4 Mon Sep 17 00:00:00 2001 From: MengYX Date: Wed, 3 Jul 2019 22:54:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0ElementUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 54 ++++++++++++++++++++++++++++++++++++++---- package.json | 2 ++ src/App.vue | 10 +++++++- src/main.js | 1 + src/plugins/element.js | 5 ++++ 5 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 src/plugins/element.js diff --git a/package-lock.json b/package-lock.json index 07a0592..35494f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1749,6 +1749,14 @@ "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", "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": { "version": "0.4.0", "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", @@ -1856,6 +1864,11 @@ "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": { "version": "8.0.6", "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.0.6.tgz", @@ -1910,7 +1923,6 @@ "version": "6.26.0", "resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" @@ -1919,8 +1931,7 @@ "regenerator-runtime": { "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", - "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", - "dev": true + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" } } }, @@ -3400,8 +3411,7 @@ "deepmerge": { "version": "1.5.2", "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz", - "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=", - "dev": true + "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=" }, "default-gateway": { "version": "5.0.2", @@ -3712,6 +3722,19 @@ "integrity": "sha1-NjaFFOtxljKpFDXzyfV8mLR9gd4=", "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": { "version": "6.5.0", "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.0.tgz", @@ -6775,6 +6798,11 @@ "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", "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": { "version": "2.0.2", "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz", @@ -8344,6 +8372,11 @@ "integrity": "sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc=", "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": { "version": "1.11.1", "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.11.1.tgz", @@ -9400,6 +9433,11 @@ "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": { "version": "2.0.5", "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", "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": { "version": "2.3.3", "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.3.tgz", diff --git a/package.json b/package.json index 525e2ed..a812c2b 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ }, "dependencies": { "core-js": "^2.6.5", + "element-ui": "^2.4.5", "register-service-worker": "^1.6.2", "vue": "^2.6.10" }, @@ -15,6 +16,7 @@ "@vue/cli-plugin-babel": "^3.9.0", "@vue/cli-plugin-pwa": "^3.9.0", "@vue/cli-service": "^3.9.0", + "vue-cli-plugin-element": "^1.0.1", "vue-template-compiler": "^2.6.10" } } diff --git a/src/App.vue b/src/App.vue index fcc5662..440dc7e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,14 @@ diff --git a/src/main.js b/src/main.js index 839820a..088cdec 100644 --- a/src/main.js +++ b/src/main.js @@ -1,6 +1,7 @@ import Vue from 'vue' import App from './App.vue' import './registerServiceWorker' +import './plugins/element.js' Vue.config.productionTip = false diff --git a/src/plugins/element.js b/src/plugins/element.js new file mode 100644 index 0000000..c48a6ef --- /dev/null +++ b/src/plugins/element.js @@ -0,0 +1,5 @@ +import Vue from 'vue' +import Element from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' + +Vue.use(Element)