cnhis-design-vue 3.2.5-beta.43 → 3.2.5-beta.44
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
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e,drawText as i,defaultRectStyle as n,drawTextGroup as o,drawLine as r,drawPoint as l}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import{drawScaleNumber as c}from"../useScaleColumn.js";import"vue";import{getScaleNumberList as
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e,drawText as i,defaultRectStyle as n,drawTextGroup as o,drawLine as r,drawPoint as l}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import{drawScaleNumber as c}from"../useScaleColumn.js";import{useCommon as f}from"../useCommon.js";import"vue";import{getScaleNumberList as u}from"../../utils/index.js";import{isArray as d,cloneDeep as m}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function p(p,h,g,v,x){const{computedX:L,getXValue:X}=a(h),{originX:C,endX:w,xCellWidth:y,originYXAxis:Y,top:S,canvasWidth:j,borderStyle:b,treeData:G,xAxis:k,topGridYNumber:E,topGridOriginY:I,topGridYCellHeight:M,topGridEndY:z,event:A}=h,{getPointEventProps:$}=f(p,g,h),V=new Set;function D(t,e,i){let n;const{content:o}=t.value||{},{startLine:r,endLine:s,centerLine:a}=e;if(o&&(r||a||s)){const{textStyle:a}=S.dataStyle||{};n=l(o,{fontSize:12,...a,backgroundColor:"#fff",lockMovementX:!0,lockMovementY:!0});const c=N(n,e,i);n&&(n.set(c),n.origin={data:t},T(n),r&&(r.text=n),s&&(s.text=n))}return n}function N(t,e,i){const n=t.width+1,{startLine:o,centerLine:r,endLine:l}=e,s={top:i,originX:"center",originY:"center"};return r&&n<=r.width?s.left=r.x1+r.width/2:l&&n<=l.limitX.x2-l.left?(s.originX="left",s.left=l.left+1):o&&!l&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):r?(s.originY="top",s.left=r.x1+r.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function P(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:a,y2:c,halfY:f}=e;if(!s||s<C||s>w)return;const{lineStyle:u}=S.dataStyle||{};let d;const m={left:s,top:f};d=i?l("circle",{fill:u.stroke,...m}):n?l(">",{fill:u.stroke,...m,fontSize:18}):r([s,a,s,f],u);const p=new t.Rect({width:y,height:M,fill:"transparent",left:s-y/2,top:a}),h=new t.Group([d,p],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",...$(),lockMovementY:!0});return h.isLeft=o,h.isCustomIcon=i,T(h),h}function T(t){A.hovered&&(t.on("mouseover",(()=>{B(t,"hover")})),t.on("mouseout",(()=>{v.show=!1}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1);t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(t),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=N(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(t),A.hovered&&B(t)})),t.on("mouseup",(e=>{if(1===e.button){!function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(t);const e={type:"tree",...t.origin};g("change",e)}})))}function B(t,e="moving"){var i,n,o;const{data:r}=t.origin;v.point={x:t.left,y:t.top};let[l="",s=""]=r.time||[];if("moving"===e){const e=X(t.left);t.isLeft?l=e:s=e,r.time=[l,s],t.text&&(t.text.origin.data.time=[l,s])}v.list=[`开始时间 ${l}`,`结束时间 ${s}`,`流速 ${(null==(i=r.value)?void 0:i.currentSpeed)||""}`,`浓度 ${(null==(n=r.value)?void 0:n.consistence)||""}`,`总量 ${(null==(o=r.value)?void 0:o.total)||""}`],v.sourceData=[{type:"tree",startTime:l,endTime:s,value:r.value}],v.isTarget=!0,v.show=!0}s(p,{...h,gridYNumber:E,originY:I,yCellHeight:M,endY:z}),function(){const{height:o,list:r,left:l,spaceValue:s,style:a,marginBottom:c}=k;if(!o)return;const f=[],u=Y+(c?o-c:o/2),d=c?"bottom":"center";r.forEach(((t,e)=>{const n=l+e*y*s;f.push(i([n,u],{value:t.slice(11,16),originY:d,...a}))}));const m=f.length>0?new t.Group([...f],{...e,objectCaching:!1}):null;m&&p.value.add(m);const h=new t.Rect({width:j,height:o,left:0,top:Y,...n,originX:"left",originY:"top",...b});p.value.add(h);const{show:g=!0}=S}(),function(){var i;const n=(null==(i=null==S?void 0:S.tree)?void 0:i.textStyle)||{},l=[];!function t(e){e.forEach((e=>{var i;const{width:s,height:a,left:c,top:f,title:u=""}=e,d={value:u,...n};(null==(i=e.children)?void 0:i.length)?(d.value=u.split("").join("\n"),t(e.children)):(d.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e}=S.dataStyle||{},i=t.top,n=i+M,o=n-M/2,l={y1:i,y2:n,halfY:o};let s=null;const a=m(t);delete a.data,t.data.forEach(((t,i,n)=>{const{time:c,continue:f}=t,[u,d]=c,m=u&&L(u),p=d&&L(d),h=P({...l,x:m},{isCustomIcon:!p&&!f,isContinue:!1,isLeft:!0}),g=P({...l,x:p},{isCustomIcon:!1,isContinue:!!f});let v;if((h||m<C)&&(g||p>w)){v=r([h?m:C,o,g?p:w,o],e)}const x={startLine:h,centerLine:v,endLine:g};let X,y;!function(t,e,i){const{startLine:n,centerLine:o,endLine:r}=e,{startLine:l,endLine:s}=t||{};if(n){n.origin=i;const t={x1:C,x2:r?r.left:w};s?(t.x1=s.left,s.limitX.x2=n.left,n.prevLine=s,s.nextLine=n):l&&(t.x1=l.left,l.limitX.x2=n.left,n.prevLine=l,l.nextLine=n),n.limitX=t,o&&(n.centerLine=o)}if(r){r.origin=i;const t={x1:n?n.left:C,x2:w};r.limitX=t,o&&(r.centerLine=o)}n&&r&&(n.nearLine=r,r.nearLine=n)}(s,x,Object.assign({},a,{data:t,index:i})),s&&(X=D(n[i-1],s,o)),i===n.length-1&&(y=D(t,x,o)),s=x,v&&V.add(v),h&&V.add(h),g&&V.add(g),X&&V.add(X),y&&V.add(y)}))}(e)),l.push(o({width:s,height:a,...b},d,{left:c,top:f},!0))}))}(G);const s=l.length>0?new t.Group([...l],{...e,objectCaching:!1}):null;s&&p.value.add(s),V.size&&p.value.add(...V)}(),function(){const{show:i=!0,range:n,spaceValue:o=.5,spaceGridNumber:r=1,style:l,margin:s=5}=(null==S?void 0:S.scaleValue)||{};if(!i||!d(n))return;const a=u(n,o),f=[];if(a.forEach(((t,e)=>{if(0===e||e===a.length-1)return;const i=z-e*M*r;Math.abs(i-I)<1||f.push(c(String(t),{style:l,position:"right"},w+s,i))})),!f.length)return;const m=new t.Group(f,{objectCaching:!1,...e});p.value.add(m)}()}export{p as useTop};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.5-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.5-beta.44",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.5-beta.44",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.2.5-beta.
|
|
3
|
+
"version": "3.2.5-beta.44",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "72e54a88c735af6de8a51c86eb83db98381f3273"
|
|
75
75
|
}
|