cnhis-design-vue 3.1.42-beta.34 → 3.1.42-beta.35
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/README.md +87 -87
- package/es/components/button-print/index.d.ts +4 -4
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -4
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
- package/es/components/classification/index.d.ts +1 -1
- package/es/components/classification/src/index.vue.d.ts +2 -2
- package/es/components/fabric-chart/index.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/field-set/index.d.ts +26 -81
- package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +4 -4
- package/es/components/form-config/src/FormConfig.vue.d.ts +4 -4
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -2
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -2
- package/es/components/form-render/index.d.ts +2 -2
- package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +0 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +4 -4
- package/es/components/info-header/src/InfoHeader.vue.d.ts +4 -4
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +2 -2
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +2 -2
- package/es/components/recommend-search/index.d.ts +7 -5
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +7 -5
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +3 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
- package/es/components/scale-view/index.d.ts +28 -4
- package/es/components/scale-view/src/ScaleView.vue.d.ts +28 -4
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +3 -3
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +0 -73
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +2 -2
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -2
- package/es/components/table-filter/src/types/index.d.ts +0 -9
- package/es/components/vod-chunk-upload/index.d.ts +0 -73
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +0 -73
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/env.d.ts +24 -24
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, CSSProperties } from 'vue';
|
|
2
2
|
import { FieldSetItem } from '../../../../es/components/field-set/src/types';
|
|
3
|
-
|
|
4
|
-
spinning: boolean;
|
|
5
|
-
isCustomSearch: boolean;
|
|
6
|
-
clickItem: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
fields: FieldSetItem[];
|
|
10
|
-
widthShow: string;
|
|
11
|
-
widthLarge: string;
|
|
12
|
-
};
|
|
3
|
+
import { AnyObject } from '../../../../es/shared/types';
|
|
13
4
|
declare const _default: import("vue").DefineComponent<{
|
|
14
5
|
fields: {
|
|
15
6
|
type: PropType<Partial<{
|
|
@@ -46,13 +37,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
37
|
};
|
|
47
38
|
}, {
|
|
48
39
|
fieldsMapping: Record<string, string>;
|
|
49
|
-
|
|
40
|
+
fixedWayOptions: {
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[];
|
|
50
44
|
sortOptions: {
|
|
51
45
|
label: string;
|
|
52
46
|
value: string;
|
|
53
47
|
}[];
|
|
54
|
-
emit: (event: "onSave" | "onClose" | "reset", ...args: any[]) => void;
|
|
55
|
-
settingView: any;
|
|
56
48
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
57
49
|
fields: {
|
|
58
50
|
type: PropType<Partial<{
|
|
@@ -89,33 +81,36 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
89
81
|
};
|
|
90
82
|
}>> & {
|
|
91
83
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
85
|
+
onSave?: ((...args: any[]) => any) | undefined;
|
|
94
86
|
}>>;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
background: string | undefined;
|
|
99
|
-
};
|
|
100
|
-
showCheckBox: (key: string) => boolean;
|
|
101
|
-
hideTab: () => void;
|
|
102
|
-
getTableFields: () => any[];
|
|
87
|
+
emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
|
|
88
|
+
newFields: import("vue").Ref<AnyObject[]>;
|
|
89
|
+
columns: import("vue").Ref<AnyObject[]>;
|
|
103
90
|
handleFieldSave: () => void;
|
|
104
91
|
onCancle: () => void;
|
|
105
92
|
reset: () => void;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
93
|
+
setOptions: (column: AnyObject) => {
|
|
94
|
+
label: string;
|
|
95
|
+
value: string;
|
|
96
|
+
}[];
|
|
97
|
+
setStyle: (column: AnyObject) => CSSProperties;
|
|
98
|
+
isShowColumn: (column: AnyObject) => boolean;
|
|
99
|
+
initFields: () => AnyObject[];
|
|
100
|
+
getTableFields: () => AnyObject[];
|
|
101
|
+
handleAllCheck: (checked: boolean, field: string) => void;
|
|
102
|
+
handleCheck: (checked: boolean, column: AnyObject) => void;
|
|
109
103
|
isDisable: (item: FieldSetItem, key: string) => any;
|
|
110
|
-
|
|
104
|
+
initColumns: () => void;
|
|
105
|
+
isNoAllCheck: (field: string) => boolean;
|
|
111
106
|
NButton: any;
|
|
112
107
|
NCheckbox: any;
|
|
113
108
|
NSelect: any;
|
|
114
109
|
NInput: any;
|
|
115
110
|
NInputNumber: any;
|
|
116
|
-
NSpin: any;
|
|
117
111
|
NTooltip: any;
|
|
118
112
|
NPopconfirm: any;
|
|
113
|
+
NIcon: any;
|
|
119
114
|
Draggable: import("vue").DefineComponent<{
|
|
120
115
|
list: {
|
|
121
116
|
type: ArrayConstructor;
|
|
@@ -189,7 +184,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
189
184
|
modelValue: unknown[];
|
|
190
185
|
componentData: Record<string, any>;
|
|
191
186
|
}>;
|
|
192
|
-
},
|
|
187
|
+
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
188
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
193
189
|
fields: {
|
|
194
190
|
type: PropType<Partial<{
|
|
195
191
|
[key: string]: any;
|
|
@@ -225,8 +221,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
225
221
|
};
|
|
226
222
|
}>> & {
|
|
227
223
|
onReset?: ((...args: any[]) => any) | undefined;
|
|
228
|
-
|
|
229
|
-
|
|
224
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
225
|
+
onSave?: ((...args: any[]) => any) | undefined;
|
|
230
226
|
}, {
|
|
231
227
|
type: string;
|
|
232
228
|
fields: Partial<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,
|
|
1
|
+
import{defineComponent as e,ref as l,watch as t,openBlock as i,createElementBlock as d,createElementVNode as a,Fragment as o,renderList as c,normalizeStyle as s,createBlock as n,unref as r,withCtx as u,createTextVNode as f,toDisplayString as p,createCommentVNode as h,createVNode as v,withDirectives as b,vShow as y,renderSlot as k}from"vue";import{NCheckbox as x,NTooltip as m,NIcon as g,NSelect as _,NInput as A,NInputNumber as S,NPopconfirm as E,NButton as w}from"naive-ui";import W from"../../../shared/components/VueDraggable/src/vuedraggable.js";import{ReorderTwoOutline as N}from"@vicons/ionicons5";import F from"../../../_virtual/plugin-vue_export-helper.js";const U={class:"c-field-set"},O={class:"c-field-set__table-header"},R={class:"c-field-set__table-body"},q=["tabindex"],D=["title"],C=a("span",null,"拖拽调整顺序",-1),T={key:0,class:"c-field-set__table-footer"};var j=F(e({__name:"FieldSet",props:{fields:{type:Array,default:function(){return[]}},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:F,emit:j}){const P=e,B={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},G=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],H=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],I=l([]),J=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),L=()=>{j("save",{tableFields:Q()})},$=()=>{j("close")};function V(){I.value=M(),Y(),j("reset")}function z(e){return"fixedWay"===e.field?G:H}function K(e){const l={flex:"1 1 90px"};switch(e.type){case"text":Object.assign(l,{flex:"0 0 100px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"});break;case"checkbox":l.flex="1 1 60px";break;case"select":l.flex="1 1 80px";break;case"input":l.flex="1 1 100px"}return l}function M(){const e=JSON.parse(JSON.stringify(P.fields||[]));return Object.keys(B).forEach((l=>{e.forEach((e=>{"old"==P.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[B[l]]=1==e[l]:e[B[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),e}const Q=()=>{if("old"==P.type){const e=[];return I.value.length>0&&I.value.forEach(((l,t)=>{e.push({id:l.id,field:l.name,visible:l.show,sequence:t,sortable:l.sort,title:l.alias,fixed:l.fixedWay,minWidth:l.columnWidth,bold:l.bold,sortDirection:l.sortDirection,...P.isEdit?{required:l.required,editable:l.editable}:{}})})),e}return I.value};function X(e,l){return["editable","required"].includes(l)&&e[`${l}Disable`]||["sort"].includes(l)&&1==e.notParticipatingSort}function Y(){J.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&P.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=I.value.every((l=>!Reflect.has(l,e.field)));e.checkedAll=!Z(e.field)&&!l}}))}function Z(e){return I.value.some((l=>!X(l,e)&&!l[e]&&"0001"!=l.id))}return t((()=>P.fields),(e=>{(null==e?void 0:e.length)>0&&(I.value=M(),Y())}),{immediate:!0,deep:!0}),F({getTableFields:Q}),(l,t)=>(i(),d("div",U,[a("div",O,[(i(!0),d(o,null,c(J.value,((e,l)=>(i(),d(o,{key:l},[e.isShow?(i(),d("span",{key:0,class:"table-cell",style:s(K(e))},["checkbox"===e.type?(i(),n(r(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void I.value.forEach((e=>{X(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:u((()=>[f(p(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):h("v-if",!0),f(" "+p("checkbox"!==e.type?e.title:""),1)],4)):h("v-if",!0)],64)))),128))]),a("div",R,[v(r(W),{list:I.value,animation:"150","item-key":"id",tag:"ul"},{item:u((({element:e,index:l})=>[e.hide?h("v-if",!0):(i(),d("li",{key:0,tabindex:l},[(i(!0),d(o,null,c(J.value,((l,t)=>(i(),d(o,{key:t},[l.isShow?(i(),d("span",{key:0,class:"table-cell",title:e[l.field],style:s(K(l))},["text"===l.type?(i(),d(o,{key:0},[v(r(m),{trigger:"hover"},{trigger:u((()=>[v(r(g),{style:{"margin-right":"5px",top:"2px"},component:r(N)},null,8,["component"])])),default:u((()=>[C])),_:1}),f(" "+p(e[l.field]),1)],64)):h("v-if",!0),"checkbox"===l.type?b((i(),n(r(x),{key:1,disabled:X(e,l.field),checked:e[l.field],"onUpdate:checked":[t=>e[l.field]=t,e=>function(e,l){const t=!e||Z(l.field);l.checkedAll=!t}(e,l)]},null,8,["disabled","checked","onUpdate:checked"])),[[y,"0001"!=e.id]]):h("v-if",!0),"select"===l.type?b((i(),n(r(_),{key:2,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,options:z(l)},null,8,["value","onUpdate:value","options"])),[[y,"fixedWay"===l.field||"0001"!=e.id]]):h("v-if",!0),"input"===l.type?b((i(),n(r(A),{key:3,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.id]]):h("v-if",!0),"inputNumber"===l.type?(i(),n(r(S),{key:4,value:e[l.field],"onUpdate:value":t=>e[l.field]=t},null,8,["value","onUpdate:value"])):h("v-if",!0)],12,D)):h("v-if",!0)],64)))),128))],8,q))])),_:1},8,["list"])]),e.footerFlag?(i(),d("div",T,[h(" 底部按钮插槽 "),k(l.$slots,"footer",{},(()=>[v(r(E),{onPositiveClick:V},{trigger:u((()=>[v(r(w),{style:{"margin-right":"8px"}},{default:u((()=>[f("恢复默认设置")])),_:1})])),default:u((()=>[f(" 确认要恢复系统默认设置吗? ")])),_:1}),v(r(w),{style:{"margin-right":"8px"},onClick:$},{default:u((()=>[f("取消")])),_:1}),v(r(w),{type:"primary",onClick:L},{default:u((()=>[f("保存")])),_:1})]))])):h("v-if",!0)]))}}),[["__file","FieldSet.vue"]]);export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-field-set{
|
|
1
|
+
.c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set ul{margin:0;padding:0}.c-field-set ul li{align-items:center;background:#fff;border-bottom:1px solid #e8e8e8;display:flex;height:52px;padding:5px 0}.c-field-set ul li:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set ul li:focus{background-color:#f2f2f2}.c-field-set .table-cell{box-sizing:border-box;display:inline-block;padding:0 5px}.c-field-set__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set__table-body{flex:1;overflow-y:scroll}.c-field-set__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}
|
|
@@ -3952,11 +3952,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3952
3952
|
onBlur: (...args: any[]) => Promise<void>;
|
|
3953
3953
|
onInput: (...args: any[]) => Promise<void>;
|
|
3954
3954
|
reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
|
|
3955
|
+
title: string;
|
|
3956
|
+
editable: boolean;
|
|
3955
3957
|
visible: boolean;
|
|
3956
3958
|
submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
|
|
3957
3959
|
validator: import("@formily/core").FieldValidator;
|
|
3958
3960
|
pattern: import("@formily/core").FieldPatternTypes;
|
|
3959
|
-
title: string;
|
|
3960
3961
|
form: import("@formily/core").Form<any>;
|
|
3961
3962
|
content: any;
|
|
3962
3963
|
componentProps: Record<string, any>;
|
|
@@ -3964,7 +3965,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3964
3965
|
display: import("@formily/core").FieldDisplayTypes;
|
|
3965
3966
|
description: string;
|
|
3966
3967
|
readOnly: boolean;
|
|
3967
|
-
editable: boolean;
|
|
3968
3968
|
hidden: boolean;
|
|
3969
3969
|
component: import("@formily/core").FieldComponent<any, any>;
|
|
3970
3970
|
decorator: import("@formily/core").FieldDecorator<any, any>;
|
|
@@ -9869,11 +9869,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9869
9869
|
onBlur: (...args: any[]) => Promise<void>;
|
|
9870
9870
|
onInput: (...args: any[]) => Promise<void>;
|
|
9871
9871
|
reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
|
|
9872
|
+
title: string;
|
|
9873
|
+
editable: boolean;
|
|
9872
9874
|
visible: boolean;
|
|
9873
9875
|
submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
|
|
9874
9876
|
validator: import("@formily/core").FieldValidator;
|
|
9875
9877
|
pattern: import("@formily/core").FieldPatternTypes;
|
|
9876
|
-
title: string;
|
|
9877
9878
|
form: import("@formily/core").Form<any>;
|
|
9878
9879
|
content: any;
|
|
9879
9880
|
componentProps: Record<string, any>;
|
|
@@ -9881,7 +9882,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9881
9882
|
display: import("@formily/core").FieldDisplayTypes;
|
|
9882
9883
|
description: string;
|
|
9883
9884
|
readOnly: boolean;
|
|
9884
|
-
editable: boolean;
|
|
9885
9885
|
hidden: boolean;
|
|
9886
9886
|
component: import("@formily/core").FieldComponent<any, any>;
|
|
9887
9887
|
decorator: import("@formily/core").FieldDecorator<any, any>;
|
|
@@ -3954,11 +3954,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3954
3954
|
onBlur: (...args: any[]) => Promise<void>;
|
|
3955
3955
|
onInput: (...args: any[]) => Promise<void>;
|
|
3956
3956
|
reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
3957
|
+
title: string;
|
|
3958
|
+
editable: boolean;
|
|
3957
3959
|
visible: boolean;
|
|
3958
3960
|
submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
|
|
3959
3961
|
validator: import("../../../../es/components/form-render").FieldValidator;
|
|
3960
3962
|
pattern: import("../../../../es/components/form-render").FieldPatternTypes;
|
|
3961
|
-
title: string;
|
|
3962
3963
|
form: import("../../../../es/components/form-render").Form<any>;
|
|
3963
3964
|
content: any;
|
|
3964
3965
|
componentProps: Record<string, any>;
|
|
@@ -3966,7 +3967,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3966
3967
|
display: import("../../../../es/components/form-render").FieldDisplayTypes;
|
|
3967
3968
|
description: string;
|
|
3968
3969
|
readOnly: boolean;
|
|
3969
|
-
editable: boolean;
|
|
3970
3970
|
hidden: boolean;
|
|
3971
3971
|
component: import("../../../../es/components/form-render").FieldComponent<any, any>;
|
|
3972
3972
|
decorator: import("../../../../es/components/form-render").FieldDecorator<any, any>;
|
|
@@ -9871,11 +9871,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9871
9871
|
onBlur: (...args: any[]) => Promise<void>;
|
|
9872
9872
|
onInput: (...args: any[]) => Promise<void>;
|
|
9873
9873
|
reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
9874
|
+
title: string;
|
|
9875
|
+
editable: boolean;
|
|
9874
9876
|
visible: boolean;
|
|
9875
9877
|
submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
|
|
9876
9878
|
validator: import("../../../../es/components/form-render").FieldValidator;
|
|
9877
9879
|
pattern: import("../../../../es/components/form-render").FieldPatternTypes;
|
|
9878
|
-
title: string;
|
|
9879
9880
|
form: import("../../../../es/components/form-render").Form<any>;
|
|
9880
9881
|
content: any;
|
|
9881
9882
|
componentProps: Record<string, any>;
|
|
@@ -9883,7 +9884,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9883
9884
|
display: import("../../../../es/components/form-render").FieldDisplayTypes;
|
|
9884
9885
|
description: string;
|
|
9885
9886
|
readOnly: boolean;
|
|
9886
|
-
editable: boolean;
|
|
9887
9887
|
hidden: boolean;
|
|
9888
9888
|
component: import("../../../../es/components/form-render").FieldComponent<any, any>;
|
|
9889
9889
|
decorator: import("../../../../es/components/form-render").FieldDecorator<any, any>;
|
|
@@ -445,11 +445,12 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
445
445
|
onBlur: (...args: any[]) => Promise<void>;
|
|
446
446
|
onInput: (...args: any[]) => Promise<void>;
|
|
447
447
|
reset: (options?: import("../../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
448
|
+
title: string;
|
|
449
|
+
editable: boolean;
|
|
448
450
|
visible: boolean;
|
|
449
451
|
submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
|
|
450
452
|
validator: import("../../../../../es/components/form-render").FieldValidator;
|
|
451
453
|
pattern: import("../../../../../es/components/form-render").FieldPatternTypes;
|
|
452
|
-
title: string;
|
|
453
454
|
form: import("../../../../../es/components/form-render").Form<any>;
|
|
454
455
|
content: any;
|
|
455
456
|
componentProps: Record<string, any>;
|
|
@@ -457,7 +458,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
457
458
|
display: import("../../../../../es/components/form-render").FieldDisplayTypes;
|
|
458
459
|
description: string;
|
|
459
460
|
readOnly: boolean;
|
|
460
|
-
editable: boolean;
|
|
461
461
|
hidden: boolean;
|
|
462
462
|
component: import("../../../../../es/components/form-render").FieldComponent<any, any>;
|
|
463
463
|
decorator: import("../../../../../es/components/form-render").FieldDecorator<any, any>;
|
|
@@ -5517,11 +5517,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5517
5517
|
onBlur: (...args: any[]) => Promise<void>;
|
|
5518
5518
|
onInput: (...args: any[]) => Promise<void>;
|
|
5519
5519
|
reset: (options?: import("../../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
5520
|
+
title: string;
|
|
5521
|
+
editable: boolean;
|
|
5520
5522
|
visible: boolean;
|
|
5521
5523
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
5522
5524
|
validator: import("../../../../../es/components/form-render").FieldValidator;
|
|
5523
5525
|
pattern: import("../../../../../es/components/form-render").FieldPatternTypes;
|
|
5524
|
-
title: string;
|
|
5525
5526
|
form: import("../../../../../es/components/form-render").Form<any>;
|
|
5526
5527
|
content: any;
|
|
5527
5528
|
componentProps: Record<string, any>;
|
|
@@ -5529,7 +5530,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5529
5530
|
display: import("../../../../../es/components/form-render").FieldDisplayTypes;
|
|
5530
5531
|
description: string;
|
|
5531
5532
|
readOnly: boolean;
|
|
5532
|
-
editable: boolean;
|
|
5533
5533
|
hidden: boolean;
|
|
5534
5534
|
component: import("../../../../../es/components/form-render").FieldComponent<any, any>;
|
|
5535
5535
|
decorator: import("../../../../../es/components/form-render").FieldDecorator<any, any>;
|
|
@@ -432,11 +432,12 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
432
432
|
onBlur: (...args: any[]) => Promise<void>;
|
|
433
433
|
onInput: (...args: any[]) => Promise<void>;
|
|
434
434
|
reset: (options?: import("@formily/core/esm/types").IFieldResetOptions | undefined) => Promise<void>;
|
|
435
|
+
title: string;
|
|
436
|
+
editable: boolean;
|
|
435
437
|
visible: boolean;
|
|
436
438
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
437
439
|
validator: import("@formily/core/esm/types").FieldValidator;
|
|
438
440
|
pattern: import("@formily/core/esm/types").FieldPatternTypes;
|
|
439
|
-
title: string;
|
|
440
441
|
form: import("@formily/core/esm/models/Form").Form<any>;
|
|
441
442
|
content: any;
|
|
442
443
|
componentProps: Record<string, any>;
|
|
@@ -444,7 +445,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
444
445
|
display: import("@formily/core/esm/types").FieldDisplayTypes;
|
|
445
446
|
description: string;
|
|
446
447
|
readOnly: boolean;
|
|
447
|
-
editable: boolean;
|
|
448
448
|
hidden: boolean;
|
|
449
449
|
component: import("@formily/core/esm/types").FieldComponent<any, any>;
|
|
450
450
|
decorator: import("@formily/core/esm/types").FieldDecorator<any, any>;
|
|
@@ -426,11 +426,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
426
426
|
onBlur: (...args: any[]) => Promise<void>;
|
|
427
427
|
onInput: (...args: any[]) => Promise<void>;
|
|
428
428
|
reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
|
|
429
|
+
title: string;
|
|
430
|
+
editable: boolean;
|
|
429
431
|
visible: boolean;
|
|
430
432
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
431
433
|
validator: import("@formily/core").FieldValidator;
|
|
432
434
|
pattern: import("@formily/core").FieldPatternTypes;
|
|
433
|
-
title: string;
|
|
434
435
|
form: import("@formily/core").Form<any>;
|
|
435
436
|
content: any;
|
|
436
437
|
componentProps: Record<string, any>;
|
|
@@ -438,7 +439,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
438
439
|
display: import("@formily/core").FieldDisplayTypes;
|
|
439
440
|
description: string;
|
|
440
441
|
readOnly: boolean;
|
|
441
|
-
editable: boolean;
|
|
442
442
|
hidden: boolean;
|
|
443
443
|
component: import("@formily/core").FieldComponent<any, any>;
|
|
444
444
|
decorator: import("@formily/core").FieldDecorator<any, any>;
|
|
@@ -430,11 +430,12 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
430
430
|
onBlur: (...args: any[]) => Promise<void>;
|
|
431
431
|
onInput: (...args: any[]) => Promise<void>;
|
|
432
432
|
reset: (options?: import("../../../../es/components/form-render").IFieldResetOptions | undefined) => Promise<void>;
|
|
433
|
+
title: string;
|
|
434
|
+
editable: boolean;
|
|
433
435
|
visible: boolean;
|
|
434
436
|
submit: <T>(onSubmit?: ((values: any) => void | Promise<T>) | undefined) => Promise<T>;
|
|
435
437
|
validator: import("../../../../es/components/form-render").FieldValidator;
|
|
436
438
|
pattern: import("../../../../es/components/form-render").FieldPatternTypes;
|
|
437
|
-
title: string;
|
|
438
439
|
form: import("../../../../es/components/form-render").Form<any>;
|
|
439
440
|
content: any;
|
|
440
441
|
componentProps: Record<string, any>;
|
|
@@ -442,7 +443,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
442
443
|
display: import("../../../../es/components/form-render").FieldDisplayTypes;
|
|
443
444
|
description: string;
|
|
444
445
|
readOnly: boolean;
|
|
445
|
-
editable: boolean;
|
|
446
446
|
hidden: boolean;
|
|
447
447
|
component: import("../../../../es/components/form-render").FieldComponent<any, any>;
|
|
448
448
|
decorator: import("../../../../es/components/form-render").FieldDecorator<any, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u}from"lodash-es";import"../../../index.js";import{useCommonInjection as s}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as c,InjectionFormUUID as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as d}from"../../hooks/useFormField.js";import{NCascader as m}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as v,mapProps as f}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as y,traverseDependKey as j}from"../../utils/schema.js";const b=v(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:v,emit:f}){const y=t(),{field:b,title:k}=d(),C=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),F=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[C.value])).join(" / "):null}catch(e){return null}}));function S(e,t,a){f("update:value",
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as l,watch as r,createVNode as o,nextTick as n}from"vue";import{isEqual as i,isArray as u}from"lodash-es";import"../../../index.js";import{useCommonInjection as s}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as c,InjectionFormUUID as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as d}from"../../hooks/useFormField.js";import{NCascader as m}from"naive-ui";import"@vueuse/core";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as v,mapProps as f}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as h,assignUpdateValue as y,traverseDependKey as j}from"../../utils/schema.js";const b=v(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:v,emit:f}){const y=t(),{field:b,title:k}=d(),C=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:e.labelField)?l:"text"})),g=a((()=>{var t,a,l;return null!=(l=null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:e.valueField)?l:"value"})),F=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[C.value])).join(" / "):null}catch(e){return null}}));function S(e,t,a){f("update:value",a.map((function(e){return{...e,label:e[C.value],children:void 0,parent:void 0}})))}const A=l(c);async function w(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await A.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:k.value,cache:e.requestCache});function a(e,t){const l={[C.value]:e[C.value],[g.value]:e[g.value],depth:t+1,isLeaf:!0};return u(e.children)&&(l.children=e.children.map((e=>a(e,t+1))),l.isLeaf=!e.children.length),l}y.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await A.addAsync(o(s(t),u(e),k.value,t));if(!a.length&&t)return t.isLeaf=!0,S(0,0,n(t)),void(K.value=!1);const l=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function o(t,a,l,r){const o={lvlnr:t+1+""};return r&&a.dependKey&&j(a.dependKey,((e,t)=>{o[t]=r[e]})),{params:o,...a,key:l,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,l){return{[C.value]:a[C.value],[g.value]:a[g.value],depth:l+1,parent:t,isLeaf:l+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=l:y.value=l}(t),await x()}const H=`form-render__cascade--menu-${l(p)}`;async function x(){await n();const e=document.querySelector(`.${H} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}const{injectValueValidate:L,injectValueWatchFromEmpty:q,injectValueBindKey:B}=s();q((()=>e.value),w),L((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(y.value=null,await w())}));const K=t(!1);function V(e){K.value=!!e,e&&w()}const E=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),W=B(F);return()=>o(m,{key:W.value,remote:O.value,filterable:e.filterable,"menu-props":{class:H,onClick:x},checkStrategy:"child",show:!!K.value,"onUpdate:show":V,value:F.value,"onUpdate:value":S,labelField:C.value,valueField:g.value,options:E.value,onLoad:w,onFocus:h(b)},v)}}),f({dataSource:"options"},y));export{b as SEARCH_CASCADER};
|
|
@@ -5,7 +5,7 @@ import { UrlConfig } from '../../types';
|
|
|
5
5
|
import { PropType } from 'vue';
|
|
6
6
|
export declare const SELECT: import("vue").DefineComponent<{
|
|
7
7
|
value: {
|
|
8
|
-
type: PropType<ArrayAble<string
|
|
8
|
+
type: PropType<ArrayAble<string> | null>;
|
|
9
9
|
};
|
|
10
10
|
lazyRequest: {
|
|
11
11
|
type: BooleanConstructor;
|
|
@@ -80,7 +80,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
80
80
|
};
|
|
81
81
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend")[], "update:value" | "postRecommend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
82
82
|
value: {
|
|
83
|
-
type: PropType<ArrayAble<string
|
|
83
|
+
type: PropType<ArrayAble<string> | null>;
|
|
84
84
|
};
|
|
85
85
|
lazyRequest: {
|
|
86
86
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as l}from"vue";import{useDebounceFn as r}from"@vueuse/core";import{cloneDeep as s,isString as i}from"lodash-es";import{useCommonInjection as n,useSelectOptionProps as u}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NSelect as d}from"naive-ui";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as c,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as v,useAutographOptions as f,useRecommendOptions as h,searchContentMatcher as j}from"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as b,assignUpdateValue as k,assignClearBindVisited as S}from"../../utils/schema.js";const g=c(e({name:"FormSelect",props:{value:{type:[String,Array
|
|
1
|
+
import{defineComponent as e,computed as o,inject as t,ref as a,createVNode as l}from"vue";import{useDebounceFn as r}from"@vueuse/core";import{cloneDeep as s,isString as i}from"lodash-es";import{useCommonInjection as n,useSelectOptionProps as u}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import{NSelect as d}from"naive-ui";import"date-fns";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"@formily/reactive";import{connect as c,mapProps as y}from"@formily/vue";import"@vue/shared";import"./index.js";import{useUrlConfigOptions as v,useAutographOptions as f,useRecommendOptions as h,searchContentMatcher as j}from"../../hooks/useFormRenderOptions.js";import{createVisitedSetter as b,assignUpdateValue as k,assignClearBindVisited as S}from"../../utils/schema.js";const g=c(e({name:"FormSelect",props:{value:{type:[String,Array]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:c,emit:y}){const k=o({get:()=>e.value,async set(e){y("update:value",e),B(e)}}),{labelKey:S,valueKey:g,fetchData:F,fullOptions:A,filterOptions:H}=e.urlConfig?v(e,k):f(e,k),{getRecommend:x,postRecommend:B,sortedOptions:C}=h(e,H,y,S,g),{field:O,fieldKey:R}=m();t(p).setContext(R.value,(e=>{return{currentOption:s((o=e,A.value.find((e=>e[g.value]===o))))};var o}));const L=a(""),V=r((async(e="")=>{L.value=e,F(e),x(e)}),300),{injectValueValidate:w,injectValueWatchFromEmpty:K,injectValueBindKey:N}=n();K(k,V),w(k);const P=N(k),{menuProps:W,nodeProps:q}=u();function I(e){const o=e[S.value];if(!o||!i(o))return"";const t=j(L.value,o);return t?l("section",null,[t.map(((e,o)=>0!==o&&e?l("span",{style:{color:o%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):o}const U=o((()=>C.value.length||!e.allowCreate?C.value:L.value?[{[S.value]:L.value,[g.value]:L.value},...C.value]:C.value));return()=>l(d,{key:P.value,remote:!0,filterable:!0,value:k.value,"onUpdate:value":e=>k.value=e,"menu-props":W,"node-props":q,labelField:S.value,valueField:g.value,options:U.value,onSearch:V,"onUpdate:show":e=>e&&V(),onFocus:b(O),renderLabel:I},c)}}),y({dataSource:"options"},k,S));export{g as SELECT};
|
|
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
21
|
searchFilterText: import("vue").Ref<string>;
|
|
22
22
|
close: () => void;
|
|
23
23
|
OPTION_ITEM_HEIGHT: number;
|
|
24
|
-
|
|
24
|
+
VIEW_CAPACITY: number;
|
|
25
25
|
list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<VxeTableDefines.FilterOption>[]>;
|
|
26
26
|
containerProps: {
|
|
27
27
|
ref: import("vue").Ref<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as l,inject as t,ref as a,onDeactivated as
|
|
1
|
+
import{defineComponent as e,computed as l,inject as t,ref as a,onDeactivated as u,openBlock as o,createElementBlock as n,unref as i,Fragment as r,renderList as s,createElementVNode as v,normalizeClass as c,createBlock as d,createCommentVNode as p,createTextVNode as f,toDisplayString as m,createVNode as h,isRef as _,withCtx as y,normalizeStyle as g}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{CheckmarkOutline as k}from"@vicons/ionicons5";import{useVirtualList as C}from"@vueuse/core";import{NInput as x,NCheckbox as S,NCheckboxGroup as $,NButtonGroup as E,NButton as j}from"naive-ui";import w from"../../../../../_virtual/plugin-vue_export-helper.js";const A={class:"iho-table__filterWrapper"},I={key:0},L=["onClick"],U={class:"iho-table__filterListItem"},B={class:"iho-table__filterFooter"};var F=w(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const w=e,F=l((()=>{var e,l,t;return null==(t=null==(l=null==(e=w.payload)?void 0:e.column.editRender)?void 0:l.props)?void 0:t.sortable})),O=l((()=>{var e,l,t;return null!=(t=null==(l=null==(e=w.payload)?void 0:e.column)?void 0:l.filters)?t:[]})),P=l({get:()=>O.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(w.payload)return O.value.forEach((l=>{w.payload.$panel.changeOption(null,e.includes(l.value),l)})),w.payload.$panel.confirmFilter(new CustomEvent("click"))}}),W=t("$xetable"),Z=l({get(){if(!W)return null;const e=W.getSortColumns().find((e=>{var l;return e.column===(null==(l=w.payload)?void 0:l.column)}));return e?e.order:null},set(e){W&&w.payload&&w.payload.$panel&&W.triggerSortEvent(new CustomEvent("click"),w.payload.column,e)}}),q=a([...P.value]),z=a("");function D(){W&&(W.reactData.filterStore.visible=!1)}u(D);const{list:H,containerProps:R,wrapperProps:G}=C(l((()=>z.value?O.value.filter((e=>`${e.label}`.includes(z.value))):O.value)),{itemHeight:32,overscan:3}),J=l((()=>!!q.value.length&&q.value.length!==O.value.length)),K=l({get:()=>q.value.length===O.value.length&&0!==O.value.length,set:e=>{q.value=e?O.value.map((e=>e.value)):[]}}),M=l((()=>({...R.style,height:b(320)})));function N(){P.value=q.value,D()}function Q(){q.value=[]}const T=[{status:"asc",text:"升序 A to Z"},{status:"desc",text:"降序 Z to A"}];return(e,l)=>(o(),n("section",A,[i(F)?(o(),n("div",I,[(o(),n(r,null,s(T,(e=>v("div",{key:e.status,class:c(["iho-table__filterButton",{"iho-table__filterButton--active":i(Z)===e.status}]),onClick:l=>{return t=e.status,Z.value=t,void D();var t}},[i(Z)===e.status?(o(),d(i(k),{key:0,class:"iho-table__sortActiveIcon"})):p("v-if",!0),f(" "+m(e.text),1)],10,L))),64))])):p("v-if",!0),i(O).length>5?(o(),d(i(x),{key:1,value:z.value,"onUpdate:value":l[0]||(l[0]=e=>z.value=e)},null,8,["value"])):p("v-if",!0),v("div",U,[h(i(S),{label:"全选",checked:i(K),"onUpdate:checked":l[1]||(l[1]=e=>_(K)?K.value=e:null),indeterminate:i(J)},null,8,["checked","indeterminate"])]),h(i($),{value:q.value,"onUpdate:value":l[3]||(l[3]=e=>q.value=e)},{default:y((()=>[v("section",{ref:i(R).ref,style:g(i(M)),onScroll:l[2]||(l[2]=(...e)=>i(R).onScroll&&i(R).onScroll(...e)),class:"iho-table__filterListWrapper"},[v("section",{style:g(i(G).style)},[(o(!0),n(r,null,s(i(H),(e=>(o(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[h(i(S),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),v("footer",B,[v("section",null,m(`已选择${q.value.length}项`),1),h(i(E),{size:"small"},{default:y((()=>[h(i(j),{onClick:Q},{default:y((()=>[f("清空")])),_:1}),h(i(j),{onClick:D},{default:y((()=>[f("取消")])),_:1}),h(i(j),{type:"primary",onClick:N},{default:y((()=>[f("确定")])),_:1})])),_:1})])]))}}),[["__file","filter.vue"]]);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFunction as o}from"lodash-es";import"../../index.js";import{useUUIDMap as r}from"../utils/index.js";import
|
|
1
|
+
import{isFunction as o}from"lodash-es";import"../../index.js";import{useUUIDMap as r}from"../utils/index.js";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function e(){const e="highLightSetPlugin",{getItemFromUUID:i,removeItemFromUUID:n,setItemFromUUID:u}=r((()=>!1));return t({name:e,apply(r){r.dataHooks.data.tapPromise(e,(async(o,r)=>{r.uuid&&(o.rowColor||o.fontColor)&&u(r.uuid,!0)})),r.dataHooks.dataEnd.tap(e,(r=>{if(!r.uuid||!i(r.uuid))return;const t=r.rowStyle;r.rowStyle=function(r){const e={backgroundColor:r.row.rowColor,color:r.row.fontColor};return o(t)?Object.assign(e,t(r)):e},n(r.uuid)}))}})}export{e as highLightSetPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e,h as t,inject as i,createVNode as l}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function S(){const S="lowCodeFieldAdaptorPlugin";return g({name:S,apply(g){g.fieldHooks.field.tap({name:S,stage:m},((m,p,g)=>{const S=m,F={className:S.bold?"iho-table__boldCell":"",field:S.columnName,showOverflow:"tooltip",visible:R.notNegative(S.isShow),minWidth:S.colWidth,sortable:R.isPositive(S.isSort),fixed:c[S.isFixed],...S,title:S.alias||S.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=i=>a.checkEditStatus(i)?e(i):[t("span",null,P(i.row,i.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=i(v),c=i(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t.fieldSetting),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return l("section",{class:"iho-table__headerWrapper"},[l("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?
|
|
1
|
+
import{toRaw as e,h as t,inject as i,createVNode as l}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function S(){const S="lowCodeFieldAdaptorPlugin";return g({name:S,apply(g){g.fieldHooks.field.tap({name:S,stage:m},((m,p,g)=>{const S=m,F={className:S.bold?"iho-table__boldCell":"",field:S.columnName,showOverflow:"tooltip",visible:R.notNegative(S.isShow),minWidth:S.colWidth,sortable:R.isPositive(S.isSort),fixed:c[S.isFixed],...S,title:S.alias||S.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=i=>a.checkEditStatus(i)?e(i):[t("span",null,P(i.row,i.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=i(v),c=i(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t.fieldSetting),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return l("section",{class:"iho-table__headerWrapper"},[l("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?16:0)-(R?22:0)-(g?22:0)))}},[null!=j?j:l(u,{style:{maxWidth:"100%"}},{default:()=>p.title})]),h?l(f,{modelValue:m.value[p.field],"onUpdate:modelValue":e=>m.value[p.field]=e},null):null])}(e,a,c),e.slots=m}(F,S),function(t,i,l){var o,s;const r=a(e(i));r.componentProps={size:"mini"===l.size?"small":l.size,...r.componentProps},t.editRender={autofocus:"input",name:j.getCellType(i),props:r},t.editRender.enabled=!Reflect.get(h,t.editRender.name),d(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&d(null==(s=t.slots)?void 0:s.edit));if(!n(i.settingObj))return;Reflect.has(i.settingObj,"isHide")&&(t.visible=t.visible&&R.notPositive(i.settingObj.isHide))}(F,S,g),F})),g.fieldHooks.field.tap({name:S+"After",stage:p},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,i])=>{null==i&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{S as lowCodeFieldAdaptorPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as t,ref as o,computed as l,provide as a,watch as r,onMounted as n,createVNode as s,h as i,nextTick as u,onBeforeUnmount as d,reactive as c,unref as m}from"vue";import{traverse as p}from"../../../../../shared/utils/index.js";import{useThrottleFn as f}from"@vueuse/core";import{promiseTimeout as h}from"@vueuse/shared";import{isFunction as g,
|
|
1
|
+
import{defineComponent as e,inject as t,ref as o,computed as l,provide as a,watch as r,onMounted as n,createVNode as s,h as i,nextTick as u,onBeforeUnmount as d,reactive as c,unref as m}from"vue";import{traverse as p}from"../../../../../shared/utils/index.js";import{useThrottleFn as f}from"@vueuse/core";import{promiseTimeout as h}from"@vueuse/shared";import{isFunction as g,isNumber as v,omit as x,isString as I,range as y,last as H}from"lodash-es";import"../../../index.js";import{InjectionIhoTableUUID as b,WIDGET_TYPE as D}from"../../constants/index.js";import{useUUIDMap as R}from"../../utils/index.js";import{defineTablePlugin as U}from"../../hooks/useTablePlugin.js";class w{constructor(){this.records={},this.maxRecords=c({})}set(e,t,o){this.records[e]||(this.records[e]={}),this.records[e][t]=o,this.maxRecords[e]=Math.max(...Object.values(this.records[e]),0)}getMax(e){var t;return null!=(t=this.maxRecords[e])?t:0}}const{getItemFromUUID:T,removeItemFromUUID:E}=R((()=>new w),!0),{getItemFromUUID:F,removeItemFromUUID:M,setItemFromUUID:j}=R((()=>null)),{getItemFromUUID:S,removeItemFromUUID:k,setItemFromUUID:A}=R((()=>{})),C=e({props:{payload:{type:Object,required:!0}},setup(e){const d=t(b),c=t("$xetable"),m=o(),p=T(d),f=l((()=>e.payload.row[e.payload.column.field]));async function h(){await u();const{rowIndex:t,column:o}=e.payload;p&&v(t)&&m.value&&p.set(t,o.field,m.value.clientHeight)}a("updateCellHeight",h),r([()=>e.payload.rowIndex,()=>e.payload.column.field,f],h,{immediate:!0}),n((()=>{c&&!F(d)&&j(d,c)}));const x=l((()=>{var t,o,l,a;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},n=null!=(a=null==(l=r.slots)?void 0:l.default)?a:r.slotFn;return g(n)?n:()=>f.value}));return()=>s("div",{ref:m,style:"padding:7px 0"},[i(x.value,e.payload)])}});function $(e,t,{scrollTop:o=0}){var l,a;const{uuid:r,rowConfig:n={}}=t;if(!r)return;const s=T(r),{oSize:i=0,gt:u=100}=null!=(l=S(r))?l:{},{internalData:d,reactData:c}=e,{scrollYStore:p,elemStore:f,afterFullData:h,fullDataRowIdData:g}=d;if(u>h.length)return;const v=null!=(a=n.height)?a:36,x=f["main-body-wrapper"],I=x?m(x):null,b=I?Math.max(8,Math.ceil(I.clientHeight/v)+2+2*i):8,D=[0];let R=0;o&&y(0,h.length).find((e=>{const t=(H(D)||0)+Math.max(v,s.getMax(e));if(D.push(t),t>o)return R=Math.max(0,e-i),!0})),Object.assign(p,{startIndex:R,endIndex:R+b});const U=`${D[R]}px`,w=`${y(0,h.length).reduce(((e,t)=>e+Math.max(v,s.getMax(t))),0)}px`;["main","left","right"].forEach((e=>{const t=f[`${e}-body-table`],o=t?m(t):null;o&&(o.style.marginTop=U),["header","body","footer"].forEach((t=>{const o=f[`${e}-${t}-ySpace`],l=o?m(o):null;l&&(l.style.height=w)}))}));const E=h.slice(p.startIndex,p.endIndex);E.forEach(((t,o)=>{const l=e.getRowid(t),a=g[l];a&&(a.$index=o)})),c.tableData=E}function L(){const e="variableHeightRendererPlugin";return U({name:e,vxe(e){e.renderer.add(D.VARIABLE_HEIGHT,{renderCell:(e,t)=>s(C,{payload:t},null)})},apply(t){function o(e){if(!e.uuid)return;const t=S(e.uuid);t&&(e.scrollY=t),setTimeout((()=>{const t=F(e.uuid);if(!t)return;e.scrollY={enabled:!1},t.reactData.scrollYLoad=!1;const o=t.getScroll();$(t,e,{scrollTop:o.scrollTop})}),300)}t.dataHooks.dataStart.tap(e,o),t.eventHooks.onFilterChange.tap(e,((e,t)=>o(t))),t.eventHooks.onSortChange.tap(e,((e,t)=>o(t))),t.fieldHooks.field.tap(e,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=x(t,["default"]),e.editRender={...e.editRender,name:D.VARIABLE_HEIGHT}}return e})),t.fieldHooks.fieldList.tap(e,((e,t)=>(t.uuid&&p(e,((e,o)=>{var l,a,r;if((null==(l=e.editRender)?void 0:l.name)===D.VARIABLE_HEIGHT){A(t.uuid,t.scrollY),t.scrollY={enabled:!1};const e=null!=(r=null==(a=t.rowConfig)?void 0:a.height)?r:36,l=T(t.uuid),n=t.cellStyle;t.cellStyle=function(t){const o={};if(t.column.fixed){const a=Math.max(e,l.getMax(t.rowIndex));a&&(o.height=`${a}px`)}return Object.assign(o,n?g(n)?n(t):n:null)};const s=t.cellClassName;t.cellClassName=function(e){var t;const o=g(s)?s(e):s,l=o?I(o)?{[o]:!0}:o:{};return Object.assign({"virtual-height":(null==(t=e.column.editRender)?void 0:t.name)===D.VARIABLE_HEIGHT},l)},setTimeout((()=>{const e=F(t.uuid);e&&(e.reactData.scrollYLoad=!1,$(e,t,{scrollTop:0}))}),300),o()}})),e))),t.setupHooks.setup.tap(e,(e=>{d((()=>{e.value.uuid&&(E(e.value.uuid),M(e.value.uuid),k(e.value.uuid))}))})),t.eventHooks.onScroll.tap(e,f((async(e,t)=>{const{uuid:o}=t;if(!o)return;const l=F(o);l&&(await h(0),$(l,t,e))}),200))}})}export{L as variableHeightRendererPlugin};
|