@qy_better_lib/core 0.1.1 → 0.1.2

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.
@@ -1 +1 @@
1
- (function(o,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(o=typeof globalThis<"u"?globalThis:o||self,d(o["@qy_better_lib/core"]={}))})(this,(function(o){"use strict";function d(){return Math.floor(Math.random()*1e4)}function M(e){return Math.floor(Math.random()*Math.floor(e))}function D(){const e=p;return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}function p(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}function F(e){return e===void 0}function O(e){return Object.prototype.toString.call(e)==="[object Array]"}function m(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"}function w(e){return Object.prototype.toString.call(e)==="[object Date]"}function C(e){return!e&&e!==0||O(e)&&e.length===0||m(e)&&!Object.keys(e).length}function b(e){return typeof Element>"u"?!1:e instanceof Element}const k=typeof window<"u",h=e=>typeof e=="number",N=e=>typeof e=="string",j=e=>N(e)?!Number.isNaN(Number(e)):!1;function A(e){return/^1[3-9]\d{9}$/.test(e)}function B(e){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)}function L(e){return/^(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)$/.test(e)}function R(e,t="key",n="children"){const r={},i=(s,c)=>{for(let u=0;u<s.length;u++){const a=s[u],f=a[t];if(!r[f]){r[f]=a,c&&(r[f].parent=r[c]);const g=a[n];g&&g.length>0&&i(g,a[t])}}};return i(e),r}function P(e){return e?Object.prototype.toString.call(1)!=="[object Number]"?`${e}`:`${e}`.replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g,"$1,"):"0"}function H(e,t){return h(e)?Number(t?Number(e).toFixed(t):e):Number.NaN}function J(e,t){return h(e)?Number(e.toFixed(t)):Number.NaN}function U(){const e=localStorage.getItem("token");if(!e)return;const t=JSON.parse(e);if(t!==null)if(t.expirse!=null&&t.expirse<new Date().getTime())localStorage.removeItem("token");else return t.value;return null}function W(e,t){!t&&(t=10080*60*1e3)||(t=t*1e3);const n={value:e,expirse:new Date().getTime()+t};localStorage.setItem("token",JSON.stringify(n))}function q(){localStorage.removeItem("token")}function z(e,t,n="local"){const r=n=="local"?localStorage:sessionStorage;t!=null&&r.setItem(e,JSON.stringify(t))}function V(e,t="local"){let r=(t=="local"?localStorage:sessionStorage).getItem(e);return r&&JSON.parse(r||"")}function Y(e,t="local"){(t=="local"?localStorage:sessionStorage).removeItem(e)}function G(e="local"){(e=="local"?localStorage:sessionStorage).clear()}function v(e){const t=Object.prototype.toString;if(!e||typeof e!="object")return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(t.call(e)==="[object Date]")return new Date(e.getTime());if(t.call(e)==="[object RegExp]"){const r=[];return e.global&&r.push("g"),e.multiline&&r.push("m"),e.ignoreCase&&r.push("i"),new RegExp(e.source,r.join(""))}if(t.call(e)==="[object FormData]"){const r=new FormData;for(const[i,s]of e.entries())r.append(i,s);return r}const n=Array.isArray(e)?[]:e.constructor?new e.constructor:{};for(const r in e)n[r]=v(e[r]);return n}function I(...e){let t=e.length,n=e[0];m(n)||(n={});for(let r=1;r<t;r++){let i=e[r];if(m(i))for(let s in i)s==="__proto__"||n===i[s]||(m(i[s])?n[s]=I(n[s],i[s]):n[s]=i[s])}return n}function y(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return console.log("对象比较-a.constructor",e.constructor,"对象比较-b.constructor",t.constructor),!1;let n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return console.log("对象比较-a.length",e.length,"对象比较-b.length",t.length),!1;for(r=n;r--!==0;)if(!y(e[r],t[r]))return console.log("对象比较-a[i]",e[r],"对象比较-b[i]",t[r]),!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()!==t.valueOf()&&console.log("对象比较-a.valueOf()",e.valueOf(),"对象比较-b.valueOf()",e.valueOf()),e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString()&&console.log("对象比较-a.toString()",e.toString(),"对象比较-b.toString()",t.toString()),e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return console.log("对象比较-Object.keys(a).length",Object.keys(e).length,"对象比较-Object.keys(b).length",Object.keys(t).length),!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return console.log("对象比较-keys[i]",i[r],"对象比较-b",t),!1;for(r=n;r--!==0;){const s=i[r];if(!y(e[s],t[s]))return console.log("对象比较-a[key]",e[s],"对象比较-b[key]",t[s]),!1}return!0}return e!==e&&t!==t||console.log("对象比较-a",e,"对象比较-b",t),e!==e&&t!==t}function T(e,t){return!e||e.tagName==="BODY"?null:e.classList.contains(t)?e:T(e.parentNode,t)}function K(e,t=!0){setTimeout(()=>{const n=document.getElementById(e);n?.scrollTo({top:n.scrollHeight,behavior:t?"smooth":void 0})},300)}function _({path:e,name:t}){const n=document.createElement("a");n.href=e,n.target="_blank",t&&n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Q(e){e.forEach(t=>{_({path:t.url,name:t.name})})}async function X(e){if(!e)return;const t=new FileReader;return t.readAsDataURL(e),new Promise((n,r)=>{t.onload=i=>n(i.target?.result),t.onerror=i=>r(void 0)})}function Z(e,t,n){n=Math.max(Math.min(Number(n),1),0);let r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),s=parseInt(e.substring(5,7),16),c=parseInt(t.substring(1,3),16),u=parseInt(t.substring(3,5),16),a=parseInt(t.substring(5,7),16),f=Math.round(r*(1-n)+c*n),g=Math.round(i*(1-n)+u*n),S=Math.round(s*(1-n)+a*n);return`#${("0"+(f||0).toString(16)).slice(-2)}${("0"+(g||0).toString(16)).slice(-2)}${("0"+(S||0).toString(16)).slice(-2)}`}function x(e){return`${Math.round(parseInt(e.substring(1,3),16))},${Math.round(parseInt(e.substring(3,5),16))},${Math.round(parseInt(e.substring(5,7),16))}`}function ee(e,t=200){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}function te(e,t=200){let n=0;return function(...r){const i=Date.now();i-n>=t&&(e.apply(this,r),n=i)}}function ne(e,t=1920){let n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;if(!n)return e;let r=n/t;return Number((e*r).toFixed(3))}function re(e,t,n){return{type:"linear",x:0,y:0,x2:e==="v"?0:1,y2:e==="v"?1:0,colorStops:[{offset:0,color:t},{offset:1,color:n}]}}const l=new Map;let $;k&&(document.addEventListener("mousedown",e=>$=e),document.addEventListener("mouseup",e=>{for(const t of l.values())for(const{documentHandler:n}of t)n(e,$)}));function E(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:b(t.arg)&&n.push(t.arg),function(r,i){const s=t.instance.popperRef,c=r.target,u=i?.target,a=!t||!t.instance,f=!c||!u,g=e.contains(c)||e.contains(u),S=e===c,ie=n.length&&n.some(ce=>ce?.contains(c))||n.length&&n.includes(u),se=s&&(s.contains(c)||s.contains(u));a||f||g||S||ie||se||t.value(r,i)}}const oe={beforeMount(e,t){l.has(e)||l.set(e,[]),l.get(e)?.push({documentHandler:E(e,t),bindingFn:t.value})},updated(e,t){l.has(e)||l.set(e,[]);const n=l.get(e),r=n?.findIndex(s=>s.bindingFn===t.oldValue),i={documentHandler:E(e,t),bindingFn:t.value};r&&r>=0?n?.splice(r,1,i):n?.push(i)},unmounted(e){l.delete(e)}};o.ClickOutside=oe,o.auto_chart_size=ne,o.clearStorage=G,o.debounce=ee,o.deepAssign=I,o.deepClone=v,o.deepEqual=y,o.downLoadFile=_,o.downLoadFiles=Q,o.generateId=d,o.generateString=p,o.getParentByClass=T,o.getRandomInt=M,o.getStorage=V,o.getToken=U,o.get_chart_gradient_color=re,o.get_rgb=x,o.guiID=D,o.isArray=O,o.isClient=k,o.isDate=w,o.isElement=b,o.isEmpty=C,o.isIp=B,o.isMobile=A,o.isNumber=h,o.isObject=m,o.isPort=L,o.isString=N,o.isStringNumber=j,o.isUndefined=F,o.mix=Z,o.removeStorage=Y,o.removeToken=q,o.scroll_footer=K,o.setStorage=z,o.setToken=W,o.thousandSeparator=P,o.throttle=te,o.toBase64=X,o.toFixed=J,o.toNumber=H,o.treeFlat=R,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(o,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(o=typeof globalThis<"u"?globalThis:o||self,d(o["@qy_better_lib/core"]={}))})(this,(function(o){"use strict";function d(){return Math.floor(Math.random()*1e4)}function _(e){return Math.floor(Math.random()*Math.floor(e))}function D(){const e=p;return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}function p(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}function F(e){return e===void 0}function O(e){return Object.prototype.toString.call(e)==="[object Array]"}function m(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"}function w(e){return Object.prototype.toString.call(e)==="[object Date]"}function C(e){return!e&&e!==0||O(e)&&e.length===0||m(e)&&!Object.keys(e).length}function b(e){return typeof Element>"u"?!1:e instanceof Element}const k=typeof window<"u",h=e=>typeof e=="number",N=e=>typeof e=="string",j=e=>N(e)?!Number.isNaN(Number(e)):!1;function A(e){return/^1[3-9]\d{9}$/.test(e)}function B(e){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)}function L(e){return/^(6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)$/.test(e)}function R(e,t="key",n="children"){const r={},i=(s,u)=>{for(let c=0;c<s.length;c++){const a=s[c],f=a[t];if(!r[f]){r[f]=a,u&&(r[f].parent=r[u]);const g=a[n];g&&g.length>0&&i(g,a[t])}}};return i(e),r}function P(e){return e?Object.prototype.toString.call(1)!=="[object Number]"?`${e}`:`${e}`.replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g,"$1,"):"0"}function H(e,t){return h(e)?Number(t?Number(e).toFixed(t):e):Number.NaN}function J(e,t){return h(e)?Number(e.toFixed(t)):Number.NaN}function U(){const e=localStorage.getItem("token");if(!e)return;const t=JSON.parse(e);if(t!==null)if(t.expirse!=null&&t.expirse<new Date().getTime())localStorage.removeItem("token");else return t.value;return null}function W(e,t){!t&&(t=10080*60*1e3)||(t=t*1e3);const n={value:e,expirse:new Date().getTime()+t};localStorage.setItem("token",JSON.stringify(n))}function q(){localStorage.removeItem("token")}function z(e,t,n="local"){const r=n=="local"?localStorage:sessionStorage;t!=null&&r.setItem(e,JSON.stringify(t))}function V(e,t="local"){let r=(t=="local"?localStorage:sessionStorage).getItem(e);return r&&JSON.parse(r||"")}function Y(e,t="local"){(t=="local"?localStorage:sessionStorage).removeItem(e)}function G(e="local"){(e=="local"?localStorage:sessionStorage).clear()}function v(e){const t=Object.prototype.toString;if(!e||typeof e!="object")return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(t.call(e)==="[object Date]")return new Date(e.getTime());if(t.call(e)==="[object RegExp]"){const r=[];return e.global&&r.push("g"),e.multiline&&r.push("m"),e.ignoreCase&&r.push("i"),new RegExp(e.source,r.join(""))}if(t.call(e)==="[object FormData]"){const r=new FormData;for(const[i,s]of e.entries())r.append(i,s);return r}const n=Array.isArray(e)?[]:e.constructor?new e.constructor:{};for(const r in e)n[r]=v(e[r]);return n}function I(...e){let t=e.length,n=e[0];m(n)||(n={});for(let r=1;r<t;r++){let i=e[r];if(m(i))for(let s in i)s==="__proto__"||n===i[s]||(m(i[s])?n[s]=I(n[s],i[s]):n[s]=i[s])}return n}function y(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return console.log("对象比较-a.constructor",e.constructor,"对象比较-b.constructor",t.constructor),!1;let n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return console.log("对象比较-a.length",e.length,"对象比较-b.length",t.length),!1;for(r=n;r--!==0;)if(!y(e[r],t[r]))return console.log("对象比较-a[i]",e[r],"对象比较-b[i]",t[r]),!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()!==t.valueOf()&&console.log("对象比较-a.valueOf()",e.valueOf(),"对象比较-b.valueOf()",e.valueOf()),e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString()&&console.log("对象比较-a.toString()",e.toString(),"对象比较-b.toString()",t.toString()),e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return console.log("对象比较-Object.keys(a).length",Object.keys(e).length,"对象比较-Object.keys(b).length",Object.keys(t).length),!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return console.log("对象比较-keys[i]",i[r],"对象比较-b",t),!1;for(r=n;r--!==0;){const s=i[r];if(!y(e[s],t[s]))return console.log("对象比较-a[key]",e[s],"对象比较-b[key]",t[s]),!1}return!0}return e!==e&&t!==t||console.log("对象比较-a",e,"对象比较-b",t),e!==e&&t!==t}function T(e,t){return!e||e.tagName==="BODY"?null:e.classList.contains(t)?e:T(e.parentNode,t)}function K(e,t=!0){setTimeout(()=>{const n=document.getElementById(e);n?.scrollTo({top:n.scrollHeight,behavior:t?"smooth":void 0})},300)}function $({path:e,name:t}){const n=document.createElement("a");n.href=e,n.target="_blank",t&&n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Q(e){e.forEach(t=>{$({path:t.url,name:t.name})})}async function X(e){if(!e)return;const t=new FileReader;return t.readAsDataURL(e),new Promise((n,r)=>{t.onload=i=>n(i.target?.result),t.onerror=i=>r(void 0)})}function Z(e,t,n){n=Math.max(Math.min(Number(n),1),0);let r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),s=parseInt(e.substring(5,7),16),u=parseInt(t.substring(1,3),16),c=parseInt(t.substring(3,5),16),a=parseInt(t.substring(5,7),16),f=Math.round(r*(1-n)+u*n),g=Math.round(i*(1-n)+c*n),S=Math.round(s*(1-n)+a*n);return`#${("0"+(f||0).toString(16)).slice(-2)}${("0"+(g||0).toString(16)).slice(-2)}${("0"+(S||0).toString(16)).slice(-2)}`}function x(e){return`${Math.round(parseInt(e.substring(1,3),16))},${Math.round(parseInt(e.substring(3,5),16))},${Math.round(parseInt(e.substring(5,7),16))}`}function ee(e,t=200){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}function te(e,t=200){let n=0;return function(...r){const i=Date.now();i-n>=t&&(e.apply(this,r),n=i)}}function ne(e,t=1920){let n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;if(!n)return e;let r=n/t;return Number((e*r).toFixed(3))}function re(e,t,n){return{type:"linear",x:0,y:0,x2:e==="v"?0:1,y2:e==="v"?1:0,colorStops:[{offset:0,color:t},{offset:1,color:n}]}}const l=new Map;let E;k&&(document.addEventListener("mousedown",e=>E=e),document.addEventListener("mouseup",e=>{for(const t of l.values())for(const{documentHandler:n}of t)n(e,E)}));function M(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:b(t.arg)&&n.push(t.arg),function(r,i){const s=t.instance.popperRef,u=r.target,c=i?.target,a=!t||!t.instance,f=!u||!c,g=e.contains(u)||e.contains(c),S=e===u,ie=n.length&&n.some(ue=>ue?.contains(u))||n.length&&n.includes(c),se=s&&(s.contains(u)||s.contains(c));a||f||g||S||ie||se||t.value(r,i)}}const oe={beforeMount(e,t){l.has(e)||l.set(e,[]),l.get(e)?.push({documentHandler:M(e,t),bindingFn:t.value})},updated(e,t){l.has(e)||l.set(e,[]);const n=l.get(e),r=n?.findIndex(s=>s.bindingFn===t.oldValue),i={documentHandler:M(e,t),bindingFn:t.value};r&&r>=0?n?.splice(r,1,i):n?.push(i)},unmounted(e){l.delete(e)}};o.ClickOutside=oe,o.auto_size=ne,o.clearStorage=G,o.debounce=ee,o.deepAssign=I,o.deepClone=v,o.deepEqual=y,o.downLoadFile=$,o.downLoadFiles=Q,o.generateId=d,o.generateString=p,o.getParentByClass=T,o.getRandomInt=_,o.getStorage=V,o.getToken=U,o.get_chart_gradient_color=re,o.get_rgb=x,o.guiID=D,o.isArray=O,o.isClient=k,o.isDate=w,o.isElement=b,o.isEmpty=C,o.isIp=B,o.isMobile=A,o.isNumber=h,o.isObject=m,o.isPort=L,o.isString=N,o.isStringNumber=j,o.isUndefined=F,o.mix=Z,o.removeStorage=Y,o.removeToken=q,o.scroll_footer=K,o.setStorage=z,o.setToken=W,o.thousandSeparator=P,o.throttle=te,o.toBase64=X,o.toFixed=J,o.toNumber=H,o.treeFlat=R,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})}));
package/lib/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { generateId as r, generateString as t, getRandomInt as i, guiID as a } from "./utils/random.js";
2
- import { isArray as n, isClient as m, isDate as g, isElement as p, isEmpty as d, isIp as l, isMobile as f, isNumber as x, isObject as u, isPort as c, isString as S, isStringNumber as b, isUndefined as _ } from "./utils/is.js";
3
- import { treeFlat as k } from "./utils/tree.js";
4
- import { thousandSeparator as F, toFixed as I, toNumber as y } from "./utils/number.js";
1
+ import { generateId as r, generateString as t, getRandomInt as i, guiID as s } from "./utils/random.js";
2
+ import { isArray as n, isClient as m, isDate as g, isElement as p, isEmpty as d, isIp as l, isMobile as f, isNumber as x, isObject as u, isPort as S, isString as b, isStringNumber as c, isUndefined as _ } from "./utils/is.js";
3
+ import { treeFlat as C } from "./utils/tree.js";
4
+ import { thousandSeparator as I, toFixed as h, toNumber as y } from "./utils/number.js";
5
5
  import { clearStorage as N, getStorage as T, getToken as v, removeStorage as w, removeToken as A, setStorage as B, setToken as D } from "./utils/storage.js";
6
6
  import { deepAssign as O, deepClone as P, deepEqual as j } from "./utils/object.js";
7
7
  import { getParentByClass as z, scroll_footer as M } from "./utils/dom.js";
8
8
  import { downLoadFile as U, downLoadFiles as G, toBase64 as H } from "./utils/file.js";
9
9
  import { get_rgb as K, mix as Q } from "./utils/color.js";
10
10
  import { debounce as W, throttle as X } from "./utils/share.js";
11
- import { auto_chart_size as Z, get_chart_gradient_color as $ } from "./utils/echarts.js";
11
+ import { auto_size as Z, get_chart_gradient_color as $ } from "./utils/echarts.js";
12
12
  import { default as oe } from "./directives/click-outside.js";
13
13
  export {
14
14
  oe as ClickOutside,
15
- Z as auto_chart_size,
15
+ Z as auto_size,
16
16
  N as clearStorage,
17
17
  W as debounce,
18
18
  O as deepAssign,
@@ -28,7 +28,7 @@ export {
28
28
  v as getToken,
29
29
  $ as get_chart_gradient_color,
30
30
  K as get_rgb,
31
- a as guiID,
31
+ s as guiID,
32
32
  n as isArray,
33
33
  m as isClient,
34
34
  g as isDate,
@@ -38,9 +38,9 @@ export {
38
38
  f as isMobile,
39
39
  x as isNumber,
40
40
  u as isObject,
41
- c as isPort,
42
- S as isString,
43
- b as isStringNumber,
41
+ S as isPort,
42
+ b as isString,
43
+ c as isStringNumber,
44
44
  _ as isUndefined,
45
45
  Q as mix,
46
46
  w as removeStorage,
@@ -48,10 +48,10 @@ export {
48
48
  M as scroll_footer,
49
49
  B as setStorage,
50
50
  D as setToken,
51
- F as thousandSeparator,
51
+ I as thousandSeparator,
52
52
  X as throttle,
53
53
  H as toBase64,
54
- I as toFixed,
54
+ h as toFixed,
55
55
  y as toNumber,
56
- k as treeFlat
56
+ C as treeFlat
57
57
  };
@@ -4,7 +4,7 @@
4
4
  * @param defalteWidth
5
5
  * @returns
6
6
  */
7
- export declare function auto_chart_size(size: number, defalteWidth?: number): number;
7
+ export declare function auto_size(size: number, defalteWidth?: number): number;
8
8
  /**
9
9
  * Echarts线性渐变颜色
10
10
  */
@@ -4,7 +4,7 @@ function r(t, o = 1920) {
4
4
  let n = e / o;
5
5
  return Number((t * n).toFixed(3));
6
6
  }
7
- function c(t, o, e) {
7
+ function i(t, o, e) {
8
8
  return {
9
9
  type: "linear",
10
10
  x: 0,
@@ -26,6 +26,6 @@ function c(t, o, e) {
26
26
  };
27
27
  }
28
28
  export {
29
- r as auto_chart_size,
30
- c as get_chart_gradient_color
29
+ r as auto_size,
30
+ i as get_chart_gradient_color
31
31
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qy_better_lib/core",
3
3
  "private": false,
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "qy better lib core",
6
6
  "author": "luhuiming",
7
7
  "license": "ISC",