vue-editify 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/insertImage/insertImage.vue.d.ts +3 -3
- package/lib/components/insertImage/props.d.ts +1 -1
- package/lib/components/insertVideo/insertVideo.vue.d.ts +3 -3
- package/lib/components/insertVideo/props.d.ts +1 -1
- package/lib/core/tool.d.ts +12 -3
- package/lib/editify/props.d.ts +1 -1
- package/lib/editify.es.js +12794 -12787
- package/lib/editify.umd.js +2 -2
- package/lib/index.d.ts +731 -5
- package/lib/plugins/attachment/index.d.ts +1 -1
- package/lib/plugins/attachment/insertAttachment/insertAttachment.vue.d.ts +3 -3
- package/lib/plugins/attachment/insertAttachment/props.d.ts +1 -1
- package/lib/plugins/infoBlock/index.d.ts +1 -1
- package/lib/plugins/mathformula/index.d.ts +1 -1
- package/lib/plugins/panel/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/button/button.vue +5 -5
- package/src/components/button/props.ts +1 -1
- package/src/components/checkbox/checkbox.vue +3 -3
- package/src/components/checkbox/props.ts +1 -1
- package/src/components/colors/colors.vue +3 -3
- package/src/components/colors/props.ts +1 -1
- package/src/components/insertImage/insertImage.vue +3 -3
- package/src/components/insertImage/props.ts +1 -1
- package/src/components/insertLink/insertLink.vue +1 -1
- package/src/components/insertVideo/insertVideo.vue +3 -3
- package/src/components/insertVideo/props.ts +1 -1
- package/src/components/layer/layer.vue +3 -3
- package/src/components/menu/menu.vue +13 -13
- package/src/components/menu/props.ts +1 -1
- package/src/components/toolbar/props.ts +1 -1
- package/src/components/toolbar/toolbar.vue +10 -10
- package/src/components/tooltip/tooltip.vue +1 -1
- package/src/components/triangle/triangle.vue +1 -1
- package/src/core/function.ts +2 -2
- package/src/core/rule.ts +4 -4
- package/src/core/tool.ts +22 -8
- package/src/editify/editify.vue +8 -8
- package/src/editify/props.ts +2 -2
- package/src/index.ts +24 -21
- package/src/plugins/attachment/index.ts +8 -8
- package/src/plugins/attachment/insertAttachment/insertAttachment.vue +3 -3
- package/src/plugins/attachment/insertAttachment/props.ts +1 -1
- package/src/plugins/infoBlock/index.ts +4 -4
- package/src/plugins/mathformula/index.ts +4 -4
- package/src/plugins/panel/index.ts +4 -4
- package/tsconfig.json +4 -0
- package/vite.config.ts +5 -0
@@ -20,7 +20,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
20
20
|
default: null;
|
21
21
|
};
|
22
22
|
customUpload: {
|
23
|
-
type: import('vue').PropType<(files: File[]) => string[] | Promise<string[]
|
23
|
+
type: import('vue').PropType<((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>)>;
|
24
24
|
default: null;
|
25
25
|
};
|
26
26
|
handleError: {
|
@@ -52,7 +52,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
52
52
|
default: null;
|
53
53
|
};
|
54
54
|
customUpload: {
|
55
|
-
type: import('vue').PropType<(files: File[]) => string[] | Promise<string[]
|
55
|
+
type: import('vue').PropType<((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>)>;
|
56
56
|
default: null;
|
57
57
|
};
|
58
58
|
handleError: {
|
@@ -68,7 +68,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
68
68
|
multiple: boolean;
|
69
69
|
maxSize: number;
|
70
70
|
minSize: number;
|
71
|
-
customUpload: (files: File[]) => string[] | Promise<string[]
|
71
|
+
customUpload: ((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>);
|
72
72
|
handleError: (error: import('./props').InsertImageUploadErrorType, file: File) => void;
|
73
73
|
}, {}>;
|
74
74
|
export default _default;
|
@@ -23,7 +23,7 @@ export declare const InsertImageProps: {
|
|
23
23
|
default: null;
|
24
24
|
};
|
25
25
|
customUpload: {
|
26
|
-
type: PropType<(files: File[]) => string[] | Promise<string[]
|
26
|
+
type: PropType<((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>)>;
|
27
27
|
default: null;
|
28
28
|
};
|
29
29
|
handleError: {
|
@@ -20,7 +20,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
20
20
|
default: null;
|
21
21
|
};
|
22
22
|
customUpload: {
|
23
|
-
type: import('vue').PropType<(files: File[]) => string[] | Promise<string[]
|
23
|
+
type: import('vue').PropType<((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>)>;
|
24
24
|
default: null;
|
25
25
|
};
|
26
26
|
handleError: {
|
@@ -52,7 +52,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
52
52
|
default: null;
|
53
53
|
};
|
54
54
|
customUpload: {
|
55
|
-
type: import('vue').PropType<(files: File[]) => string[] | Promise<string[]
|
55
|
+
type: import('vue').PropType<((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>)>;
|
56
56
|
default: null;
|
57
57
|
};
|
58
58
|
handleError: {
|
@@ -68,7 +68,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
68
68
|
multiple: boolean;
|
69
69
|
maxSize: number;
|
70
70
|
minSize: number;
|
71
|
-
customUpload: (files: File[]) => string[] | Promise<string[]
|
71
|
+
customUpload: ((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>);
|
72
72
|
handleError: (error: import('./props').InsertVideoUploadErrorType, file: File) => void;
|
73
73
|
}, {}>;
|
74
74
|
export default _default;
|
@@ -23,7 +23,7 @@ export declare const InsertVideoProps: {
|
|
23
23
|
default: null;
|
24
24
|
};
|
25
25
|
customUpload: {
|
26
|
-
type: PropType<(files: File[]) => string[] | Promise<string[]
|
26
|
+
type: PropType<((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>)>;
|
27
27
|
default: null;
|
28
28
|
};
|
29
29
|
handleError: {
|
package/lib/core/tool.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
+
import { App, Component, ComponentInternalInstance, VNode } from 'vue';
|
1
2
|
import { AlexElement } from 'alex-editor';
|
2
3
|
import { ButtonOptionsItemType, ButtonTypeType } from '../components/button/props';
|
3
4
|
import { LocaleType } from '../locale';
|
4
5
|
import { InsertImageUploadErrorType } from '../components/insertImage/props';
|
5
|
-
import { ComponentInternalInstance, VNode } from 'vue';
|
6
6
|
import { default as Button } from '../components/button/button.vue';
|
7
7
|
|
8
8
|
export type ObjectType = {
|
@@ -36,7 +36,7 @@ export interface MenuImageButtonType extends MenuButtonType {
|
|
36
36
|
multiple?: boolean;
|
37
37
|
maxSize?: number | null;
|
38
38
|
minSize?: number | null;
|
39
|
-
customUpload?: ((
|
39
|
+
customUpload?: ((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>) | null;
|
40
40
|
handleError?: ((error: InsertImageUploadErrorType, file: File) => void) | null;
|
41
41
|
}
|
42
42
|
export interface MenuVideoButtonType extends MenuButtonType {
|
@@ -44,7 +44,7 @@ export interface MenuVideoButtonType extends MenuButtonType {
|
|
44
44
|
multiple?: boolean;
|
45
45
|
maxSize?: number | null;
|
46
46
|
minSize?: number | null;
|
47
|
-
customUpload?: ((
|
47
|
+
customUpload?: ((files: File[]) => string[]) | ((files: File[]) => Promise<string[]>) | null;
|
48
48
|
handleError?: ((error: InsertImageUploadErrorType, file: File) => void) | null;
|
49
49
|
}
|
50
50
|
export interface MenuTableButtonType extends MenuButtonType {
|
@@ -193,6 +193,9 @@ export type PluginResultType = {
|
|
193
193
|
pasteKeepStyles?: (el: AlexElement) => ObjectType;
|
194
194
|
};
|
195
195
|
export type PluginType = (editifyInstance: ComponentInternalInstance, editTrans: (key: string) => any) => PluginResultType;
|
196
|
+
export type SFCWithInstall<T> = T & {
|
197
|
+
install(app: App): void;
|
198
|
+
};
|
196
199
|
/**
|
197
200
|
* 对象平替值方法
|
198
201
|
* @param o1
|
@@ -234,3 +237,9 @@ export declare const getToolbarConfig: (editTrans: (key: string) => any, editLoc
|
|
234
237
|
* @returns
|
235
238
|
*/
|
236
239
|
export declare const getMenuConfig: (editTrans: (key: string) => any, editLocale: LocaleType) => MenuConfigType;
|
240
|
+
/**
|
241
|
+
* 给组件增加install属性
|
242
|
+
* @param component
|
243
|
+
* @returns
|
244
|
+
*/
|
245
|
+
export declare const withInstall: <T extends Component>(component: T) => SFCWithInstall<T>;
|
package/lib/editify/props.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ExtractPublicPropTypes, PropType } from 'vue';
|
2
|
-
import { PluginType, MenuConfigType, ObjectType, ToolbarConfigType } from '../core/tool';
|
3
2
|
import { AlexElement } from 'alex-editor';
|
3
|
+
import { PluginType, MenuConfigType, ObjectType, ToolbarConfigType } from '../core/tool';
|
4
4
|
import { LocaleType } from '../locale';
|
5
5
|
|
6
6
|
export type EditifyResizeParamsType = {
|