Browse Source

添加公司内部组件库meri

duxiangyu 3 years ago
parent
commit
d57ca55e59
3 changed files with 16 additions and 0 deletions
  1. 11 0
      babel.config.js
  2. 2 0
      package.json
  3. 3 0
      src/main.js

+ 11 - 0
babel.config.js

@@ -1,5 +1,16 @@
 module.exports = {
   presets: [
     '@vue/cli-plugin-babel/preset'
+  ],
+  plugins: [
+    [
+      "component",
+      {
+        "libraryName": "meri-design",
+        "camel2Dash": false,
+        "libDir": "dist",
+        "styleLibrary": { "name": "theme", "base": true }
+      }
+    ]
   ]
 }

+ 2 - 0
package.json

@@ -14,6 +14,7 @@
     "@saga-web/graph": "^2.1.139",
     "font-awesome": "^4.7.0",
     "handsontable-pro": "^3.0.0",
+    "meri-design": "^1.5.515",
     "vue-router": "^3.5.3",
     "vuex": "^3.6.2"
   },
@@ -22,6 +23,7 @@
     "@vue/cli-plugin-typescript": "^4.5.13",
     "@vue/cli-service": "~4.5.0",
     "axios": "^0.21.1",
+    "babel-plugin-component": "^1.1.1",
     "core-js": "^3.6.5",
     "element-ui": "^2.15.6",
     "less": "3.9.0",

+ 3 - 0
src/main.js

@@ -4,7 +4,10 @@ import router from './router'
 import vueStore from './store'
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
+import {Button} from 'meri-design'
+// import 'meri-design/dist/index.css'
 Vue.use(ElementUI, { size: "small", zIndex: 1000 })
+Vue.use(Button)
 
 import 'font-awesome/less/font-awesome.less'
 import '@/assets/style/main.less'