Browse Source

添加meri-design库

shaun-sheep 4 years ago
parent
commit
299392228c
7 changed files with 36 additions and 14 deletions
  1. 13 2
      babel.config.js
  2. 5 4
      package.json
  3. 1 0
      src/App.vue
  4. 7 7
      src/lib/FloorView.js
  5. 3 0
      src/main.js
  6. 4 0
      src/main.ts
  7. 3 1
      src/views/first/index.vue

+ 13 - 2
babel.config.js

@@ -1,4 +1,15 @@
 module.exports = {
     presets: ['@vue/cli-plugin-babel/preset'],
-    plugins: []
-}
+    plugins: [
+
+        [
+            "component",
+            {
+                "libraryName": "meri-design",
+                "camel2Dash": false,
+                "libDir": "dist",
+                "style": false
+            }
+        ]
+    ]
+}

+ 5 - 4
package.json

@@ -17,14 +17,14 @@
         "axios": "^0.19.2",
         "core-js": "^3.4.4",
         "element-ui": "^2.13.2",
+        "meri-design": "^1.2.8",
         "moment": "^2.24.0",
         "quill": "^1.3.7",
         "vue": "^2.6.10",
         "vue-cookie": "^1.1.4",
         "vue-quill-editor": "^3.0.6",
         "vue-router": "^3.1.3",
-        "vuex": "^3.4.0",
-        "wangeditor": "^3.1.1"
+        "vuex": "^3.4.0"
     },
     "devDependencies": {
         "@typescript-eslint/eslint-plugin": "^2.26.0",
@@ -32,8 +32,8 @@
         "@vue/cli-plugin-babel": "^4.1.0",
         "@vue/cli-plugin-eslint": "^4.1.0",
         "@vue/cli-plugin-router": "^4.1.0",
-        "@vue/cli-plugin-vuex": "^4.1.0",
         "@vue/cli-plugin-typescript": "^4.3.0",
+        "@vue/cli-plugin-vuex": "^4.1.0",
         "@vue/cli-service": "^4.1.0",
         "@vue/eslint-config-typescript": "^5.0.2",
         "babel-eslint": "^10.0.3",
@@ -44,6 +44,7 @@
         "less": "^3.0.4",
         "less-loader": "^5.0.0",
         "polybooljs": "^1.2.0",
+        "style-resources-loader": "^1.3.3",
         "stylus": "^0.54.7",
         "stylus-loader": "^3.0.2",
         "typescript": "~3.8.3",
@@ -51,4 +52,4 @@
         "vue-svg-loader": "^0.15.0",
         "vue-template-compiler": "^2.6.10"
     }
-}
+}

+ 1 - 0
src/App.vue

@@ -5,6 +5,7 @@
 </template>
 
 <style lang="less">
+// @import 'meri-design/dist/index.css';
 body,
 h1,
 h2,

+ 7 - 7
src/lib/FloorView.js

@@ -11,9 +11,9 @@ var __extends = (this && this.__extends) || (function () {
         d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
     };
 })();
-import { SGraphView } from "@saga-web/graph/lib";
-import { SMouseButton, SMouseEvent, SNetUtil } from "@saga-web/base/lib";
-import { SPoint } from "@saga-web/draw/lib";
+import { SGraphView } from '@saga-web/graph/lib';
+import { SMouseButton, SMouseEvent, SNetUtil } from '@saga-web/base/lib';
+import { SPoint } from '@saga-web/draw/lib';
 /**
  * 楼层场景
  *
@@ -103,10 +103,10 @@ var FloorView = /** @class */ (function (_super) {
         // 按左键移动
         var se = new SMouseEvent(event);
         if (se.buttons & SMouseButton.LeftButton) {
-            if (this.spaceKey) {
-                this.origin.x += se.x - this._leftKeyPos.x;
-                this.origin.y += se.y - this._leftKeyPos.y;
-            }
+            // if (this.spaceKey) {
+            this.origin.x += se.x - this._leftKeyPos.x;
+            this.origin.y += se.y - this._leftKeyPos.y;
+            // }
             this._leftKeyPos.x = se.x;
             this._leftKeyPos.y = se.y;
             this.update();

+ 3 - 0
src/main.js

@@ -60,6 +60,9 @@ import Legend from '@/components/Legend';
 Vue.use(Legend);
 import cookies from 'vue-cookie';
 Vue.use(cookies);
+import Pui from 'meri-design';
+import 'meri-design/dist/index.css';
+Vue.use(Pui);
 //////////模拟传入参数
 var username = 'aiyu6';
 /////////////////

+ 4 - 0
src/main.ts

@@ -25,6 +25,10 @@ import Legend from '@/components/Legend'
 Vue.use(Legend)
 import cookies from 'vue-cookie'
 Vue.use(cookies)
+import Pui from 'meri-design';
+import 'meri-design/dist/index.css';
+Vue.use(Pui);
+
 
 //////////模拟传入参数
 const username = 'aiyu6'

+ 3 - 1
src/views/first/index.vue

@@ -3,7 +3,9 @@
 </template>
 
 <script>
-export default {}
+export default {
+    components: { Button, Toggle }
+}
 </script>
 
 <style>