cnhis-design-vue 3.1.49-beta.14 → 3.1.49-beta.16
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/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/field-set/index.d.ts +72 -5
- package/es/components/field-set/src/FieldSet.vue.d.ts +56 -6
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +15 -5
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.js +1 -1
- 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/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,reactive as i,watch as o,openBlock as d,createElementBlock as a,normalizeStyle as s,createBlock as n,unref as r,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,withCtx as v,createTextVNode as y,toDisplayString as b,createVNode as k,mergeProps as g,renderSlot as x}from"vue";import{useThemeVars as w,NInput as A,NCheckbox as _,NTooltip as S,NIcon as C,NPopconfirm as W,NButton as E}from"naive-ui";import q from"../../../shared/components/VueDraggable/src/vuedraggable.js";import F from"./components/Row.vue.js";import{isArray as N,cloneDeep as R,isString as j,omit as B}from"lodash-es";import{isDisable as I,setStyle as U,getGroupTree as D}from"./utils/index.js";import{uuidGenerator as O}from"../../../shared/utils/index.js";import{HelpCircleSharp as P}from"@vicons/ionicons5";const T={class:"c-field-set__table-header"},V=h("span",null,"数值越小,优先级越高",-1),K=["tabindex"],L={key:1,class:"c-field-set__table-footer"};var G=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:G,emit:H}){const M=e,$={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},z=l(w().value.primaryColor),J=l(""),Q=l(),X=l([]),Y=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:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),Z=t((()=>X.value.flat())),ee=i({columns:Y.value,fieldList:Z.value,onUpdateChecked:function({checked:e,column:l}){const t=!e||ue(l.field);l.checkedAll=!t}}),le={keyword:J.value,idx:0,startIdx:0},te=()=>{H("save",{tableFields:ae()})},ie=()=>{H("close")};function oe(){X.value=de(),re(),H("reset")}function de(){const e=R(M.fields).map((e=>({...e,uuid:O()})));return Object.keys($).forEach((l=>{e.forEach((e=>{"old"==M.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[$[l]]=1==e[l]:e[$[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)}))})),function(e){if(M.groupSetting){return D(M.groupSetting,e).reduce(((t,i)=>{const o=j(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function ae(){let e=[];return e="old"==M.type?Z.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,...M.isEdit?{required:e.required,editable:e.editable}:{}}))):Z.value,e.map((e=>B(e,["uuid"])))}function se(){const e=le.keyword!==J.value;let l=J.value?Z.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(J.value))return!!e||t>le.idx})):0;-1!==l||e||(l=le.startIdx),Q.value.scrollTop=52*l,Object.assign(le,{keyword:J.value,idx:l},e?{startIdx:l}:{})}function ne(e){var l;return!!J.value&&(null==(l=e.title)?void 0:l.includes(J.value))}function re(){var e,l;(null==(e=M.showColumnNames)?void 0:e.length)&&(Y.value=Y.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=M.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=M.customColumns)?void 0:l.length)&&Y.value.push(...M.customColumns),M.showSeq&&Y.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),Y.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&M.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=X.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ue(e.field)&&!l}}))}function ue(e){return X.value.flat().some((l=>!I(l,e)&&!l[e]&&"0001"!=l.id))}return o([()=>M.fields,()=>{var e;return null==(e=M.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(X.value=de(),re())}),{immediate:!0,deep:!0}),G({getTableFields:ae}),(l,t)=>(d(),a("div",{class:"c-field-set",style:s({"--row-height":"52px","--primary-color":z.value})},[e.showSearch?(d(),n(r(A),{key:0,class:"c-field-set__search-wrapper",value:J.value,"onUpdate:value":t[0]||(t[0]=e=>J.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(se,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",T,[(d(!0),a(p,null,m(Y.value,((e,l)=>(d(),a(p,{key:l},[e.isShow?(d(),a("span",{key:0,class:"table-cell",style:s(r(U)(e))},["checkbox"===e.type?(d(),n(r(_),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void Z.value.forEach((e=>{I(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:v((()=>[y(b(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):f("v-if",!0),y(" "+b("checkbox"!==e.type?e.title:"")+" ",1),"sortPriority"===e.field?(d(),n(r(S),{key:1,trigger:"hover"},{trigger:v((()=>[k(r(C),{component:r(P),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[V])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"c-field-set__table-body",ref_key:"tableBodyRef",ref:Q},[k(r(q),{modelValue:X.value,"onUpdate:modelValue":t[1]||(t[1]=e=>X.value=e),animation:"150","item-key":"id",draggable:".item"},{item:v((({element:e,index:l})=>[e.hide?f("v-if",!0):(d(),a("div",{key:0,class:"item",tabindex:l},[r(N)(e)?(d(!0),a(p,{key:0},m(e,((e,t)=>(d(),n(F,g(ee,{key:t,element:e,idx:l+1,"is-highlight":ne(e)}),null,16,["element","idx","is-highlight"])))),128)):(d(),n(F,g({key:1},ee,{element:e,idx:l+1,"is-highlight":ne(e)}),null,16,["element","idx","is-highlight"]))],8,K))])),_:1},8,["modelValue"])],512),e.footerFlag?(d(),a("div",L,[f(" 底部按钮插槽 "),x(l.$slots,"footer",{},(()=>[k(r(W),{onPositiveClick:oe},{trigger:v((()=>[k(r(E),{style:{"margin-right":"8px"}},{default:v((()=>[y("恢复默认设置")])),_:1})])),default:v((()=>[y(" 确认要恢复系统默认设置吗? ")])),_:1}),k(r(E),{style:{"margin-right":"8px"},onClick:ie},{default:v((()=>[y("取消")])),_:1}),k(r(E),{type:"primary",onClick:te},{default:v((()=>[y("保存")])),_:1})]))])):f("v-if",!0)],4))}});export{G as default};
|
|
@@ -53,6 +53,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
53
|
}>[]>;
|
|
54
54
|
default: () => never[];
|
|
55
55
|
};
|
|
56
|
+
isHighlight: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
};
|
|
56
59
|
}, {
|
|
57
60
|
fixedWayOptions: {
|
|
58
61
|
label: string;
|
|
@@ -113,6 +116,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
113
116
|
}>[]>;
|
|
114
117
|
default: () => never[];
|
|
115
118
|
};
|
|
119
|
+
isHighlight: {
|
|
120
|
+
type: BooleanConstructor;
|
|
121
|
+
};
|
|
116
122
|
}>> & {
|
|
117
123
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
118
124
|
}>>;
|
|
@@ -191,11 +197,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
191
197
|
}>[]>;
|
|
192
198
|
default: () => never[];
|
|
193
199
|
};
|
|
200
|
+
isHighlight: {
|
|
201
|
+
type: BooleanConstructor;
|
|
202
|
+
};
|
|
194
203
|
}>> & {
|
|
195
204
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
196
205
|
}, {
|
|
197
206
|
columns: FieldSetColumnItem[];
|
|
198
|
-
|
|
207
|
+
fieldList: Partial<{
|
|
199
208
|
[key: string]: any;
|
|
200
209
|
id: string;
|
|
201
210
|
name: string;
|
|
@@ -212,9 +221,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
212
221
|
required: boolean;
|
|
213
222
|
requiredDisable: boolean;
|
|
214
223
|
hide: boolean;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
fieldList: Partial<{
|
|
224
|
+
}>[];
|
|
225
|
+
element: Partial<{
|
|
218
226
|
[key: string]: any;
|
|
219
227
|
id: string;
|
|
220
228
|
name: string;
|
|
@@ -231,6 +239,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
231
239
|
required: boolean;
|
|
232
240
|
requiredDisable: boolean;
|
|
233
241
|
hide: boolean;
|
|
234
|
-
}
|
|
242
|
+
}>;
|
|
243
|
+
idx: number;
|
|
244
|
+
isHighlight: boolean;
|
|
235
245
|
}>;
|
|
236
246
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as
|
|
1
|
+
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as o,createBlock as r,withCtx as u,createVNode as d,createCommentVNode as s,createElementVNode as f,normalizeClass as c,toDisplayString as p,withDirectives as m,vShow as v}from"vue";import{NTooltip as y,NIcon as h,NCheckbox as b,NSelect as k,NInput as g,NInputNumber as x}from"naive-ui";import{setStyle as N,isDisable as U}from"../utils/index.js";import{ReorderTwoOutline as E}from"@vicons/ionicons5";import{range as O}from"lodash-es";const P={class:"row"},w=["title"],C=f("span",null,"拖拽调整顺序",-1);var D=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},fieldList:{type:Array,default:()=>[]},isHighlight:{type:Boolean}},emits:["updateChecked"],setup(e,{emit:D}){const L=e,S=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],A=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}];function H(e){switch(e.field){case"fixedWay":return S;case"sortDirection":return A;case"sortPriority":return function(){const e=O(1,L.fieldList.length+1).map((e=>({label:e.toString(),value:e}))),l=L.fieldList.filter((e=>!!e.sortPriority&&e.uuid!==L.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();default:return[]}}function _(e){if("sortPriority"!==e.field)return!1;const{sortDirection:l}=L.element;return!l||"NONE"===l}return(O,S)=>(l(),t("div",P,[(l(!0),t(i,null,n(e.columns,((n,O)=>(l(),t(i,{key:O},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:a(o(N)(n))},["text"===n.type?(l(),t(i,{key:0},[0===O?(l(),r(o(y),{key:0,trigger:"hover"},{trigger:u((()=>[d(o(h),{style:{"margin-right":"5px",top:"2px"},component:o(E)},null,8,["component"])])),default:u((()=>[C])),_:1})):s("v-if",!0),f("span",{class:c([e.isHighlight&&"title"===n.field?"highlight":""])},p("seq"===n.field?e.idx:e.element[n.field]),3)],64)):s("v-if",!0),"checkbox"===n.type?m((l(),r(o(b),{key:1,disabled:o(U)(e.element,n.field),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){D("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,"0001"!=e.element.id]]):s("v-if",!0),"select"===n.type?m((l(),r(o(k),{key:2,clearable:"",disabled:_(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(L.element.sortPriority=null)}(e,n)],options:H(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):s("v-if",!0),"input"===n.type?m((l(),r(o(g),{key:3,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===n.type?(l(),r(o(x),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):s("v-if",!0)],12,w)):s("v-if",!0)],64)))),128))]))}});export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set .item{background:#fff}.c-field-set .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .item:focus{background-color:#f2f2f2}.c-field-set .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:
|
|
1
|
+
.c-field-set{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .item{background:#fff}.c-field-set .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .item:focus{background-color:#f2f2f2}.c-field-set .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:5px 0}.c-field-set .table-cell{box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .table-cell .highlight{background-color:var(--primary-color);color:#fff}.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}
|