cnhis-design-vue 3.1.51-beta.17 → 3.1.51-beta.19
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/es/components/fabric-chart/index.d.ts +5 -6
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +5 -6
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +0 -6
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
- package/es/components/fabric-chart/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/slider-tree/index.d.ts +153 -0
- package/es/components/slider-tree/index.js +1 -0
- package/es/components/slider-tree/src/hooks/useAsyncData.d.ts +6 -0
- package/es/components/slider-tree/src/hooks/useAsyncData.js +1 -0
- package/es/components/slider-tree/src/index.vue.d.ts +152 -0
- package/es/components/slider-tree/src/index.vue.js +1 -0
- package/es/components/slider-tree/src/index.vue2.js +1 -0
- package/es/components/slider-tree/src/utils/index.d.ts +1 -0
- package/es/components/slider-tree/src/utils/index.js +1 -0
- package/es/components/slider-tree/style/index.css +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -51,6 +51,11 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
51
51
|
list: any[];
|
|
52
52
|
target: any;
|
|
53
53
|
};
|
|
54
|
+
warapperEl: import("vue").ComputedRef<any>;
|
|
55
|
+
style: import("vue").ComputedRef<{
|
|
56
|
+
width: string;
|
|
57
|
+
height: string;
|
|
58
|
+
}>;
|
|
54
59
|
propItems: any;
|
|
55
60
|
redrawPoints: import("vue").Ref<any>;
|
|
56
61
|
select: import("vue").Ref<any>;
|
|
@@ -94,12 +99,6 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
94
99
|
right: string;
|
|
95
100
|
'transform-origin': string;
|
|
96
101
|
}>;
|
|
97
|
-
Teleport: {
|
|
98
|
-
new (): {
|
|
99
|
-
$props: import("vue").VNodeProps & import("vue").TeleportProps;
|
|
100
|
-
};
|
|
101
|
-
__isTeleport: true;
|
|
102
|
-
};
|
|
103
102
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
104
103
|
show: {
|
|
105
104
|
type: BooleanConstructor;
|
|
@@ -53,6 +53,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
53
|
list: any[];
|
|
54
54
|
target: any;
|
|
55
55
|
};
|
|
56
|
+
warapperEl: import("vue").ComputedRef<any>;
|
|
57
|
+
style: import("vue").ComputedRef<{
|
|
58
|
+
width: string;
|
|
59
|
+
height: string;
|
|
60
|
+
}>;
|
|
56
61
|
propItems: any;
|
|
57
62
|
redrawPoints: import("vue").Ref<any>;
|
|
58
63
|
select: import("vue").Ref<any>;
|
|
@@ -96,12 +101,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
96
101
|
right: string;
|
|
97
102
|
'transform-origin': string;
|
|
98
103
|
}>;
|
|
99
|
-
Teleport: {
|
|
100
|
-
new (): {
|
|
101
|
-
$props: import("vue").VNodeProps & import("vue").TeleportProps;
|
|
102
|
-
};
|
|
103
|
-
__isTeleport: true;
|
|
104
|
-
};
|
|
105
104
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
106
105
|
show: {
|
|
107
106
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,reactive as s,onMounted as
|
|
1
|
+
import{defineComponent as e,ref as t,reactive as r,computed as s,onMounted as o,onBeforeUnmount as a,openBlock as i,createElementBlock as n,normalizeStyle as p,unref as u,createElementVNode as l,Fragment as c,createVNode as h,mergeProps as m,createCommentVNode as d}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import v from"./components/PopupTip.vue.js";import w from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"./hooks/useEvent.js";import{useBirthProcessChart as g}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as k}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as j}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";var y=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent"],setup(e,{expose:y,emit:C}){const x=e,b=t(null),P=t(),I=r({show:!1,point:{x:0,y:0},list:[]}),M=r({show:!1,point:{x:0,y:0},list:[],target:null}),A=s((()=>{var e;return null==(e=P.value)?void 0:e.wrapperEl})),R=s((()=>({width:`${x.data.width||800}px`,height:`${x.data.height||500}px`}))),{propItems:S,redrawPoints:T,select:_,clickMenu:E}=function(){const e=[P,x,C,b,I,M];switch(x.type){case"birthProcess":return g(...e);case"surgicalAnesthesia":return j(...e);default:return k(...e)}}();return o((()=>{P.value=new f.Canvas(b.value,{width:S.canvasWidth,height:S.canvasHeight,backgroundColor:"#fff",selection:!1,stopContextMenu:!0,fireRightClick:!0,allowTouchScrolling:!0})})),a((()=>{P.value.off(),P.value.clear()})),y({redrawPoints:T,select:_,canvas:P}),(e,t)=>(i(),n("div",{class:"c-fabric-chart",style:p(u(R))},[l("canvas",{ref_key:"canvasRef",ref:b},null,512),u(A)?(i(),n(c,{key:0},[h(v,m({propItems:u(S)},I),null,16,["propItems"]),h(u(w),m({propItems:u(S)},M,{show:M.show,"onUpdate:show":t[0]||(t[0]=e=>M.show=e),onClickMenu:u(E)}),null,16,["propItems","show","onClickMenu"])],64)):d("v-if",!0)],4))}});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,watch as l,
|
|
1
|
+
import{defineComponent as e,ref as t,watch as l,withDirectives as a,createVNode as o,vShow as r}from"vue";import{NSpace as n,NInputNumber as u}from"naive-ui";import s from"./useStyle.js";import{useEventListener as i,onClickOutside as p}from"@vueuse/core";var c=e({name:"PopupMenu",inheritAttrs:!1,props:{show:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},point:{type:Object},propItems:{type:Object},target:{type:Object}},emits:["update:show","clickMenu"],setup(e,{attrs:c,slots:f,emit:m}){const v=t(null);i(v,"contextmenu",(e=>(e.preventDefault(),!1))),p(v,(e=>{m("update:show",!1)}));const{left:d}=e.propItems,h=s(e);function y(e){if("string"==typeof e&&(e.startsWith("新增")||e.startsWith("删除")))return!0}function g(t){var l;if("string"==typeof t)return t;if("boolean"==typeof t.value)return t.label;if(t.renderItem)return t.renderItem();const a=+((null==(l=d.yScaleValue.find((t=>t.type===e.target.origin.type)))?void 0:l.list[0])||0);return o(n,{inline:!0,align:"center"},{default:()=>[o("span",null,[t.label]),o(u,{style:"width: 110px",size:"small",value:t.value,"onUpdate:value":e=>t.value=e,clearable:!0,placeholder:"请输入数值",max:e.target.origin.data.value,min:a,showButton:!1,onFocus:()=>m("update:show",!0)},null)]})}return l((()=>e.show),(t=>{t&&e.list.forEach((e=>{"object"==typeof e&&Reflect.has(e,"value")&&"boolean"!=typeof e.value&&(e.value=void 0)}))})),()=>a(o("ul",{ref:v,class:"c-fabric-chart-popup-menu",style:h.value},[e.list.map((t=>e.show?o("li",{class:{"no-click":y(t)},onClick:l=>function(t,l){y(l)||""===(null==t?void 0:t.target.className)&&(m("update:show",!1),m("clickMenu",{item:l,target:e.target}))}(l,t)},[g(t)]):null))]),[[r,e.show]])}});export{c as default};
|
|
@@ -33,12 +33,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
33
|
right: string;
|
|
34
34
|
'transform-origin': string;
|
|
35
35
|
}>;
|
|
36
|
-
Teleport: {
|
|
37
|
-
new (): {
|
|
38
|
-
$props: import("vue").VNodeProps & import("vue").TeleportProps;
|
|
39
|
-
};
|
|
40
|
-
__isTeleport: true;
|
|
41
|
-
};
|
|
42
36
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
37
|
show: {
|
|
44
38
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,
|
|
1
|
+
import{defineComponent as t,withDirectives as l,openBlock as p,createElementBlock as e,normalizeStyle as o,unref as s,Fragment as u,renderList as r,toDisplayString as a,vShow as i}from"vue";import n from"./useStyle.js";var f=t({__name:"PopupTip",props:{show:{type:Boolean,default:!1},point:null,list:{default:()=>[]},propItems:null},setup(t){const f=n(t);return(n,m)=>l((p(),e("ul",{class:"c-fabric-chart-popup-tip",style:o(s(f))},[(p(!0),e(u,null,r(t.list,(t=>(p(),e("li",{key:t},a(t),1)))),128))],4)),[[i,t.show]])}});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-fabric-chart-popup-menu,.c-fabric-chart-popup-tip{display:flex;flex-flow:column nowrap;font-size:12px;margin:0;padding:8px 12px;position:absolute;z-index:1001}.c-fabric-chart-popup-menu>li,.c-fabric-chart-popup-tip>li{list-style:none}.c-fabric-chart-popup-tip{background:rgba(0,0,0,.7);border-radius:4px}.c-fabric-chart-popup-tip>li{color:#fff}.c-fabric-chart-popup-menu{background:#fff;border:1px solid #e2e6ed;border-radius:2px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);padding:8px 5px!important;z-index:1001}.c-fabric-chart-popup-menu>li{background:#fff;cursor:pointer;padding:5px}.c-fabric-chart-popup-menu>li:hover{background:#f0f7ff}.c-fabric-chart-popup-menu>li.no-click{cursor:default}.c-fabric-chart-popup-menu>li.no-click:hover{background:#fff}
|
|
1
|
+
.c-fabric-chart{position:relative;user-select:none}.c-fabric-chart-popup-menu,.c-fabric-chart-popup-tip{display:flex;flex-flow:column nowrap;font-size:12px;margin:0;padding:8px 12px;position:absolute;z-index:1001}.c-fabric-chart-popup-menu>li,.c-fabric-chart-popup-tip>li{list-style:none}.c-fabric-chart-popup-tip{background:rgba(0,0,0,.7);border-radius:4px}.c-fabric-chart-popup-tip>li{color:#fff}.c-fabric-chart-popup-menu{background:#fff;border:1px solid #e2e6ed;border-radius:2px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);padding:8px 5px!important;z-index:1001}.c-fabric-chart-popup-menu>li{background:#fff;cursor:pointer;padding:5px}.c-fabric-chart-popup-menu>li:hover{background:#f0f7ff}.c-fabric-chart-popup-menu>li.no-click{cursor:default}.c-fabric-chart-popup-menu>li.no-click:hover{background:#fff}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as t,createVNode as a,toRaw as o,h as r,onBeforeUnmount as
|
|
1
|
+
import{reactive as e,inject as t,createVNode as a,toRaw as o,h as r,onBeforeUnmount as n}from"vue";import{traverse as i,arrayed as l}from"../../../../../../../shared/utils/index.js";import{isFunction as u,isObject as s,isArray as d,compact as p,range as c,flatten as f}from"lodash-es";import{NInput as _}from"naive-ui";import{uniq as m}from"xe-utils";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as E,InjectionIhoTableUUID as h,InjectionIhoTableHandler as A}from"../../../../constants/index.js";import{useAutoFocus as v}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as R,getLowCodeFieldFromField as g,IhoTableRenderHelper as T,getRowHeight as D,getColumnRenderWidth as w,parseMergeField as b}from"../../../../utils/index.js";import P from"./editSeparate.vue.js";import{contentSeparate as $,getLengthDiffArray as x,getColumnInfoMaxLength as C,generateSeparateRowData as S,isSeparateColumn as k}from"./separateUtils.js";import{getSeparateInfo as H,setSeparateInfo as j,deleteSeparateInfo as M}from"../../../../utils/separateMap.js";import{defineTablePlugin as O}from"../../../../hooks/useTablePlugin.js";function I(){const I="separateRendererPlugins",F=e(new Map);return O({name:I,vxe(e){e.interceptor.add("event.clearActived",R(E.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(E.SEPARATE,{renderCell(e,{column:o,row:r}){var n,i;const l=t(h),u=null!=(i=null==(n=H(l,r))?void 0:n.separateData)?i:{},s=g(o),d=(null==s?void 0:s.separateFormatter)?s.separateFormatter(u[o.field]):u[o.field];return a("section",{class:"iho-table__ellipsis",title:d},[d])},renderEdit:T.createRenderEdit((({fieldItem:e,column:n,row:i,emitFormClick:l})=>{var d,p;const c=t(h),f=H(c,i),m=D(),E={};let v=null!=(p=null==(d=e.componentProps)?void 0:d.separateSlot)?p:e.separateSlot;return v&&(v=o(v),E.menu=u(v)?v:s(v)?e=>r(v,e):void 0),e.separateRowEdit?function(){if(!f)return[];if(f.ihoTableHandler=t(A),f.separateData["__"+n.field]=f.separateData["__"+n.field]||f.separateData[n.field],E.menu){const e=E.menu;return a(e,{column:n,col:n,row:i,value:f.separateData["__"+n.field],"onUpdate:value":e=>f.separateData["__"+n.field]=e},null)}return[a(_,{value:f.separateData["__"+n.field],"onUpdate:value":e=>f.separateData["__"+n.field]=e},null)]}():[a(P,{value:i[n.field],"onUpdate:value":e=>i[n.field]=e,"row-index":null==f?void 0:f.index,height:m,column:n,row:i,"display-content":null==(R=null==f?void 0:f.separateData)?void 0:R[n.field],onClick:l},E)];var R}))})},apply(e){function t(e){return(...t)=>{var a;return!(null==(a=t[0].row)?void 0:a.$__SEPARATE)&&(!u(e)||e(...t))}}v(e).bindAutoFocusConfig(I,E.SEPARATE,".iho-table__separateText"),e.eventHooks.onEditClosed.tap(I,(({row:e,column:t,$table:a},o,{emits:r})=>{if(!e.$__uuid)return;const n=g(t);if(!n||!n.separateRowEdit)return;const i=H(e.$__uuid,e);if(!i)return;const{separateData:l,originalData:u,ihoTableHandler:s,index:p}=i,{field:c}=t;if(l["__"+c]&&l["__"+c]!==l[c]&&d(u.$__SEPARATE_DATA)){const e=u.$__SEPARATE_DATA.map((e=>{var t;return null!=(t=e["__"+c])?t:e[c]})),o=u[c];u[c]=d(u[c])?e:e.join(""),r("formChange",{value:u[c],oldValue:o,row:u,column:t,index:p,$table:a}),null==s||s.updateTableDataRef()}})),e.fieldHooks.fieldList.tap(I,((e,{uuid:t})=>(t&&F.set(t,e.reduce(((e,t)=>(i(t,(t=>{k(t)&&(e.push(o(t)),t.showOverflow="ellipsis")})),e)),[])),e))),e.dataHooks.data.tapPromise(I,(async(e,t,{insertAfter:a,index:o,$table:r})=>{var n;if(!t.uuid)return;const i=F.get(t.uuid);if(!i||!i.length)return;const u=[];for(const t of i){if(!t.field)continue;const a=await w(t,r),o={field:t.field,column:t,data:$(b(e,t),t,a,null==(n=g(t))?void 0:n.separateDeep)};u.push(o)}function s(e){return u.find((t=>t.field===e))}u.forEach((e=>{const{column:t}=e,a=g(t);if(!a)return;if(!a.separateDeep||!a.separateBinder)return;const o=p(l(a.separateBinder).map(s));if(!o.length)return;const r=o.concat(e),n=Math.max(...r.map((e=>e.data.length)));c(n).forEach((e=>{const t=r.map((t=>{const a=t.data[e];return{item:a,data:t.data,length:d(a)?a.length:1}})),a=t.map((e=>e.length));if(1===m(a).length)return;const o=Math.max(...a);t.forEach((({item:t,data:a,length:r})=>{r!==o&&(d(t)?t.push(...x(o,r)):a[e]=c(o).map(((e,a)=>0===a?t:"")))}))}))})),u.forEach((e=>{e.data=f(e.data)})),c(C(u)).forEach(((r,n,i)=>{var l;const s=S(u,n),d={index:o,originalData:e,separateData:s,separateIndex:n,separateLength:i.length,isOriginRow:0===n,isLastRow:n===i.length-1};if(0===n)return e.$__SEPARATE_DATA=[s],e.$__SEPARATE_ROW_CACHE=e.$__SEPARATE_ROW_CACHE||[],e.$__uuid=t.uuid,void j(t.uuid,e,d);const p=null!=(l=e.$__SEPARATE_ROW_CACHE[n-1])?l:e.$__SEPARATE_ROW_CACHE[n-1]={$__SEPARATE:!0,$__uuid:t.uuid,$__ORIGIN_INDEX:o,$__SEPARATE_INDEX:n};j(t.uuid,p,d),e.$__SEPARATE_DATA.push(s),a(p)}))})),e.eventHooks.onResizableChange.tap(I,(async({column:e},t,a)=>{k(e)&&a.updateTableDataRef()})),e.configHooks.editConfig.tap(I,((e={},t)=>{const a=e.beforeEditMethod;return e.beforeEditMethod=(...e)=>{var o;if(!t.uuid)return c();const r=F.get(t.uuid);if(!r||!r.length)return c();const{row:n,column:i}=e[0],l=H(t.uuid,n);if(!l)return c();const s=null==(o=i.editRender)?void 0:o.props;if(!s||s.separateRowEdit)return c();const{isOriginRow:d,isLastRow:p}=l;return("bottom"===s.separatePlacement?p:d)&&c();function c(){return!u(a)||a(...e)}},e})),e.configHooks.checkboxConfig.tap(I,((e={},a)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(I,(e=>{n((()=>{e.value.uuid&&(F.delete(e.value.uuid),M(e.value.uuid))}))}))}})}export{I as separateRendererPlugins};
|
|
@@ -126,7 +126,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
126
126
|
separateSlot: AnyObject | Func;
|
|
127
127
|
separateFormatter: (row: AnyObject) => any;
|
|
128
128
|
separateDeep: boolean;
|
|
129
|
-
separateBinder: string
|
|
129
|
+
separateBinder: ArrayAble<string>;
|
|
130
130
|
separateRowEdit: boolean;
|
|
131
131
|
/**
|
|
132
132
|
* 即将被废弃,请使用表格外层的beforeEditMethod属性
|