Răsfoiți Sursa

修复antv/x6引入失败的问题。

杨志杰 3 ani în urmă
părinte
comite
7b98d83f65
5 a modificat fișierele cu 11 adăugiri și 5 ștergeri
  1. 1 2
      package.json
  2. 1 1
      public/index-debug.html
  3. 4 0
      src/customer/printTemp/index.vue
  4. 3 2
      src/main.js
  5. 2 0
      webpack.base.js

+ 1 - 2
package.json

@@ -25,8 +25,7 @@
     "v-tooltip": "^4.0.0-beta.17",
     "vue-request": "^1.2.4",
     "vue-select": "^4.0.0-beta.6",
-    "vuedraggable": "^4.1.0",
-    "@antv/x6": "^1.30.1"
+    "vuedraggable": "^4.1.0"
   },
   "devDependencies": {
     "@babel/core": "^7.17.5",

+ 1 - 1
public/index-debug.html

@@ -67,7 +67,7 @@
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/sortablejs/Sortable.js"></script>
 	
 
-	
+	<script src="https://unpkg.com/@antv/x6@1.30.1/dist/x6.js"></script>
 
 	
 	<script nonce="*NONCE_TOKEN*"  type="text/javascript">

+ 4 - 0
src/customer/printTemp/index.vue

@@ -18,5 +18,9 @@ import { useStore } from 'vuex';
 
 const store = useStore();
 const step = computed(()=>store.state.step);
+
+console.log(Graph);
+console.log(Addon);
+
 </script>
 <style scoped></style>

+ 3 - 2
src/main.js

@@ -32,9 +32,10 @@ import routes from './routes/main_routes.js';
 
 
 console.log(window.$);
-import $ from 'jquery';
+// import $ from 'jquery';
 console.log(window.$);
-
+//$ = window.$;
+console.log($);
 
 import store from './store/index.js';
 

+ 2 - 0
webpack.base.js

@@ -77,6 +77,7 @@ module.exports = {
   
   externals: {
     'jquery': "window.jquery",
+    '$': "window.jquery",
     'bootstrap': 'bootstrap',
     'BootstrapDialog': 'BootstrapDialog',
     'echarts': 'echarts',
@@ -86,6 +87,7 @@ module.exports = {
     'vue-router': 'VueRouter',
     'vuex': 'Vuex',
     'sortablejs': 'Sortable',
+    '@antv/x6': 'X6',
   },
   
   plugins: [