@tencentcloud/ai-desk-customer-vue 0.1.5 → 0.1.6
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/adapter-vue-web.ts +19 -41
- package/package.json +4 -5
package/adapter-vue-web.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import * as VueApi from '@vue/composition-api';
|
|
1
|
+
import * as Vue from 'vue';
|
|
2
|
+
import { TUIGlobal } from '@tencentcloud/universal-api';
|
|
4
3
|
|
|
5
|
-
let VueBasic: any = {
|
|
6
|
-
default: {},
|
|
7
|
-
};
|
|
8
|
-
VueBasic = _Vue ? _Vue : VueBasic;
|
|
9
4
|
let vueVersion: number;
|
|
5
|
+
let framework = 'vue2';
|
|
10
6
|
let createVNode = (
|
|
11
7
|
arg1: any,
|
|
12
8
|
arg2: any,
|
|
@@ -17,57 +13,39 @@ let render = (arg1: any, arg2: any) => {
|
|
|
17
13
|
return;
|
|
18
14
|
};
|
|
19
15
|
|
|
20
|
-
let defineProps = () => {
|
|
21
|
-
return;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
let defineEmits = () => {
|
|
25
|
-
return;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
let withDefaults = (arg: any) => {
|
|
29
|
-
return arg;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
16
|
try {
|
|
33
17
|
if (
|
|
34
|
-
(
|
|
35
|
-
&& (
|
|
18
|
+
(Vue as any)?.default?.version
|
|
19
|
+
&& (Vue as any)?.default?.version?.startsWith('2.7.')
|
|
36
20
|
) {
|
|
37
21
|
// >= Vue 2.7.0
|
|
38
22
|
vueVersion = 2.7;
|
|
23
|
+
TUIGlobal.Vue = (Vue as any)?.getCurrentInstance()?.appContext?.app;
|
|
39
24
|
} else if (
|
|
40
|
-
(
|
|
41
|
-
&& (
|
|
25
|
+
(Vue as any)?.default?.version
|
|
26
|
+
&& (Vue as any)?.default?.version?.startsWith('2.')
|
|
42
27
|
) {
|
|
43
28
|
// < Vue 2.7.0
|
|
44
29
|
vueVersion = 2;
|
|
30
|
+
TUIGlobal.Vue = (Vue as any).default;
|
|
45
31
|
} else {
|
|
46
32
|
// >= Vue 3.0.0
|
|
47
33
|
vueVersion = 3;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
withDefaults = (VueBasic as any)?.withDefaults;
|
|
34
|
+
framework = 'vue3';
|
|
35
|
+
createVNode = (Vue as any)?.createVNode;
|
|
36
|
+
render = (Vue as any)?.render;
|
|
37
|
+
TUIGlobal.Vue = (Vue as any)?.getCurrentInstance()?.appContext?.app;
|
|
53
38
|
// exportedAPIOrigin = Vue;
|
|
54
39
|
}
|
|
55
40
|
} catch (error: any) {
|
|
56
41
|
// >= Vue 3.0.0
|
|
57
42
|
vueVersion = 3;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
withDefaults = (VueBasic as any)?.withDefaults;
|
|
43
|
+
framework = 'vue3';
|
|
44
|
+
createVNode = (Vue as any)?.createVNode;
|
|
45
|
+
render = (Vue as any)?.render;
|
|
46
|
+
TUIGlobal.Vue = (Vue as any)?.getCurrentInstance()?.appContext?.app;
|
|
63
47
|
}
|
|
64
48
|
console.warn(`[adapter-vue]: vue version is ${vueVersion}`);
|
|
49
|
+
export { vueVersion, framework, render, createVNode };
|
|
65
50
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (vueVersion === 2) {
|
|
69
|
-
vue = VueApi;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { vueVersion, render, createVNode, defineProps, defineEmits, withDefaults };
|
|
73
|
-
export { vue };
|
|
51
|
+
export * from 'vue';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/ai-desk-customer-vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "chat uikit ai-desk-customer",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"keywords": [
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"publish:uniapp": "cd ../tui-customer-service-plugin-uniapp && ls && npm publish --access public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tencentcloud/chat-uikit-engine": "
|
|
25
|
-
"@tencentcloud/tui-core": "
|
|
24
|
+
"@tencentcloud/chat-uikit-engine": "latest",
|
|
25
|
+
"@tencentcloud/tui-core": "latest",
|
|
26
26
|
"@tencentcloud/tui-emoji-plugin": "latest",
|
|
27
|
-
"@tencentcloud/universal-api": "
|
|
27
|
+
"@tencentcloud/universal-api": "latest",
|
|
28
28
|
"@tiptap/core": "2.0.0-beta.220",
|
|
29
29
|
"@tiptap/extension-document": "2.0.0-beta.220",
|
|
30
30
|
"@tiptap/extension-image": "2.0.0-beta.220",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"@tiptap/pm": "2.0.0-beta.220",
|
|
36
36
|
"@tiptap/suggestion": "2.0.0-beta.220",
|
|
37
37
|
"@types/lodash": "^4.14.202",
|
|
38
|
-
"@vue/composition-api": "^1.0.0-rc.1",
|
|
39
38
|
"dayjs": "^1.11.10",
|
|
40
39
|
"lodash": "^4.17.21",
|
|
41
40
|
"marked": "4.0.10",
|