@gx-design-vue/pro-utils 0.0.6-rc.1 → 0.0.7

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/dist/index.es.js CHANGED
@@ -924,5 +924,15 @@ function isBase64(str = '') {
924
924
  }
925
925
  return false;
926
926
  }
927
+ const on = function (element, event, handler, useCapture = false) {
928
+ if (element && event && handler) {
929
+ element.addEventListener(event, handler, useCapture);
930
+ }
931
+ };
932
+ const off = function (element, event, handler, useCapture = false) {
933
+ if (element && event && handler) {
934
+ element.removeEventListener(event, handler, useCapture);
935
+ }
936
+ };
927
937
 
928
- export { arrayRepeat, blobToDataURL, checkFileType, compareArray, dataURLtoBlob, dataURLtoFile, deepCopy, formatDuraton, genColumnKey, generateVidoePicture, getBase64, getBlobUrl, getFileSuffix, getLevelData, getMaxFloor, getMediaInfos, getPrefixCls, getRandomNumber, getScroll, getScrollContainer, getSlot, getSlotVNode, getSortIndex, getVideoCoverPicture, getVideoFileUrl, handleCurrentPage, handleShowIndex, hanndleField, is, isArray, isBase64, isBoolean, isFunction, isInContainer, isNumber, isObject, isScroll, isServer, isString, runFunction, scrollTo, throttleByAnimationFrame, treeData };
938
+ export { arrayRepeat, blobToDataURL, checkFileType, compareArray, dataURLtoBlob, dataURLtoFile, deepCopy, formatDuraton, genColumnKey, generateVidoePicture, getBase64, getBlobUrl, getFileSuffix, getLevelData, getMaxFloor, getMediaInfos, getPrefixCls, getRandomNumber, getScroll, getScrollContainer, getSlot, getSlotVNode, getSortIndex, getVideoCoverPicture, getVideoFileUrl, handleCurrentPage, handleShowIndex, hanndleField, is, isArray, isBase64, isBoolean, isFunction, isInContainer, isNumber, isObject, isScroll, isServer, isString, off, on, runFunction, scrollTo, throttleByAnimationFrame, treeData };
package/dist/index.js CHANGED
@@ -928,6 +928,16 @@ function isBase64(str = '') {
928
928
  }
929
929
  return false;
930
930
  }
931
+ const on = function (element, event, handler, useCapture = false) {
932
+ if (element && event && handler) {
933
+ element.addEventListener(event, handler, useCapture);
934
+ }
935
+ };
936
+ const off = function (element, event, handler, useCapture = false) {
937
+ if (element && event && handler) {
938
+ element.removeEventListener(event, handler, useCapture);
939
+ }
940
+ };
931
941
 
932
942
  exports.arrayRepeat = arrayRepeat;
933
943
  exports.blobToDataURL = blobToDataURL;
@@ -968,6 +978,8 @@ exports.isObject = isObject;
968
978
  exports.isScroll = isScroll;
969
979
  exports.isServer = isServer;
970
980
  exports.isString = isString;
981
+ exports.off = off;
982
+ exports.on = on;
971
983
  exports.runFunction = runFunction;
972
984
  exports.scrollTo = scrollTo;
973
985
  exports.throttleByAnimationFrame = throttleByAnimationFrame;
@@ -5,6 +5,7 @@ export declare type WithFalse<T> = T | false;
5
5
  export declare type RecordType = Record<string, any>;
6
6
  export declare type VueNode = VNodeChild | JSX.Element;
7
7
  export declare type CustomRender = Slot | VNodeChild | VNode | ((...props: any[]) => Slot) | ((...props: any[]) => VNode) | ((...args: any[]) => VNode) | VNode[] | JSX.Element | string | null | undefined;
8
+ export declare type SizeType = 'small' | 'middle' | 'large' | undefined;
8
9
  export declare type AlignType = 'left' | 'center' | 'right';
9
10
  export declare type BasicTablePageConfig = {
10
11
  current: number;
@@ -207,3 +207,5 @@ export declare function generateVidoePicture(videoUrl: string, currentTime?: num
207
207
  * @description 判断是否是base64码
208
208
  */
209
209
  export declare function isBase64(str?: string): boolean;
210
+ export declare const on: (element: HTMLElement | Document | Window | null, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
211
+ export declare const off: (element: HTMLElement | Document | Window | null, event: string, handler: EventListenerOrEventListenerObject, useCapture?: boolean) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/pro-utils",
3
- "version": "0.0.6-rc.1",
3
+ "version": "0.0.7",
4
4
  "description": "@gx-design-vue/pro-utils",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",