Browse Source

X6 修改程全局引用。

YangZhiJie 2 years ago
parent
commit
434c138e23
5 changed files with 22 additions and 14 deletions
  1. 1 0
      .eslintrc.js
  2. 1 1
      package.json
  3. 5 2
      src/common/X6.js
  4. 14 10
      src/customer/printTemp/step2.vue
  5. 1 1
      webpack.base.js

+ 1 - 0
.eslintrc.js

@@ -95,5 +95,6 @@ module.exports = {
     'Notify': true,
     'Vue': true,
     'Handsontable': true,
+    'X6': true,
   },
 };

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.65",
+  "version": "3.0.67",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 5 - 2
src/common/X6.js

@@ -1,4 +1,7 @@
-import { Graph, Shape, Addon, DataUri } from '@antv/x6';
+
+// 为了加快主页的启动速度,延迟加载X6,使用全局的X6
+// import { Graph, Shape, Addon, DataUri } from '@antv/x6';
+
 import QRCode from 'qrcode';
 
 
@@ -25,7 +28,7 @@ const textQrcodeToBase64 = text => {
   });
 };
 export default function CreateJPEG(dom) {
-  let graph = new Graph(
+  let graph = new X6.Graph(
     {
       container: dom,
       width: 1,

File diff suppressed because it is too large
+ 14 - 10
src/customer/printTemp/step2.vue


+ 1 - 1
webpack.base.js

@@ -87,7 +87,7 @@ module.exports = {
     'vue-router': 'VueRouter',
     'vuex': 'Vuex',
     'sortablejs': 'Sortable',
-    '@antv/x6': 'X6',
+    // '@antv/x6': 'X6',
   },
   
   plugins: [

Some files were not shown because too many files changed in this diff