vue-editify 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/lib/core/tool.d.ts +10 -1
  2. package/lib/editify/props.d.ts +1 -1
  3. package/lib/editify.es.js +12794 -12787
  4. package/lib/editify.umd.js +2 -2
  5. package/lib/index.d.ts +731 -5
  6. package/lib/plugins/infoBlock/index.d.ts +1 -1
  7. package/lib/plugins/mathformula/index.d.ts +1 -1
  8. package/lib/plugins/panel/index.d.ts +1 -1
  9. package/package.json +1 -1
  10. package/src/components/button/button.vue +5 -5
  11. package/src/components/button/props.ts +1 -1
  12. package/src/components/checkbox/checkbox.vue +3 -3
  13. package/src/components/checkbox/props.ts +1 -1
  14. package/src/components/colors/colors.vue +3 -3
  15. package/src/components/colors/props.ts +1 -1
  16. package/src/components/insertImage/insertImage.vue +3 -3
  17. package/src/components/insertLink/insertLink.vue +1 -1
  18. package/src/components/insertVideo/insertVideo.vue +3 -3
  19. package/src/components/layer/layer.vue +3 -3
  20. package/src/components/menu/menu.vue +13 -13
  21. package/src/components/menu/props.ts +1 -1
  22. package/src/components/toolbar/props.ts +1 -1
  23. package/src/components/toolbar/toolbar.vue +10 -10
  24. package/src/components/tooltip/tooltip.vue +1 -1
  25. package/src/components/triangle/triangle.vue +1 -1
  26. package/src/core/function.ts +2 -2
  27. package/src/core/rule.ts +4 -4
  28. package/src/core/tool.ts +20 -6
  29. package/src/editify/editify.vue +8 -8
  30. package/src/editify/props.ts +2 -2
  31. package/src/index.ts +24 -21
  32. package/src/plugins/attachment/index.ts +7 -7
  33. package/src/plugins/attachment/insertAttachment/insertAttachment.vue +3 -3
  34. package/src/plugins/infoBlock/index.ts +4 -4
  35. package/src/plugins/mathformula/index.ts +4 -4
  36. package/src/plugins/panel/index.ts +4 -4
  37. package/tsconfig.json +4 -0
  38. package/vite.config.ts +5 -0
@@ -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 = {
@@ -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>;
@@ -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 = {