cnhis-design-vue 3.1.42-beta.57 → 3.1.42-beta.59
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/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -1
- package/es/components/iho-table/index.d.ts +36 -36
- package/es/components/iho-table/src/IhoTable.vue.d.ts +36 -36
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.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 +1 -1
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-person/index.d.ts +15 -7
- package/es/components/select-person/src/SelectPerson.vue.d.ts +9 -5
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/index.d.ts +3 -14
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../_virtual/plugin-vue_export-helper.js";import A from"../../../shared/utils/vexutilsExpand.js";const O={key:0,class:"label-disable-wrap"},j=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,j)):o("v-if",!0),r(c("div",K,[c("div",k,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(P.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(P.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
|
|
@@ -2,6 +2,7 @@ import { SFCWithInstall } from '../../../es/shared/types';
|
|
|
2
2
|
declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
3
3
|
defaultList: {
|
|
4
4
|
type: import("vue").PropType<((string | number) | {
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
key: string | number;
|
|
6
7
|
name: string;
|
|
7
8
|
})[]>;
|
|
@@ -49,7 +50,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
49
50
|
default: boolean;
|
|
50
51
|
};
|
|
51
52
|
queryLoadChildData: {
|
|
52
|
-
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<
|
|
53
|
+
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
53
54
|
default: undefined;
|
|
54
55
|
};
|
|
55
56
|
queryTreeSearch: {
|
|
@@ -60,6 +61,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
60
61
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
61
62
|
defaultList: {
|
|
62
63
|
type: import("vue").PropType<((string | number) | {
|
|
64
|
+
[key: string]: any;
|
|
63
65
|
key: string | number;
|
|
64
66
|
name: string;
|
|
65
67
|
})[]>;
|
|
@@ -107,7 +109,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
107
109
|
default: boolean;
|
|
108
110
|
};
|
|
109
111
|
queryLoadChildData: {
|
|
110
|
-
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<
|
|
112
|
+
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
111
113
|
default: undefined;
|
|
112
114
|
};
|
|
113
115
|
queryTreeSearch: {
|
|
@@ -134,28 +136,31 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
134
136
|
suffix?: (() => import("vue").VNodeChild) | undefined;
|
|
135
137
|
}[]>;
|
|
136
138
|
tagData: import("vue").Ref<{
|
|
139
|
+
[x: string]: any;
|
|
137
140
|
key: string | number;
|
|
138
141
|
name: string;
|
|
139
142
|
}[]>;
|
|
140
|
-
temp:
|
|
141
|
-
[k: string]: unknown;
|
|
142
|
-
} & import("../../../es/shared/types").AnyObject)[];
|
|
143
|
+
temp: import("naive-ui").TreeOption[];
|
|
143
144
|
allCheckedKeys: (string | number)[];
|
|
144
145
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
145
146
|
init: () => void;
|
|
147
|
+
queryLoadChildNode: (node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>;
|
|
146
148
|
setDisabled: (data: import("naive-ui").TreeOption) => void;
|
|
147
149
|
renderLabel: ({ option }: {
|
|
148
150
|
option: import("naive-ui").TreeOption;
|
|
149
151
|
}) => JSX.Element;
|
|
150
152
|
getLabelName: (option: import("naive-ui").TreeOption) => unknown;
|
|
153
|
+
transformParentNodeName: (trees: import("naive-ui").TreeOption[], temp: any) => import("naive-ui").TreeOption[];
|
|
151
154
|
setAllCheckedKeys: (tree: import("naive-ui").TreeOption[]) => void;
|
|
152
155
|
onSearch: () => Promise<void>;
|
|
153
156
|
setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
|
|
154
157
|
checkedAllChange: (checked: boolean) => void;
|
|
155
158
|
uniq: (arr: {
|
|
159
|
+
[key: string]: any;
|
|
156
160
|
key: string | number;
|
|
157
161
|
name: string;
|
|
158
162
|
}[]) => {
|
|
163
|
+
[key: string]: any;
|
|
159
164
|
key: string | number;
|
|
160
165
|
name: string;
|
|
161
166
|
}[];
|
|
@@ -164,6 +169,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
164
169
|
setCheckedAll: () => void;
|
|
165
170
|
clearAll: () => void;
|
|
166
171
|
closeTag: (tag: {
|
|
172
|
+
[key: string]: any;
|
|
167
173
|
key: string | number;
|
|
168
174
|
name: string;
|
|
169
175
|
}) => void;
|
|
@@ -239,6 +245,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
239
245
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "check"[], "check", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
240
246
|
defaultList: {
|
|
241
247
|
type: import("vue").PropType<((string | number) | {
|
|
248
|
+
[key: string]: any;
|
|
242
249
|
key: string | number;
|
|
243
250
|
name: string;
|
|
244
251
|
})[]>;
|
|
@@ -286,7 +293,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
286
293
|
default: boolean;
|
|
287
294
|
};
|
|
288
295
|
queryLoadChildData: {
|
|
289
|
-
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<
|
|
296
|
+
type: import("vue").PropType<(node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>>;
|
|
290
297
|
default: undefined;
|
|
291
298
|
};
|
|
292
299
|
queryTreeSearch: {
|
|
@@ -300,6 +307,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
300
307
|
[k: string]: unknown;
|
|
301
308
|
} & import("../../../es/shared/types").AnyObject)[];
|
|
302
309
|
defaultList: ((string | number) | {
|
|
310
|
+
[key: string]: any;
|
|
303
311
|
key: string | number;
|
|
304
312
|
name: string;
|
|
305
313
|
})[];
|
|
@@ -317,7 +325,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
317
325
|
showCount: boolean;
|
|
318
326
|
showClear: boolean;
|
|
319
327
|
multiple: boolean;
|
|
320
|
-
queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<
|
|
328
|
+
queryLoadChildData: (node: import("naive-ui").TreeOption) => Promise<import("../../../es/shared/types").AnyObject>;
|
|
321
329
|
queryTreeSearch: (keyWork: string) => Promise<import("../../../es/shared/types").AnyObject[]>;
|
|
322
330
|
}>>;
|
|
323
331
|
export default SelectPerson;
|
|
@@ -15,6 +15,7 @@ declare type IWordBookChild<T> = {
|
|
|
15
15
|
declare type ITag = {
|
|
16
16
|
key: IKey;
|
|
17
17
|
name: string;
|
|
18
|
+
[key: string]: any;
|
|
18
19
|
};
|
|
19
20
|
declare const _default: import("vue").DefineComponent<{
|
|
20
21
|
defaultList: {
|
|
@@ -54,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
55
|
default: boolean;
|
|
55
56
|
};
|
|
56
57
|
queryLoadChildData: {
|
|
57
|
-
type: PropType<(node: TreeOption) => Promise<
|
|
58
|
+
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
58
59
|
default: undefined;
|
|
59
60
|
};
|
|
60
61
|
queryTreeSearch: {
|
|
@@ -100,7 +101,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
101
|
default: boolean;
|
|
101
102
|
};
|
|
102
103
|
queryLoadChildData: {
|
|
103
|
-
type: PropType<(node: TreeOption) => Promise<
|
|
104
|
+
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
104
105
|
default: undefined;
|
|
105
106
|
};
|
|
106
107
|
queryTreeSearch: {
|
|
@@ -127,18 +128,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
128
|
suffix?: (() => import("vue").VNodeChild) | undefined;
|
|
128
129
|
}[]>;
|
|
129
130
|
tagData: import("vue").Ref<{
|
|
131
|
+
[x: string]: any;
|
|
130
132
|
key: IKey;
|
|
131
133
|
name: string;
|
|
132
134
|
}[]>;
|
|
133
|
-
temp:
|
|
135
|
+
temp: TreeOption[];
|
|
134
136
|
allCheckedKeys: IKey[];
|
|
135
137
|
isRemote: import("vue").ComputedRef<boolean>;
|
|
136
138
|
init: () => void;
|
|
139
|
+
queryLoadChildNode: (node: TreeOption) => Promise<AnyObject>;
|
|
137
140
|
setDisabled: (data: TreeOption) => void;
|
|
138
141
|
renderLabel: ({ option }: {
|
|
139
142
|
option: TreeOption;
|
|
140
143
|
}) => JSX.Element;
|
|
141
144
|
getLabelName: (option: TreeOption) => unknown;
|
|
145
|
+
transformParentNodeName: (trees: TreeOption[], temp: any) => TreeOption[];
|
|
142
146
|
setAllCheckedKeys: (tree: TreeOption[]) => void;
|
|
143
147
|
onSearch: () => Promise<void>;
|
|
144
148
|
setTreeCheckd: (tree: TreeOption[], checked: boolean) => void;
|
|
@@ -256,7 +260,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
256
260
|
default: boolean;
|
|
257
261
|
};
|
|
258
262
|
queryLoadChildData: {
|
|
259
|
-
type: PropType<(node: TreeOption) => Promise<
|
|
263
|
+
type: PropType<(node: TreeOption) => Promise<AnyObject>>;
|
|
260
264
|
default: undefined;
|
|
261
265
|
};
|
|
262
266
|
queryTreeSearch: {
|
|
@@ -275,7 +279,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
275
279
|
showCount: boolean;
|
|
276
280
|
showClear: boolean;
|
|
277
281
|
multiple: boolean;
|
|
278
|
-
queryLoadChildData: (node: TreeOption) => Promise<
|
|
282
|
+
queryLoadChildData: (node: TreeOption) => Promise<AnyObject>;
|
|
279
283
|
queryTreeSearch: (keyWork: string) => Promise<Array<AnyObject>>;
|
|
280
284
|
}>;
|
|
281
285
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as o,unref as u,withCtx as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as a,openBlock as n,createBlock as o,unref as u,withCtx as r,createVNode as i,withKeys as d,createTextVNode as c,toDisplayString as s,withDirectives as h,vShow as p,createCommentVNode as v,createElementBlock as f,createElementVNode as y,Fragment as k,renderList as m}from"vue";import{NGrid as g,NGi as b,NSpace as _,NInputGroup as w,NInput as x,NButton as C,NCheckbox as L,NTree as j,NIcon as T,NTooltip as $}from"naive-ui";import{CloseCircleSharp as q}from"@vicons/ionicons5";import{filterTree as B,getExpandedKeys as D}from"./utils/index.js";import{cloneDeep as P}from"lodash-es";const S={key:0},U={class:"c-select-person__scroll",style:{height:"342px"}};var N=e({__name:"SelectPerson",props:{defaultList:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]},searchPlaceholder:{type:String,default:"输入关键字搜索"},searchButtonText:{type:String,default:"搜索"},wordbook:{type:Object,default:()=>({})},wordbookChild:{type:Object,default:()=>({})},showCount:{type:Boolean,default:!0},showClear:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},queryLoadChildData:{type:Function,default:void 0},queryTreeSearch:{type:Function,default:()=>Promise.resolve([])}},emits:["check"],setup(e,{emit:N}){const K=e,A=l(""),E=l(!1),F=l([]),I=l([]),O=l([]),R=l([]),z=P(function e(l,t){return l&&0!==l.length?l.map((l=>{var a;const n=V(l),o=t?`${t}/${n}`:n;return{...l,tempTitle:t,children:(null==(a=l.children)?void 0:a.length)?e(null==l?void 0:l.children,o):[]}})):[]}(K.data,""));let G=[];const H=t((()=>!!K.queryLoadChildData));async function J(e){if(K.queryLoadChildData){const l=await K.queryLoadChildData(e);return l.children&&(l.children=l.children.map((e=>({...e,tempTitle:l.tempTitle?`${l.tempTitle}/${l.title}`:l.title})))),l}return e}function M(e){var l;(null==(l=e.children)?void 0:l.every((e=>e.disabled)))&&(e.disabled=!0)}function Q({option:e}){var l;if((null==(l=e.children)?void 0:l.length)||H.value&&!(null==e?void 0:e.isLeaf)){const l=K.wordbook.user_count_obj&&e[K.wordbook.user_count_obj]||"",t=l?`(${l})`:"";return i("span",null,[`${e.title}${t}`])}return i($,{trigger:"hover"},{default:()=>i("span",null,[e.title]),trigger:()=>i("span",null,[e.title])})}function V(e){return e[K.wordbookChild.user_name_obj]||e[K.wordbook.parent_name_obj]||e.orgName||e.title||""}function W(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];(null==(l=a.children)?void 0:l.length)&&W(a.children),a.disabled||a.children||G.push(a.key)}}async function X(){H.value?O.value=await K.queryTreeSearch(A.value):(O.value=B(z,A.value),G=[],W(O.value),te()),I.value=O.value.length&&A.value?D(O.value):[]}function Y(e,l){for(let t=0,a=e.length;t<a;t++){const a=e[t];if(!a.disabled&&(!a.children||a.isLeaf)&&(l&&!F.value.includes(a.key)&&F.value.push(a.key),!l)){const e=F.value.findIndex((e=>e===a.key));F.value.splice(e,1)}a.children&&Y(a.children,l)}}function Z(e){Y(O.value,e)}function ee(e){var l;for(let t=0,a=e.length;t<a;t++){const a=e[t];F.value.includes(a.key)&&R.value.push({key:a.key,name:a.title,parentName:a.tempTitle}),(null==(l=a.children)?void 0:l.length)&&ee(a.children)}}function le(e){F.value=e}function te(){E.value=G.every((e=>R.value.findIndex((l=>l.key===e))>-1))}function ae(){F.value=[]}return function e(l){var t,a;for(let n=0,o=l.length;n<o;n++){const o=l[n];o.title=V(o),o.key||(o.key=o[K.wordbookChild.user_id_obj]||o[K.wordbook.parent_id_obj]||Date.now()),(null==(t=o.children)?void 0:t.length)?(e(o.children),M(o)):0===(null==(a=o.children)?void 0:a.length)&&Reflect.deleteProperty(o,"children"),o.disabled||o.children||G.push(o.key)}}(z),O.value=z,K.defaultList.length>0&&(H.value?(K.defaultList.forEach((e=>F.value.push(e.key))),R.value=P(K.defaultList)):(K.defaultList.forEach((e=>F.value.push(e))),ee(z))),a((()=>F),(e=>{R.value=[],e.value.length&&ee(H.value?O.value:z),te(),N("check",e.value)}),{deep:!0}),(l,t)=>(n(),o(u(g),{cols:2,class:"c-select-person"},{default:r((()=>[i(u(b),null,{default:r((()=>[i(u(_),{vertical:"",style:{"padding-right":"12px","border-right":"1px solid #e8e8e8"}},{default:r((()=>[i(u(w),{style:{"margin-bottom":"12px"}},{default:r((()=>[i(u(x),{clearable:"",value:A.value,"onUpdate:value":t[0]||(t[0]=e=>A.value=e),placeholder:e.searchPlaceholder,onKeyup:d(X,["enter"])},null,8,["value","placeholder","onKeyup"]),i(u(C),{type:"primary",onClick:X},{default:r((()=>[c(s(e.searchButtonText),1)])),_:1})])),_:1}),e.multiple?h((n(),o(u(L),{key:0,checked:E.value,"onUpdate:checked":[t[1]||(t[1]=e=>E.value=e),Z]},{default:r((()=>[c(" 全选 ")])),_:1},8,["checked"])),[[p,u(G).length<1e3]]):v("v-if",!0),i(u(j),{"virtual-scroll":"",class:"c-select-person__scroll","checked-keys":F.value,"expanded-keys":I.value,"onUpdate:expanded-keys":t[2]||(t[2]=e=>I.value=e),checkable:e.multiple,cascade:"","allow-checking-not-loaded":"",selectable:!e.multiple,"selected-keys":F.value,"onUpdate:selected-keys":t[3]||(t[3]=e=>F.value=e),data:O.value,"check-strategy":"child","render-label":Q,"onUpdate:checkedKeys":le,onLoad:J},null,8,["checked-keys","expanded-keys","checkable","selectable","selected-keys","data"])])),_:1})])),_:1}),i(u(b),null,{default:r((()=>[i(u(_),{vertical:"",style:{"padding-left":"12px"}},{default:r((()=>[i(u(_),{justify:"space-between",style:{"margin-bottom":"20px"}},{default:r((()=>[e.showCount?(n(),f("span",S,"已选择:"+s(R.value.length),1)):v("v-if",!0),e.showClear?(n(),f("span",{key:1,class:"c-select-person__clear-btn",onClick:ae},"清空")):v("v-if",!0)])),_:1}),y("div",U,[(n(!0),f(k,null,m(R.value,(e=>(n(),f("span",{class:"c-select-person__tag-item",key:e.key},[c(s(e.name)+" "+s(e.parentName?`(${e.parentName})`:"")+" ",1),i(u(T),{class:"tag-close",component:u(q),onClick:l=>function(e){F.value=F.value.filter((l=>l!==e.key))}(e)},null,8,["component","onClick"])])))),128))])])),_:1})])),_:1})])),_:1}))}});export{N as default};
|
package/es/env.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
25
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|
|
25
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
declare const draggableComponent: import('vue').DefineComponent<
|
|
2
|
+
{
|
|
3
|
+
list: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
required: boolean;
|
|
6
|
+
default: any;
|
|
7
|
+
};
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
required: boolean;
|
|
11
|
+
default: any;
|
|
12
|
+
};
|
|
13
|
+
itemKey: {
|
|
14
|
+
type: (FunctionConstructor | StringConstructor)[];
|
|
15
|
+
required: boolean;
|
|
16
|
+
};
|
|
17
|
+
clone: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
default: (original: any) => any;
|
|
20
|
+
};
|
|
21
|
+
tag: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
move: {
|
|
26
|
+
type: FunctionConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
componentData: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
required: boolean;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
unknown,
|
|
36
|
+
{
|
|
37
|
+
error: boolean;
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
realList(): any;
|
|
41
|
+
getKey(): any;
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
getUnderlyingVm(domElement: any): any;
|
|
45
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
46
|
+
emitChanges(evt: any): void;
|
|
47
|
+
alterList(onList: any): void;
|
|
48
|
+
spliceList(): void;
|
|
49
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
50
|
+
getRelatedContextFromMoveEvent({ to, related }: { to: any; related: any }): any;
|
|
51
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
52
|
+
onDragStart(evt: any): void;
|
|
53
|
+
onDragAdd(evt: any): void;
|
|
54
|
+
onDragRemove(evt: any): void;
|
|
55
|
+
onDragUpdate(evt: any): void;
|
|
56
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
57
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
58
|
+
onDragEnd(): void;
|
|
59
|
+
},
|
|
60
|
+
import('vue').ComponentOptionsMixin,
|
|
61
|
+
import('vue').ComponentOptionsMixin,
|
|
62
|
+
any[],
|
|
63
|
+
any,
|
|
64
|
+
import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps,
|
|
65
|
+
Readonly<
|
|
66
|
+
{
|
|
67
|
+
move: Function;
|
|
68
|
+
tag: string;
|
|
69
|
+
clone: Function;
|
|
70
|
+
list: unknown[];
|
|
71
|
+
modelValue: unknown[];
|
|
72
|
+
componentData: Record<string, any>;
|
|
73
|
+
} & {
|
|
74
|
+
itemKey?: string | Function;
|
|
75
|
+
}
|
|
76
|
+
>,
|
|
77
|
+
{
|
|
78
|
+
move: Function;
|
|
79
|
+
tag: string;
|
|
80
|
+
clone: Function;
|
|
81
|
+
list: unknown[];
|
|
82
|
+
modelValue: unknown[];
|
|
83
|
+
componentData: Record<string, any>;
|
|
84
|
+
}
|
|
85
|
+
>;
|
|
86
|
+
export default draggableComponent;
|
|
@@ -15,20 +15,9 @@ export declare function targetStringIncludes(arr: string[], target: string): boo
|
|
|
15
15
|
export declare const jsonParse: import("@vueuse/core").UseMemoizedFn<any, [value: string]>;
|
|
16
16
|
export declare function shallowOmit<T, K extends Array<keyof T>>(target: T, keys: K): Omit<T, K[number]>;
|
|
17
17
|
export declare function checkInSetupEnv(message?: string): void;
|
|
18
|
-
export declare
|
|
19
|
-
EQ = "EQ",
|
|
20
|
-
NEQ = "NEQ",
|
|
21
|
-
CL = "CL",
|
|
22
|
-
NC = "NC",
|
|
23
|
-
NULL = "NULL",
|
|
24
|
-
NOT_NULL = "NOT_NULL",
|
|
25
|
-
BIG = "BIG",
|
|
26
|
-
BIGEQ = "BIGEQ",
|
|
27
|
-
LESS = "LESS",
|
|
28
|
-
LESSEQ = "LESSEQ"
|
|
29
|
-
}
|
|
18
|
+
export declare type LOW_CODE_VALUE_RELATION = 'EQ' | 'NEQ' | 'CL' | 'NC' | 'NULL' | 'NOT_NULL' | 'BIG' | 'BIGEQ' | 'LESS' | 'LESSEQ';
|
|
30
19
|
export declare function isMatchLowCodeCondition(value: unknown, condition: {
|
|
31
|
-
con: LOW_CODE_VALUE_RELATION
|
|
20
|
+
con: LOW_CODE_VALUE_RELATION;
|
|
32
21
|
value: unknown;
|
|
33
|
-
}):
|
|
22
|
+
}): boolean;
|
|
34
23
|
export declare function hex2rgba(hex: string, defaultAlpha?: number): readonly [number, number, number, number];
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemoize as t}from"@vueuse/core";import{isArray as
|
|
1
|
+
import{useMemoize as t}from"@vueuse/core";import{isArray as n,isString as e,includes as r,isEmpty as o,negate as u,gt as i,gte as c,lt as s,lte as f,isNumber as a,isObject as x,isFunction as d}from"lodash-es";import{getCurrentInstance as l}from"vue";function m(t,n,e="children",r){let o=!1;function u(){o=!0}!function t(n,e,r="children",i){r=w(r),n=w(n);for(let c=0;c<n.length;c++){if(e(n[c],u,i),o)return;for(let u=0;u<r.length;u++){const i=n[c][r[u]];if(Array.isArray(i)&&t(i,e,r,i),o)return}}}(t,n,e,r)}function p(t,n,e=n.name,r){if(!e)throw new Error(`[CUI]: invalid component name for ${n}`);const{components:o={}}=t._context;o[e]||(r?r():t.component(e,n))}function h(t){if(!e(t))return;const n=t.match(/[Hms:]+/);return n?n[0]:void 0}function w(t){return Array.isArray(t)?t:[t]}function y(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const n=16*Math.random()|0;return("x"==t?n:3&n|8).toString(16)}))}`}const $=t((function(t){return t?[...t].reduce(((t,n)=>/[a-z]/.test(n)?t+8:/[A-Z]/.test(n)?t+12:/\d/.test(n)?t+9:/\./.test(n)?t+4:/[\u4e00-\u9fa5]/.test(n)?t+15:/-/.test(n)?t+4:/[()]/.test(n)?t+14:/[)(]/.test(n)?t+5:/-/.test(n)?t+10:/%/.test(n)?t+14:/‰/.test(n)?t+16:t+6),0):0})),E=Object.seal(Object.create(null));function v(t,e){return function t(e,r){return x(e)?n(e)?e.map((n=>t(n,r))):Object.entries(e).reduce(((n,[e,o])=>(r.includes(e)||(x(o)&&!d(o)?n[e]=t(o,r):n[e]=o),n)),{}):e}(t,e)}function g(t){return Object.values(t).reduce(((t,n)=>Object.assign(t,n)),{})}function I(t,n){if(!t)return t;if(n(t))return t;let e=t.parentElement;for(;e&&!n(e);)e=e.parentElement;return e}function b(t,n="px"){if(a(t))return`${t}${n}`;if(e(t))return t.endsWith(n)?t:`${t}${n}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function L(t,n){return t.some((t=>n.includes(t)))}const O=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function S(t,n){if(!x(t))return t;const e={...t};for(let t=0;t<n.length;t++)Reflect.deleteProperty(e,n[t]);return e}function N(t){if(!l())throw new Error(t||"can't use this hook out of setup environment")}const j={EQ:(t,n)=>`${t}`===n,NEQ:(t,n)=>`${t}`!==n,CL:(t,o)=>!(!n(t)&&!e(t))&&r(t,o),NC:(t,o)=>!n(t)&&!e(t)||!r(t,o),NULL:o,NOT_NULL:u(o),BIG:i,BIGEQ:c,LESS:s,LESSEQ:f};function A(t,n){return(j[n.con]||(()=>!1))(t,`${n.value}`)}function U(t,n=1){const[e,r,o,u,i]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!e)return[255,255,255,n];const c=i&&parseInt(i,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(u,16),+(a(c)?c.toFixed(2):n)]}export{E as DMZ,w as arrayed,N as checkInSetupEnv,v as deepOmit,I as findAncestor,h as generateTimeFormat,$ as getStringWidth,U as hex2rgba,A as isMatchLowCodeCondition,O as jsonParse,p as safeComponentRegister,g as separateMetaModule,S as shallowOmit,L as targetStringIncludes,m as traverse,y as uuidGenerator,b as widthAppend};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
type FixedSizeArray<T extends number, U> = T extends 0
|
|
2
|
+
? void[]
|
|
3
|
+
: ReadonlyArray<U> & {
|
|
4
|
+
0: U;
|
|
5
|
+
length: T;
|
|
6
|
+
};
|
|
7
|
+
type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
|
|
8
|
+
type Append<T extends any[], U> = {
|
|
9
|
+
0: [U];
|
|
10
|
+
1: [T[0], U];
|
|
11
|
+
2: [T[0], T[1], U];
|
|
12
|
+
3: [T[0], T[1], T[2], U];
|
|
13
|
+
4: [T[0], T[1], T[2], T[3], U];
|
|
14
|
+
5: [T[0], T[1], T[2], T[3], T[4], U];
|
|
15
|
+
6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
|
|
16
|
+
7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
|
|
17
|
+
8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
|
|
18
|
+
}[Measure<T['length']>];
|
|
19
|
+
type AsArray<T> = T extends any[] ? T : [T];
|
|
20
|
+
|
|
21
|
+
declare class UnsetAdditionalOptions {
|
|
22
|
+
_UnsetAdditionalOptions: true;
|
|
23
|
+
}
|
|
24
|
+
type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
|
|
25
|
+
|
|
26
|
+
type Callback<E, T> = (error: E | null, result?: T) => void;
|
|
27
|
+
type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
|
|
28
|
+
|
|
29
|
+
type FullTap = Tap & {
|
|
30
|
+
type: 'sync' | 'async' | 'promise';
|
|
31
|
+
fn: Function;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type Tap = TapOptions & {
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type TapOptions = {
|
|
39
|
+
before?: string;
|
|
40
|
+
stage?: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
44
|
+
name?: string;
|
|
45
|
+
tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
|
|
46
|
+
call?: (...args: any[]) => void;
|
|
47
|
+
loop?: (...args: any[]) => void;
|
|
48
|
+
error?: (err: Error) => void;
|
|
49
|
+
result?: (result: R) => void;
|
|
50
|
+
done?: () => void;
|
|
51
|
+
register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
|
|
55
|
+
|
|
56
|
+
declare class Hook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
|
|
57
|
+
constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
|
|
58
|
+
name: string | undefined;
|
|
59
|
+
taps: FullTap[];
|
|
60
|
+
intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
|
|
61
|
+
isUsed(): boolean;
|
|
62
|
+
callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
|
|
63
|
+
promise(...args: AsArray<T>): Promise<R>;
|
|
64
|
+
tap(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void;
|
|
65
|
+
withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<this, 'call' | 'callAsync' | 'promise'>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
|
|
69
|
+
call(...args: AsArray<T>): R;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, R, AdditionalOptions> {}
|
|
73
|
+
export class SyncLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, void, AdditionalOptions> {}
|
|
74
|
+
export class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<
|
|
75
|
+
T,
|
|
76
|
+
AsArray<T>[0],
|
|
77
|
+
AdditionalOptions
|
|
78
|
+
> {}
|
|
79
|
+
|
|
80
|
+
declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
|
|
81
|
+
tapAsync(
|
|
82
|
+
options: string | (Tap & IfSet<AdditionalOptions>),
|
|
83
|
+
fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void
|
|
84
|
+
): void;
|
|
85
|
+
tapPromise(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => Promise<R>): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
89
|
+
T,
|
|
90
|
+
void,
|
|
91
|
+
AdditionalOptions
|
|
92
|
+
> {}
|
|
93
|
+
export class AsyncParallelBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
94
|
+
T,
|
|
95
|
+
R,
|
|
96
|
+
AdditionalOptions
|
|
97
|
+
> {}
|
|
98
|
+
export class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
99
|
+
T,
|
|
100
|
+
void,
|
|
101
|
+
AdditionalOptions
|
|
102
|
+
> {}
|
|
103
|
+
export class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
104
|
+
T,
|
|
105
|
+
R,
|
|
106
|
+
AdditionalOptions
|
|
107
|
+
> {}
|
|
108
|
+
export class AsyncSeriesLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
109
|
+
T,
|
|
110
|
+
void,
|
|
111
|
+
AdditionalOptions
|
|
112
|
+
> {}
|
|
113
|
+
export class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
|
|
114
|
+
T,
|
|
115
|
+
AsArray<T>[0],
|
|
116
|
+
AdditionalOptions
|
|
117
|
+
> {}
|
|
118
|
+
|
|
119
|
+
type HookFactory<H> = (key: any, hook?: H) => H;
|
|
120
|
+
|
|
121
|
+
interface HookMapInterceptor<H> {
|
|
122
|
+
factory?: HookFactory<H>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export class HookMap<H> {
|
|
126
|
+
constructor(factory: HookFactory<H>, name?: string);
|
|
127
|
+
name: string | undefined;
|
|
128
|
+
get(key: any): H | undefined;
|
|
129
|
+
for(key: any): H;
|
|
130
|
+
intercept(interceptor: HookMapInterceptor<H>): void;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export class MultiHook<H> {
|
|
134
|
+
constructor(hooks: H[], name?: string);
|
|
135
|
+
name: string | undefined;
|
|
136
|
+
tap(options: string | Tap, fn?: Function): void;
|
|
137
|
+
tapAsync(options: string | Tap, fn?: Function): void;
|
|
138
|
+
tapPromise(options: string | Tap, fn?: Function): void;
|
|
139
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.42-beta.
|
|
3
|
+
"version": "3.1.42-beta.59",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "199c2a8dbf8912676a33a6276a1736df41123cc2"
|
|
65
65
|
}
|