@zykjcommon/questions 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zykjcommon/questions",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "main": "src/components/questions/entry.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -12,7 +12,7 @@
12
12
  "build:lib": "vue-cli-service build --target lib src/components/questions/buildEntry.js --name zykjcommon-questions"
13
13
  },
14
14
  "dependencies": {
15
- "@zykjcommon/questions": "^0.0.6",
15
+ "@zykjcommon/questions": "^0.0.11",
16
16
  "alife-logger": "^1.8.30",
17
17
  "axios": "^0.26.0",
18
18
  "cookie": "^0.4.1",
@@ -3,11 +3,10 @@
3
3
  */
4
4
  // import ZYKJQuestionsPlugin from "../../../dist/zykjcommon-questions.umd.min"
5
5
  // import ZYKJQuestionsPluginDev from "./developmentEntry.js"
6
- import {createApp} from 'vue';
7
- import Vue from 'vue';
6
+ let Vue2 = require('vue')
8
7
  function getVueVersion(){
9
8
  let version = ''
10
- if(!Vue){
9
+ /*if(!Vue){
11
10
  if(createApp){
12
11
  let v = createApp({})
13
12
  version = v.version
@@ -16,7 +15,10 @@ function getVueVersion(){
16
15
  }
17
16
  }else{
18
17
  version = Vue.version || 'undefined'
19
- }
18
+ }*/
19
+ let Vue = require('vue')
20
+ Vue = Vue.default || Vue
21
+ version = Vue.version || 'undefined'
20
22
  return version
21
23
  }
22
24
  let version = getVueVersion()
@@ -24,14 +26,14 @@ let exportObj = null
24
26
  if(version!='undefined'){
25
27
  version = parseInt(version)
26
28
  if(version >= 3){
27
- let ZYKJQuestionsPlugin = require("../../../dist/zykjcommon-questions.umd.min")
29
+ let ZYKJQuestionsPlugin = require("../../../dist/zykjcommon-questions.umd.min").default
28
30
  exportObj = ZYKJQuestionsPlugin
29
31
  }else{
30
- let ZYKJQuestionsPluginDev = require("./developmentEntry.js")
32
+ let ZYKJQuestionsPluginDev = require("./developmentEntry.js").default
31
33
  exportObj = ZYKJQuestionsPluginDev
32
34
  }
33
35
  }else{
34
- let ZYKJQuestionsPluginDev = require("./developmentEntry.js")
36
+ let ZYKJQuestionsPluginDev = require("./developmentEntry.js").default
35
37
  exportObj = ZYKJQuestionsPluginDev
36
38
  }
37
39
  console.log(version,'vue版本');
package/src/main.ts CHANGED
@@ -41,14 +41,16 @@ import '@src/assets/js/arms'
41
41
  let vueInstance = createApp(App)
42
42
  // console.log(vueInstance,77);
43
43
 
44
- // import ZYKJQuestionsPlugin from "../dist/zykjcommon-questions.umd.min"
45
- // console.log(ZYKJQuestionsPlugin,799);
46
- // vueInstance.use(ZYKJQuestionsPlugin as any)
44
+ import ZYKJQuestionsPlugin from "@src/components/questions/entry.js"
45
+ console.log(ZYKJQuestionsPlugin,799);
46
+ vueInstance.use(ZYKJQuestionsPlugin as any)
47
47
  // import '../dist/zykjcommon-questions.css';
48
48
 
49
- import ZYKJQuestionsPlugin from "@zykjcommon/questions"
50
- vueInstance.use(ZYKJQuestionsPlugin as any)
51
- import '@zykjcommon/questions/dist/zykjcommon-questions.css';
49
+ // import ZYKJQuestionsPlugin from "@zykjcommon/questions"
50
+ // vueInstance.use(ZYKJQuestionsPlugin as any)
51
+ // import '@zykjcommon/questions/dist/zykjcommon-questions.css';
52
+
53
+ // console.log(ZYKJQuestionsPlugin,111);
52
54
 
53
55
 
54
56
  vueInstance.component('remote-js', {