spire.officejs-vue-test 1.0.5 → 1.0.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/README.md +2 -2
- package/es/src/officeJs-editor/index.d.ts +50 -0
- package/es/src/officeJs-editor/officeJs-editor.vue.d.ts +59 -0
- package/es/src/officeJs-editor/officeJs-editor.vue.mjs +1 -1
- package/lib/src/officeJs-editor/index.d.ts +50 -0
- package/lib/src/officeJs-editor/officeJs-editor.vue.d.ts +59 -0
- package/lib/src/officeJs-editor/officeJs-editor.vue.js +1 -1
- package/package.json +3 -3
- package/es/src/officeJs-editor/style/index.css +0 -5
- package/lib/src/officeJs-editor/style/index.css +0 -5
package/README.md
CHANGED
|
@@ -58,8 +58,8 @@ function initConfig() {
|
|
|
58
58
|
let ext = getFileExtension();
|
|
59
59
|
|
|
60
60
|
if (import.meta.env.DEV) {
|
|
61
|
-
serverUrl = `http://127.0.0.1:
|
|
62
|
-
originUrl = `http://127.0.0.1:
|
|
61
|
+
serverUrl = `http://127.0.0.1:8000`;
|
|
62
|
+
originUrl = `http://127.0.0.1:8000`;
|
|
63
63
|
} else if (import.meta.env.PROD) {
|
|
64
64
|
serverUrl = `${tempUrl.origin}/spire.officejs`;
|
|
65
65
|
originUrl = `${tempUrl.origin}/spire.officejs`;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Plugin } from "vue";
|
|
2
|
+
type SFCWithInstall<T> = T & Plugin;
|
|
3
|
+
export declare const SpireEditor: SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
id: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
config: {
|
|
9
|
+
type: ObjectConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
serverUrl: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
editorType: {
|
|
18
|
+
document: string;
|
|
19
|
+
pdf: string;
|
|
20
|
+
spreadsheet: string;
|
|
21
|
+
presentation: string;
|
|
22
|
+
};
|
|
23
|
+
SpireEditor: any;
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
realConfig: object;
|
|
26
|
+
props: any;
|
|
27
|
+
init: () => void;
|
|
28
|
+
initEditor: () => void;
|
|
29
|
+
loadScript: () => void;
|
|
30
|
+
initConfig: () => void;
|
|
31
|
+
initServerUrl: () => void;
|
|
32
|
+
OnWindowReSize: () => void;
|
|
33
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
id: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
config: {
|
|
39
|
+
type: ObjectConstructor;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
serverUrl: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
}>> & Readonly<{}>, {
|
|
47
|
+
id: string;
|
|
48
|
+
serverUrl: string;
|
|
49
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
50
|
+
export default SpireEditor;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
SpireofficejsEditors?: {
|
|
4
|
+
OpenApi: (id: string, config: any) => void;
|
|
5
|
+
};
|
|
6
|
+
SpireofficeEditor?: {
|
|
7
|
+
OpenApi?: (id: string, config: any) => void;
|
|
8
|
+
};
|
|
9
|
+
Api: any;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
+
id: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
config: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
serverUrl: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}>, {
|
|
26
|
+
editorType: {
|
|
27
|
+
document: string;
|
|
28
|
+
pdf: string;
|
|
29
|
+
spreadsheet: string;
|
|
30
|
+
presentation: string;
|
|
31
|
+
};
|
|
32
|
+
SpireEditor: any;
|
|
33
|
+
baseUrl: string;
|
|
34
|
+
realConfig: object;
|
|
35
|
+
props: any;
|
|
36
|
+
init: () => void;
|
|
37
|
+
initEditor: () => void;
|
|
38
|
+
loadScript: () => void;
|
|
39
|
+
initConfig: () => void;
|
|
40
|
+
initServerUrl: () => void;
|
|
41
|
+
OnWindowReSize: () => void;
|
|
42
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
id: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
config: {
|
|
48
|
+
type: ObjectConstructor;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
serverUrl: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
}>> & Readonly<{}>, {
|
|
56
|
+
id: string;
|
|
57
|
+
serverUrl: string;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
59
|
+
export default _sfc_main;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, onMounted as m, openBlock as h, createElementBlock as E, createElementVNode as v } from "vue";
|
|
2
2
|
import "./style/index.css";
|
|
3
|
-
import r from "spire.officejs-editors-test";
|
|
3
|
+
import r from "spire.officejs-web-editors-test";
|
|
4
4
|
const w = { class: "spire-officejs-EditorWarpper" }, S = ["id"], A = /* @__PURE__ */ g({
|
|
5
5
|
name: "spire-officejs-Editor",
|
|
6
6
|
__name: "officeJs-editor",
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Plugin } from "vue";
|
|
2
|
+
type SFCWithInstall<T> = T & Plugin;
|
|
3
|
+
export declare const SpireEditor: SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
id: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
config: {
|
|
9
|
+
type: ObjectConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
serverUrl: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
editorType: {
|
|
18
|
+
document: string;
|
|
19
|
+
pdf: string;
|
|
20
|
+
spreadsheet: string;
|
|
21
|
+
presentation: string;
|
|
22
|
+
};
|
|
23
|
+
SpireEditor: any;
|
|
24
|
+
baseUrl: string;
|
|
25
|
+
realConfig: object;
|
|
26
|
+
props: any;
|
|
27
|
+
init: () => void;
|
|
28
|
+
initEditor: () => void;
|
|
29
|
+
loadScript: () => void;
|
|
30
|
+
initConfig: () => void;
|
|
31
|
+
initServerUrl: () => void;
|
|
32
|
+
OnWindowReSize: () => void;
|
|
33
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
id: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
config: {
|
|
39
|
+
type: ObjectConstructor;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
serverUrl: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
}>> & Readonly<{}>, {
|
|
47
|
+
id: string;
|
|
48
|
+
serverUrl: string;
|
|
49
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
50
|
+
export default SpireEditor;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
SpireofficejsEditors?: {
|
|
4
|
+
OpenApi: (id: string, config: any) => void;
|
|
5
|
+
};
|
|
6
|
+
SpireofficeEditor?: {
|
|
7
|
+
OpenApi?: (id: string, config: any) => void;
|
|
8
|
+
};
|
|
9
|
+
Api: any;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
+
id: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
config: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
serverUrl: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}>, {
|
|
26
|
+
editorType: {
|
|
27
|
+
document: string;
|
|
28
|
+
pdf: string;
|
|
29
|
+
spreadsheet: string;
|
|
30
|
+
presentation: string;
|
|
31
|
+
};
|
|
32
|
+
SpireEditor: any;
|
|
33
|
+
baseUrl: string;
|
|
34
|
+
realConfig: object;
|
|
35
|
+
props: any;
|
|
36
|
+
init: () => void;
|
|
37
|
+
initEditor: () => void;
|
|
38
|
+
loadScript: () => void;
|
|
39
|
+
initConfig: () => void;
|
|
40
|
+
initServerUrl: () => void;
|
|
41
|
+
OnWindowReSize: () => void;
|
|
42
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
id: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
config: {
|
|
48
|
+
type: ObjectConstructor;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
serverUrl: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
}>> & Readonly<{}>, {
|
|
56
|
+
id: string;
|
|
57
|
+
serverUrl: string;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
59
|
+
export default _sfc_main;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("./style/index.css");const n=require("spire.officejs-editors-test"),v={class:"spire-officejs-EditorWarpper"},h=["id"],m=t.defineComponent({name:"spire-officejs-Editor",__name:"officeJs-editor",props:{id:{type:String,default:"SpireofficejsEditor"},config:{type:Object,required:!0},serverUrl:{type:String,default:"http://127.0.0.1:3001"}},setup(o){let s,r,l;const i=o;t.onMounted(()=>{c()});function c(){i.config&&i.config.editorAttrs?(u(),a(),f()):setTimeout(()=>{c()},100)}function p(){if(n&&n.OpenApi){const e=n.OpenApi;s=new e(i.id,l),window.Api=s.GetOpenApi(),g()}}function f(){var e=document.createElement("script"),d=`${r}/editors/spireapi/SpireCloudEditor.js`;e.setAttribute("src",d),e.onload=()=>p(),document.body.appendChild(e)}function u(){l=i.config}function a(){i.serverUrl?i.serverUrl.endsWith("/")?r=i.serverUrl.substring(0,i.serverUrl.length-1):r=i.serverUrl:r=window.location.origin}function g(){let e=document.getElementsByClassName("spire-officejs-EditorWarpper");e.length&&(e[0]&&(e[0].style.height=screen.availHeight+"px"),window.scrollTo(0,-1),e[0]&&(e[0].style.height=window.innerHeight+"px"))}return(e,d)=>(t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",{id:o.id},null,8,h)]))}});exports.default=m;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("./style/index.css");const n=require("spire.officejs-web-editors-test"),v={class:"spire-officejs-EditorWarpper"},h=["id"],m=t.defineComponent({name:"spire-officejs-Editor",__name:"officeJs-editor",props:{id:{type:String,default:"SpireofficejsEditor"},config:{type:Object,required:!0},serverUrl:{type:String,default:"http://127.0.0.1:3001"}},setup(o){let s,r,l;const i=o;t.onMounted(()=>{c()});function c(){i.config&&i.config.editorAttrs?(u(),a(),f()):setTimeout(()=>{c()},100)}function p(){if(n&&n.OpenApi){const e=n.OpenApi;s=new e(i.id,l),window.Api=s.GetOpenApi(),g()}}function f(){var e=document.createElement("script"),d=`${r}/editors/spireapi/SpireCloudEditor.js`;e.setAttribute("src",d),e.onload=()=>p(),document.body.appendChild(e)}function u(){l=i.config}function a(){i.serverUrl?i.serverUrl.endsWith("/")?r=i.serverUrl.substring(0,i.serverUrl.length-1):r=i.serverUrl:r=window.location.origin}function g(){let e=document.getElementsByClassName("spire-officejs-EditorWarpper");e.length&&(e[0]&&(e[0].style.height=screen.availHeight+"px"),window.scrollTo(0,-1),e[0]&&(e[0].style.height=window.innerHeight+"px"))}return(e,d)=>(t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",{id:o.id},null,8,h)]))}});exports.default=m;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spire.officejs-vue-test",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"scripts": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"**/*.css"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"spire.officejs-test": "
|
|
22
|
-
"vite-plugin-spire.officejs-test": "
|
|
21
|
+
"spire.officejs-test": "^1.0.0",
|
|
22
|
+
"vite-plugin-spire.officejs-test": "^1.0.0"
|
|
23
23
|
},
|
|
24
24
|
"author": "e-iceblue",
|
|
25
25
|
"license": "MIT",
|