cnhis-design-vue 3.1.45-beta.8 → 3.1.45-beta.9

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.
Files changed (118) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +2 -0
  3. package/es/components/base-search/src/index.vue.d.ts +2 -0
  4. package/es/components/base-search/style/index.css +1 -1
  5. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  6. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  8. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  9. package/es/components/classification/index.d.ts +165 -11
  10. package/es/components/classification/src/components/search-filter/index.vue.d.ts +165 -11
  11. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  12. package/es/components/classification/src/components/set-classification/index.vue.d.ts +165 -11
  13. package/es/components/classification/src/index.vue.d.ts +165 -11
  14. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  17. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  18. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  19. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  20. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  21. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  22. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  23. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  24. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  25. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
  26. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  27. package/es/components/index.css +1 -1
  28. package/es/components/quick-search/index.d.ts +2 -0
  29. package/es/components/quick-search/src/index.vue.d.ts +2 -0
  30. package/es/components/quick-search/style/index.css +1 -1
  31. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  32. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  33. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  34. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  35. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  36. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  37. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  38. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  39. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +165 -10
  40. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  41. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +16 -1
  42. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  43. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +18 -0
  44. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  45. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +128 -10
  46. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
  47. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic1.vue.d.ts +61 -0
  48. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +1 -0
  49. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -1
  50. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +163 -10
  51. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +165 -10
  52. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +218 -0
  53. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.js +1 -0
  54. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -0
  55. package/es/components/table-filter/src/components/render-widget/components/{Date.vue.d.ts → DateOut.vue.d.ts} +21 -2
  56. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.js +1 -0
  57. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +1 -0
  58. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +71 -0
  59. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.js +1 -0
  60. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +1 -0
  61. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +99 -5
  62. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  63. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -9
  64. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
  65. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts +7 -5
  66. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
  67. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts +6 -5
  68. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -1
  69. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +15 -25
  70. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
  71. package/es/components/table-filter/src/components/render-widget/components/Select1.vue.d.ts +45 -0
  72. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +175 -0
  73. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.js +1 -0
  74. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -0
  75. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +114 -0
  76. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.js +1 -0
  77. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -0
  78. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +520 -25
  79. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  80. package/es/components/table-filter/src/components/render-widget/enums.d.ts +10 -3
  81. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  82. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.d.ts +27 -0
  83. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.js +1 -0
  84. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.d.ts +55 -0
  85. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -0
  86. package/es/components/table-filter/src/components/render-widget/helpers/enums.d.ts +56 -0
  87. package/es/components/table-filter/src/components/render-widget/helpers/enums.js +1 -0
  88. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +2 -6
  89. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
  90. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  91. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +548 -24
  92. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  93. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
  94. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  95. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  96. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  97. package/es/components/table-filter/src/types/enums.d.ts +2 -0
  98. package/es/components/table-filter/src/types/enums.js +1 -1
  99. package/es/env.d.ts +25 -25
  100. package/es/shared/assets/img/failure.png.js +1 -1
  101. package/es/shared/assets/img/no-permission.png.js +1 -1
  102. package/es/shared/assets/img/nodata.png.js +1 -1
  103. package/es/shared/assets/img/notfound.png.js +1 -1
  104. package/es/shared/assets/img/qr.png.js +1 -1
  105. package/es/shared/assets/img/success.png.js +1 -1
  106. package/es/shared/assets/img/video.png.js +1 -1
  107. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  108. package/es/shared/assets/img/xb_big.png.js +1 -1
  109. package/es/shared/assets/img/xb_small.png.js +1 -1
  110. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  111. package/es/shared/package.json.js +1 -1
  112. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  113. package/es/shared/utils/tapable/index.d.ts +139 -0
  114. package/package.json +2 -2
  115. package/es/components/table-filter/src/components/render-widget/basicData.d.ts +0 -4
  116. package/es/components/table-filter/src/components/render-widget/basicData.js +0 -1
  117. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +0 -1
  118. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +0 -1
@@ -1,8 +1,9 @@
1
1
  import { PropType } from 'vue';
2
- import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType, ISearchType } from '../../../../../../../es/components/table-filter/src/types';
2
+ import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType } from '../../../../../../../es/components/table-filter/src/types';
3
+ import { AnyObject } from '../../../../../../../es/shared/types';
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  componentCfg: {
5
- type: PropType<ISearchType>;
6
+ type: PropType<AnyObject>;
6
7
  };
7
8
  value: {
8
9
  type: StringConstructor;
@@ -10,10 +11,11 @@ declare const _default: import("vue").DefineComponent<{
10
11
  };
11
12
  }, {
12
13
  handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
14
+ message: import("naive-ui").MessageApi;
13
15
  baseActiveColor: string;
14
16
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
15
17
  componentCfg: {
16
- type: PropType<ISearchType>;
18
+ type: PropType<AnyObject>;
17
19
  };
18
20
  value: {
19
21
  type: StringConstructor;
@@ -25,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
25
27
  emit: (event: "update:value", ...args: any[]) => void;
26
28
  selectedList: import("vue").Ref<string[]>;
27
29
  tagList: import("vue").Ref<never[]>;
28
- filterApiConfig: import("../../../../..").AnyObject;
30
+ filterApiConfig: AnyObject;
29
31
  categoryList: import("vue").ComputedRef<IFilterCategoryLabelItemType[]>;
30
32
  onResize: (el: HTMLElement, categoryItem: IFilterCategoryLabelItemType) => void;
31
33
  handleLabelUpfold: (categoryItem: IFilterCategoryLabelItemType) => void;
@@ -48,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
48
50
  };
49
51
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
52
  componentCfg: {
51
- type: PropType<ISearchType>;
53
+ type: PropType<AnyObject>;
52
54
  };
53
55
  value: {
54
56
  type: StringConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,inject as t,watch as s,computed as o,openBlock as n,createElementBlock as a,Fragment as i,renderList as c,unref as r,createElementVNode as d,toDisplayString as u,normalizeClass as p,withDirectives as f,createBlock as m,normalizeStyle as b,withCtx as v,createVNode as h,withModifiers as y,createCommentVNode as g}from"vue";import{NTag as k,NTooltip as S,NIcon as w}from"naive-ui";import{ChevronUpCircleOutline as C,ChevronDownCircleOutline as x}from"@vicons/ionicons5";import U from"../../../directive/resize.js";import L from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as j}from"../../../constants/index.js";import{isString as B}from"lodash-es";const T={class:"label-attr-filter-container"},_={class:"edit-f-label"},z={class:"label-f-content"},I={key:0,class:"label-f-unfold-btn"},q=["onClick"],A=d("span",null,"收起",-1),G=d("span",null,"展开",-1);var H=e({__name:"LabelInner",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:H}){const M=e,{handleGetConfigApi:N}=L(),O="rgb(85, 133, 245)",D=l([]),E=l([]),F=t(j);s((()=>M.value),(e=>{const l=e&&B(e)?e.split("|#|"):[];D.value=l}),{immediate:!0});const J=o((()=>E.value&&E.value.length>0?E.value.map((e=>(e.labelList.map((e=>{e.isSelect=D.value.includes(e.labelShowText)})),e))):[])),K=e=>e.isSelect?{background:e.backgroundColor||O,borderColor:e.backgroundColor||O}:{};return(async()=>{try{const{widgetCfg:e={}}=M.componentCfg,{classifyStr:l=""}=e;let t=await N({classifyStr:l},"requestListByClassify",{},F);if(t){const{list:e=[]}=t;E.value=e}}catch(e){console.log(e)}})(),(e,l)=>(n(),a("div",T,[(n(!0),a(i,null,c(r(J),(e=>(n(),a("div",{class:"edit-labels-content",key:e.classifyId},[d("span",_,u(e.classifyName)+":",1),d("div",{class:p(["edit-f-content",{"label-select-height":!e.isUnfold&&e.labelList&&e.isShowBtn}])},[f((n(),a("div",z,[(n(!0),a(i,null,c(e.labelList,(e=>(n(),m(r(k),{checkable:"",key:e.labelCode,checked:e.isSelect,"onUpdate:checked":l=>((e,l)=>{if(l.isSelect=e,e)D.value.push(l.labelShowText);else{const e=D.value.findIndex((e=>e===l.labelShowText));e>-1&&D.value.splice(e,1)}H("update:value",D.value.join("|#|"))})(l,e),style:b(K(e))},{default:v((()=>[h(r(S),{placement:"top-start",duration:0},{trigger:v((()=>[d("span",null,u(e.labelShowText),1)])),default:v((()=>[d("span",null,u(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),[[r(U),l=>((e,l)=>{let t=e.offsetHeight||0;t&&(t>80?l.isShowBtn=!0:(l.isShowBtn=!1,l.isUnfold=!1))})(l,e)]])],2),e.labelList&&e.isShowBtn?(n(),a("div",I,[d("span",{class:"operate-btn",onClick:y((l=>(e=>{e.isUnfold=!e.isUnfold})(e)),["stop"])},[e.isUnfold?(n(),a(i,{key:0},[A,h(r(w),{component:r(C),size:"16"},null,8,["component"])],64)):(n(),a(i,{key:1},[G,h(r(w),{component:r(x),size:"16"},null,8,["component"])],64))],8,q)])):g("v-if",!0)])))),128))]))}});export{H as default};
1
+ import{defineComponent as e,ref as l,inject as t,watch as s,computed as o,openBlock as n,createElementBlock as a,Fragment as i,renderList as c,unref as r,createElementVNode as d,toDisplayString as u,normalizeClass as p,withDirectives as f,createBlock as m,normalizeStyle as b,withCtx as v,createVNode as h,withModifiers as y,createCommentVNode as g}from"vue";import{useMessage as k,NTag as S,NTooltip as w,NIcon as C}from"naive-ui";import{ChevronUpCircleOutline as x,ChevronDownCircleOutline as U}from"@vicons/ionicons5";import L from"../../../directive/resize.js";import j from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as B}from"../../../constants/index.js";import{isString as T}from"lodash-es";const _={class:"label-attr-filter-container"},z={class:"edit-f-label"},I={class:"label-f-content"},q={key:0,class:"label-f-unfold-btn"},A=["onClick"],G=d("span",null,"收起",-1),H=d("span",null,"展开",-1);var M=e({__name:"LabelInner",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:M}){const N=e,{handleGetConfigApi:O}=j(),$=k(),D="rgb(85, 133, 245)",E=l([]),F=l([]),J=t(B);s((()=>N.value),(e=>{const l=e&&T(e)?e.split("|#|"):[];E.value=l}),{immediate:!0});const K=o((()=>F.value&&F.value.length>0?F.value.map((e=>(e.labelList.map((e=>{e.isSelect=E.value.includes(e.labelShowText)})),e))):[])),P=e=>e.isSelect?{background:e.backgroundColor||D,borderColor:e.backgroundColor||D}:{};return(async()=>{try{const{widgetCfg:e={}}=N.componentCfg,{classifyStr:l=""}=e;let t=await O({classifyStr:l},"requestListByClassify",{},J);if(t){const{list:e=[]}=t;F.value=e}}catch(e){$.error(`获取标签数据请求失败:${e}`),console.log(e)}})(),(e,l)=>(n(),a("div",_,[(n(!0),a(i,null,c(r(K),(e=>(n(),a("div",{class:"edit-labels-content",key:e.classifyId},[d("span",z,u(e.classifyName)+":",1),d("div",{class:p(["edit-f-content",{"label-select-height":!e.isUnfold&&e.labelList&&e.isShowBtn}])},[f((n(),a("div",I,[(n(!0),a(i,null,c(e.labelList,(e=>(n(),m(r(S),{checkable:"",key:e.labelCode,checked:e.isSelect,"onUpdate:checked":l=>((e,l)=>{if(l.isSelect=e,e)E.value.push(l.labelShowText);else{const e=E.value.findIndex((e=>e===l.labelShowText));e>-1&&E.value.splice(e,1)}M("update:value",E.value.join("|#|"))})(l,e),style:b(P(e))},{default:v((()=>[h(r(w),{placement:"top-start",duration:0},{trigger:v((()=>[d("span",null,u(e.labelShowText),1)])),default:v((()=>[d("span",null,u(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),[[r(L),l=>((e,l)=>{let t=e.offsetHeight||0;t&&(t>80?l.isShowBtn=!0:(l.isShowBtn=!1,l.isUnfold=!1))})(l,e)]])],2),e.labelList&&e.isShowBtn?(n(),a("div",q,[d("span",{class:"operate-btn",onClick:y((l=>(e=>{e.isUnfold=!e.isUnfold})(e)),["stop"])},[e.isUnfold?(n(),a(i,{key:0},[G,h(r(C),{component:r(x),size:"16"},null,8,["component"])],64)):(n(),a(i,{key:1},[H,h(r(C),{component:r(U),size:"16"},null,8,["component"])],64))],8,A)])):g("v-if",!0)])))),128))]))}});export{M as default};
@@ -1,9 +1,9 @@
1
1
  import { PropType } from 'vue';
2
2
  import { SelectOption } from 'naive-ui';
3
- import { ISearchType } from '../../../../../../../es/components/table-filter/src/types';
3
+ import { AnyObject } from '../../../../../../../es/shared/types';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  componentCfg: {
6
- type: PropType<ISearchType>;
6
+ type: PropType<AnyObject>;
7
7
  };
8
8
  value: {
9
9
  type: StringConstructor;
@@ -14,9 +14,10 @@ declare const _default: import("vue").DefineComponent<{
14
14
  $attrs: {
15
15
  [x: string]: unknown;
16
16
  };
17
+ message: import("naive-ui").MessageApi;
17
18
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
18
19
  componentCfg: {
19
- type: PropType<ISearchType>;
20
+ type: PropType<AnyObject>;
20
21
  };
21
22
  value: {
22
23
  type: StringConstructor;
@@ -27,14 +28,14 @@ declare const _default: import("vue").DefineComponent<{
27
28
  }>>;
28
29
  emit: (event: "update:value", ...args: any[]) => void;
29
30
  tagList: import("vue").Ref<never[]>;
30
- filterApiConfig: import("../../../../..").AnyObject;
31
+ filterApiConfig: AnyObject;
31
32
  valueCp: import("vue").WritableComputedRef<string[]>;
32
33
  optionList: import("vue").ComputedRef<SelectOption[]>;
33
34
  initTagList: () => Promise<void>;
34
35
  NSelect: any;
35
36
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
37
  componentCfg: {
37
- type: PropType<ISearchType>;
38
+ type: PropType<AnyObject>;
38
39
  };
39
40
  value: {
40
41
  type: StringConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as l,inject as a,computed as o,openBlock as s,createBlock as u,unref as n,mergeProps as i,isRef as r}from"vue";import{NSelect as p}from"naive-ui";import c from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as f}from"../../../constants/index.js";var v=e({__name:"LabelOut",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:v}){const m=e,{handleGetConfigApi:h}=c(),d=t(),b=l([]),g=a(f),y=o({set(e){const t=e?e.join("|#|"):e;v("update:value",t)},get:()=>m.value?m.value.split("|#|"):[]}),x=o((()=>{if(b.value&&b.value.length>0){let e=[],t=[];return b.value.forEach((l=>{l.labelList.forEach((l=>{e.includes(l.labelShowText)||(e.push(l.labelShowText),t.push({label:l.labelShowText,value:l.labelShowText}))}))})),t}return[]}));return(async()=>{try{const{widgetCfg:e={}}=m.componentCfg,{classifyStr:t=""}=e;let l=await h({classifyStr:t},"requestListByClassify",{},g);if(l){const{list:e=[]}=l;b.value=e}}catch(e){console.log(e)}})(),(e,t)=>(s(),u(n(p),i({to:"body"},n(d),{value:n(y),"onUpdate:value":t[0]||(t[0]=e=>r(y)?y.value=e:null),options:n(x)}),null,16,["value","options"]))}});export{v as default};
1
+ import{defineComponent as e,useAttrs as t,ref as l,inject as a,computed as o,openBlock as s,createBlock as u,unref as n,mergeProps as i,isRef as r}from"vue";import{useMessage as p,NSelect as c}from"naive-ui";import f from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as v}from"../../../constants/index.js";var m=e({__name:"LabelOut",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:m}){const h=e,{handleGetConfigApi:d}=f(),b=t(),g=p(),y=l([]),x=a(v),S=o({set(e){const t=e?e.join("|#|"):e;m("update:value",t)},get:()=>h.value?h.value.split("|#|"):[]}),w=o((()=>{if(y.value&&y.value.length>0){let e=[],t=[];return y.value.forEach((l=>{l.labelList.forEach((l=>{e.includes(l.labelShowText)||(e.push(l.labelShowText),t.push({label:l.labelShowText,value:l.labelShowText}))}))})),t}return[]}));return(async()=>{try{const{widgetCfg:e={}}=h.componentCfg,{classifyStr:t=""}=e;let l=await d({classifyStr:t},"requestListByClassify",{},x);if(l){const{list:e=[]}=l;y.value=e}}catch(e){g.error(`获取标签数据请求失败:${e}`),console.log(e)}})(),(e,t)=>(s(),u(n(c),i({to:"body"},n(b),{value:n(S),"onUpdate:value":t[0]||(t[0]=e=>r(S)?S.value=e:null),options:n(w)}),null,16,["value","options"]))}});export{m as default};
@@ -1,45 +1,35 @@
1
- import { SelectOption } from 'naive-ui';
2
1
  declare const _default: import("vue").DefineComponent<{
3
2
  value: {
4
3
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
5
4
  };
5
+ componentCfg: {
6
+ type: ObjectConstructor;
7
+ };
6
8
  }, {
9
+ $attrs: {
10
+ [x: string]: unknown;
11
+ };
7
12
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
8
13
  value: {
9
14
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
10
15
  };
16
+ componentCfg: {
17
+ type: ObjectConstructor;
18
+ };
11
19
  }>> & {
12
20
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
13
- onChangeInitState?: ((...args: any[]) => any) | undefined;
14
21
  }>>;
15
- handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
16
- $attrs: {
17
- [x: string]: unknown;
18
- };
19
- emit: (event: "update:value" | "changeInitState", ...args: any[]) => void;
20
- selectOptions: import("vue").Ref<any[]>;
21
- isRemote: import("vue").Ref<boolean>;
22
- isLoading: import("vue").Ref<boolean>;
23
- filterApiConfig: import("../../../../..").AnyObject;
24
- valueCp: import("vue").WritableComputedRef<unknown>;
25
- searchOptions: (keyword: string) => Promise<any>;
26
- _handleSearch: (query: string) => Promise<void>;
27
- handleSearch: (query: string) => Promise<void>;
28
- handleInitData: () => Promise<void>;
29
- renderLabel: (option: SelectOption) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
30
- [key: string]: any;
31
- }>;
32
- renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
33
- [key: string]: any;
34
- }>;
35
- init: () => Promise<void>;
22
+ emit: (event: "update:value", ...args: any[]) => void;
23
+ valueCp: import("vue").WritableComputedRef<any>;
36
24
  NSelect: any;
37
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "changeInitState")[], "update:value" | "changeInitState", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
26
  value: {
39
27
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
40
28
  };
29
+ componentCfg: {
30
+ type: ObjectConstructor;
31
+ };
41
32
  }>> & {
42
33
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
43
- onChangeInitState?: ((...args: any[]) => any) | undefined;
44
34
  }, {}>;
45
35
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as a,ref as t,inject as n,computed as l,openBlock as o,createBlock as i,unref as u,mergeProps as r,isRef as s,h as c}from"vue";import{NSelect as p,NTag as v}from"naive-ui";import{useDebounceFn as d}from"@vueuse/core";import f from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as m}from"../../../constants/index.js";var y=e({__name:"Select",props:{value:{type:[Array,String,Number]}},emits:["update:value","changeInitState"],setup(e,{emit:y}){const g=e,{handleGetConfigApi:h}=f(),b=a(),w=t([]),I=t(!1),S=t(!1),A=n(m),O=l({set(e){const a=Array.isArray(e)?e:e?[e]:null;y("update:value",a)},get(){var e;if(Array.isArray(g.value)&&g.value.length>0){const{multiple:e}=b;return e||1!=g.value.length?g.value:g.value[0]}return null!=(e=g.value)?e:null}});async function k(e){try{if(b.dynamicOptionInfo){const{autograph:a,dataSourceId:t,dataSourceType:n,filterKeys:l,showKeys:o,valueKey:i}=b.dynamicOptionInfo;let u={wordbookId:t,autograph:a,wordbookType:n,fieldKeys:l,page:1};l.length>0&&(u[l[0]]=e),S.value=!0;let r=await h(u,"requestDynamicSelect",{},A);if(r){const{fieldList:e=[],rows:a=[]}=r,t=a.map((e=>({...e,label:e[o[0]],value:e[i]})));return w.value=t,t}}}catch(e){console.log(e)}finally{S.value=!1}}const K=d((async e=>{await async function(e){const{manualMapping:a}=b;if(!a){const a=e.trim();await k(a)}}(e)}),300);async function M(){const{manualMapping:e,dynamicOptionInfo:a,valueList:t}=b;if(e&&Array.isArray(t))return I.value=!1,void(w.value=t.map((({value:e,label:a})=>({value:e,label:a}))));Object.keys(a).length>0&&A&&(I.value=!0,await k(""))}function x(e){const{manualMapping:a}=b;if(a)return c("div",e.label);const{showKeys:t=[]}=b.dynamicOptionInfo;return b.dynamicOptionInfo&&t.length>0?c("div",{class:"select-widget-dynamic-option"},t.map((a=>c("span",{class:"select-widget-dynamic-item"},e[a])))):c("div",e.label)}function C({option:e,handleClose:a}){const{multiple:t}=b;return t?c(v,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>c("div",e.label)}):c("div",e.label)}return async function(){const{manualMapping:e,defValue:a,defValueUnit:t,_frontId:n,isInit:l}=b;await M();const o=Array.isArray(g.value)?g.value.length>0:g.value;if(!l&&!o){if(e)return y("update:value",a),void y("changeInitState",n,!0);if(t)switch(t){case"FIRST":{const e=w.value[0];y("update:value",[e.value]),y("changeInitState",n,!0);break}}}}(),(e,a)=>(o(),i(u(p),r(u(b),{value:u(O),"onUpdate:value":a[0]||(a[0]=e=>s(O)?O.value=e:null),to:"body",loading:S.value,options:w.value,remote:I.value,"render-label":x,"render-tag":C,onSearch:u(K),onClear:M}),null,16,["value","loading","options","remote","onSearch"]))}});export{y as default};
1
+ import{defineComponent as e,useAttrs as t,computed as u,openBlock as a,createBlock as l,unref as r,mergeProps as p,isRef as v}from"vue";import{NSelect as n}from"naive-ui";var o=e({__name:"Select",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:o}){const m=e,i=t(),s=u({set(e){o("update:value",e)},get:()=>m.value});return(e,t)=>(a(),l(r(n),p(r(i),{value:r(s),"onUpdate:value":t[0]||(t[0]=e=>v(s)?s.value=e:null)}),null,16,["value"]))}});export{o as default};
@@ -0,0 +1,45 @@
1
+ import { SelectOption } from 'naive-ui';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ value: {
4
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
5
+ };
6
+ }, {
7
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
8
+ value: {
9
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
10
+ };
11
+ }>> & {
12
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
13
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
14
+ }>>;
15
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
16
+ $attrs: {
17
+ [x: string]: unknown;
18
+ };
19
+ emit: (event: "update:value" | "changeInitState", ...args: any[]) => void;
20
+ selectOptions: import("vue").Ref<any[]>;
21
+ isRemote: import("vue").Ref<boolean>;
22
+ isLoading: import("vue").Ref<boolean>;
23
+ filterApiConfig: import("../../../../..").AnyObject;
24
+ valueCp: import("vue").WritableComputedRef<unknown>;
25
+ searchOptions: (keyword: string) => Promise<any>;
26
+ _handleSearch: (query: string) => Promise<void>;
27
+ handleSearch: (query: string) => Promise<void>;
28
+ handleInitData: () => Promise<void>;
29
+ renderLabel: (option: SelectOption) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
30
+ [key: string]: any;
31
+ }>;
32
+ renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
33
+ [key: string]: any;
34
+ }>;
35
+ init: () => Promise<void>;
36
+ NSelect: any;
37
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "changeInitState")[], "update:value" | "changeInitState", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
+ value: {
39
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
40
+ };
41
+ }>> & {
42
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
43
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
44
+ }, {}>;
45
+ export default _default;
@@ -0,0 +1,175 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ value: {
3
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
4
+ };
5
+ componentCfg: {
6
+ type: ObjectConstructor;
7
+ };
8
+ }, {
9
+ message: import("naive-ui").MessageApi;
10
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
11
+ value: {
12
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
13
+ };
14
+ componentCfg: {
15
+ type: ObjectConstructor;
16
+ };
17
+ }>> & {
18
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
19
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
20
+ }>>;
21
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
22
+ $attrs: {
23
+ [x: string]: unknown;
24
+ };
25
+ emit: (event: "update:value" | "changeInitState", ...args: any[]) => void;
26
+ isLoading: import("vue").Ref<boolean>;
27
+ filterApiConfig: import("../../../../..").AnyObject;
28
+ curPage: import("vue").Ref<number>;
29
+ fieldTitleList: import("vue").Ref<any>;
30
+ selectOptions: import("vue").Ref<any[]>;
31
+ keywordVal: import("vue").Ref<any>;
32
+ totalPage: import("vue").Ref<number>;
33
+ menuProps: {
34
+ class: string;
35
+ };
36
+ isMultiple: import("vue").ComputedRef<unknown>;
37
+ dynamicOptionInfos: import("vue").ComputedRef<any>;
38
+ isLastPage: import("vue").ComputedRef<boolean>;
39
+ valueCp: import("vue").ComputedRef<string | number | any[] | null>;
40
+ setOptionActive: (selectIds: string[]) => void;
41
+ handleUpdateSelect: (value: string[] | null) => void;
42
+ handleUpdatePage: (page: number) => Promise<void>;
43
+ getOptionsData: (keyword: string, curPage: number) => Promise<any>;
44
+ _handleSearch: (query: string) => Promise<void>;
45
+ handleSearch: (query: string) => Promise<void>;
46
+ handleInitData: () => Promise<void>;
47
+ handleClear: () => Promise<void>;
48
+ renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
49
+ [key: string]: any;
50
+ }>;
51
+ init: () => Promise<void>;
52
+ NSelect: any;
53
+ SelectDynamicOption: import("vue").DefineComponent<{
54
+ dynamicOptionInfo: {
55
+ type: import("vue").PropType<import("../../../../..").AnyObject>;
56
+ default: () => {};
57
+ };
58
+ fieldTitleList: {
59
+ type: import("vue").PropType<import("../../../../..").AnyObject[]>;
60
+ default: () => never[];
61
+ };
62
+ optionList: {
63
+ type: import("vue").PropType<import("../../../../..").AnyObject[]>;
64
+ default: () => never[];
65
+ };
66
+ isMultiple: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ curPage: {
71
+ type: NumberConstructor;
72
+ default: number;
73
+ };
74
+ isLastPage: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ }, {
79
+ selectMinWidth: number;
80
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
81
+ dynamicOptionInfo: {
82
+ type: import("vue").PropType<import("../../../../..").AnyObject>;
83
+ default: () => {};
84
+ };
85
+ fieldTitleList: {
86
+ type: import("vue").PropType<import("../../../../..").AnyObject[]>;
87
+ default: () => never[];
88
+ };
89
+ optionList: {
90
+ type: import("vue").PropType<import("../../../../..").AnyObject[]>;
91
+ default: () => never[];
92
+ };
93
+ isMultiple: {
94
+ type: BooleanConstructor;
95
+ default: boolean;
96
+ };
97
+ curPage: {
98
+ type: NumberConstructor;
99
+ default: number;
100
+ };
101
+ isLastPage: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
105
+ }>> & {
106
+ onUpdateSelect?: ((...args: any[]) => any) | undefined;
107
+ onUpdatePage?: ((...args: any[]) => any) | undefined;
108
+ }>>;
109
+ emit: (event: "updateSelect" | "updatePage", ...args: any[]) => void;
110
+ dragEndWidth: import("vue").Ref<number>;
111
+ showKeys: import("vue").ComputedRef<any>;
112
+ titleList: import("vue").ComputedRef<string[]>;
113
+ handleSelect: (option: any) => void;
114
+ searchByPage: (onePage: number) => void;
115
+ changeWidth: ({ distance }: any) => void;
116
+ saveWidth: () => void;
117
+ NEmpty: any;
118
+ NButtonGroup: any;
119
+ NButton: any;
120
+ NIcon: any;
121
+ NPopover: any;
122
+ vFlexibleResize: {
123
+ mounted(el: any, { value }: any): void;
124
+ beforeUnmount(el: any): void;
125
+ };
126
+ ArrowBack: 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<{}>>, {}>;
127
+ ArrowForward: 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<{}>>, {}>;
128
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
129
+ dynamicOptionInfo: {
130
+ type: import("vue").PropType<import("../../../../..").AnyObject>;
131
+ default: () => {};
132
+ };
133
+ fieldTitleList: {
134
+ type: import("vue").PropType<import("../../../../..").AnyObject[]>;
135
+ default: () => never[];
136
+ };
137
+ optionList: {
138
+ type: import("vue").PropType<import("../../../../..").AnyObject[]>;
139
+ default: () => never[];
140
+ };
141
+ isMultiple: {
142
+ type: BooleanConstructor;
143
+ default: boolean;
144
+ };
145
+ curPage: {
146
+ type: NumberConstructor;
147
+ default: number;
148
+ };
149
+ isLastPage: {
150
+ type: BooleanConstructor;
151
+ default: boolean;
152
+ };
153
+ }>> & {
154
+ onUpdateSelect?: ((...args: any[]) => any) | undefined;
155
+ onUpdatePage?: ((...args: any[]) => any) | undefined;
156
+ }, {
157
+ dynamicOptionInfo: import("../../../../..").AnyObject;
158
+ fieldTitleList: import("../../../../..").AnyObject[];
159
+ optionList: import("../../../../..").AnyObject[];
160
+ isMultiple: boolean;
161
+ curPage: number;
162
+ isLastPage: boolean;
163
+ }>;
164
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "changeInitState")[], "update:value" | "changeInitState", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
165
+ value: {
166
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
167
+ };
168
+ componentCfg: {
169
+ type: ObjectConstructor;
170
+ };
171
+ }>> & {
172
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
173
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
174
+ }, {}>;
175
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./SelectDynamic.vue2.js";import r from"../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","SelectDynamic.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as a,ref as t,inject as l,computed as n,openBlock as u,createBlock as i,unref as o,mergeProps as r,isRef as s,withCtx as c,createVNode as v,h as p}from"vue";import{useMessage as f,NSelect as d,NTag as y}from"naive-ui";import{useDebounceFn as m}from"@vueuse/core";import g from"../../../hooks/useMixins.js";import{WidgetValEnums as h}from"../../../types/enums.js";import{InjectionFilterApiConfig as w}from"../../../constants/index.js";import S from"./SelectDynamicOption/index.vue.js";var b=e({__name:"SelectDynamic",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value","changeInitState"],setup(e,{emit:b}){const A=e,I=f(),{handleGetConfigApi:O}=g(),C=a(),L=t(!1),j=l(w),k=t(1),x=t(),P=t([]),T=t(),_=t(0),K={class:"select-dynamic-popover"},U=n((()=>C.multiple)),D=n((()=>{const{widgetCfg:e}=A.componentCfg,{dynamicOptionInfo:a={}}=e;return a})),M=n((()=>_.value>0&&k.value>=_.value)),N=n((()=>{var e;if(Array.isArray(A.value)&&A.value.length>0){const e=A.value;if(J(e),!U.value&&1==e.length){const a=P.value.find((a=>a.value===e[0]));return JSON.stringify(a)}return P.value.filter((a=>e.includes(a.value)))}return J([]),null!=(e=A.value)?e:null}));function J(e){P.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function V(e){b("update:value",e)}async function q(e){k.value=e,await E(T.value,k.value)}async function E(e,a){try{if(Object.keys(D.value).length>0){const{autograph:t,dataSourceId:l,dataSourceType:n,filterKeys:u,showKeys:i,valueKey:o}=D.value;let r={wordbookId:l,autograph:t,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(r[u[0]]=e),L.value=!0;let s=await O(r,"requestDynamicSelect",{},j);if(s){const{fieldList:e=[],rows:a=[],total:t=0}=s.map,l=a.map((e=>({...e,label:e[i[0]],value:e[o]})));return x.value=null!=e?e:[],P.value=null!=l?l:[],_.value=t,l}}}catch(e){I.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{L.value=!1}}const F=m((async e=>{await async function(e){T.value=e.trim(),k.value=1,await E(T.value,k.value)}(e)}),300);async function G(){Object.keys(D.value).length>0&&j&&await E("",k.value)}async function R(){b("update:value",null),await G()}function $({option:e,handleClose:a}){if(U.value){const t=e.value;return p(y,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(A.value)&&A.value.length>0){const e=A.value,a=e.indexOf(t.value);if(a>-1){const t=e.splice(0,a);b("update:value",t.length>0?t:null)}}}},{default:()=>p("div",t.label)})}const t=e.value?JSON.parse(e.value):{label:""};return p("div",t.label)}return async function(){const{widgetCfg:e,_frontId:a}=A.componentCfg,{defValueUnit:t="",isInit:l}=e;await G();const n=Array.isArray(A.value)?A.value.length>0:A.value;if(!l&&!n&&t)switch(t){case h.FIRST_VAL:{const e=P.value[0];b("update:value",[e.value]),b("changeInitState",a,!0);break}}}(),(e,a)=>(u(),i(o(d),r(o(C),{value:o(N),"onUpdate:value":a[0]||(a[0]=e=>s(N)?N.value=e:null),remote:"",loading:L.value,"render-tag":$,"menu-props":K,onSearch:o(F),onClear:R}),{empty:c((()=>[v(S,r(o(C),{dynamicOptionInfo:o(D),fieldTitleList:x.value,optionList:P.value,isMultiple:o(U),curPage:k.value,isLastPage:o(M),onUpdateSelect:V,onUpdatePage:q}),null,16,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage"])])),_:1},16,["value","loading","onSearch"]))}});export{b as default};
@@ -0,0 +1,114 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../../../es/shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ dynamicOptionInfo: {
5
+ type: PropType<AnyObject>;
6
+ default: () => {};
7
+ };
8
+ fieldTitleList: {
9
+ type: PropType<AnyObject[]>;
10
+ default: () => never[];
11
+ };
12
+ optionList: {
13
+ type: PropType<AnyObject[]>;
14
+ default: () => never[];
15
+ };
16
+ isMultiple: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
20
+ curPage: {
21
+ type: NumberConstructor;
22
+ default: number;
23
+ };
24
+ isLastPage: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }, {
29
+ selectMinWidth: number;
30
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
31
+ dynamicOptionInfo: {
32
+ type: PropType<AnyObject>;
33
+ default: () => {};
34
+ };
35
+ fieldTitleList: {
36
+ type: PropType<AnyObject[]>;
37
+ default: () => never[];
38
+ };
39
+ optionList: {
40
+ type: PropType<AnyObject[]>;
41
+ default: () => never[];
42
+ };
43
+ isMultiple: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ curPage: {
48
+ type: NumberConstructor;
49
+ default: number;
50
+ };
51
+ isLastPage: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ }>> & {
56
+ onUpdateSelect?: ((...args: any[]) => any) | undefined;
57
+ onUpdatePage?: ((...args: any[]) => any) | undefined;
58
+ }>>;
59
+ emit: (event: "updateSelect" | "updatePage", ...args: any[]) => void;
60
+ dragEndWidth: import("vue").Ref<number>;
61
+ showKeys: import("vue").ComputedRef<any>;
62
+ titleList: import("vue").ComputedRef<string[]>;
63
+ handleSelect: (option: any) => void;
64
+ searchByPage: (onePage: number) => void;
65
+ changeWidth: ({ distance }: any) => void;
66
+ saveWidth: () => void;
67
+ NEmpty: any;
68
+ NButtonGroup: any;
69
+ NButton: any;
70
+ NIcon: any;
71
+ NPopover: any;
72
+ vFlexibleResize: {
73
+ mounted(el: any, { value }: any): void;
74
+ beforeUnmount(el: any): void;
75
+ };
76
+ ArrowBack: 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<{}>>, {}>;
77
+ ArrowForward: 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<{}>>, {}>;
78
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
79
+ dynamicOptionInfo: {
80
+ type: PropType<AnyObject>;
81
+ default: () => {};
82
+ };
83
+ fieldTitleList: {
84
+ type: PropType<AnyObject[]>;
85
+ default: () => never[];
86
+ };
87
+ optionList: {
88
+ type: PropType<AnyObject[]>;
89
+ default: () => never[];
90
+ };
91
+ isMultiple: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ curPage: {
96
+ type: NumberConstructor;
97
+ default: number;
98
+ };
99
+ isLastPage: {
100
+ type: BooleanConstructor;
101
+ default: boolean;
102
+ };
103
+ }>> & {
104
+ onUpdateSelect?: ((...args: any[]) => any) | undefined;
105
+ onUpdatePage?: ((...args: any[]) => any) | undefined;
106
+ }, {
107
+ dynamicOptionInfo: AnyObject;
108
+ fieldTitleList: AnyObject[];
109
+ optionList: AnyObject[];
110
+ isMultiple: boolean;
111
+ curPage: number;
112
+ isLastPage: boolean;
113
+ }>;
114
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./index.vue2.js";import r from"../../../../../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","index.vue"]]);export{i as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as t,computed as i,withDirectives as n,openBlock as a,createElementBlock as l,normalizeStyle as o,createBlock as c,unref as s,Fragment as d,renderList as u,toDisplayString as r,createCommentVNode as p,createElementVNode as v,normalizeClass as m,withCtx as f,createTextVNode as y,createVNode as g}from"vue";import{NEmpty as h,NPopover as k,NButtonGroup as L,NButton as b,NIcon as P}from"naive-ui";import _ from"../../../../../../classification/src/directive/flexibleResize.js";import{ArrowBack as x,ArrowForward as M}from"@vicons/ionicons5";const C={key:0,class:"dynamic-header"},z={class:"dynamic-content"},E=["onClick"],O={class:"content"},S={class:"dynamic-pagination"};var j=e({__name:"index",props:{dynamicOptionInfo:{type:Object,default:()=>({})},fieldTitleList:{type:Array,default:()=>[]},optionList:{type:Array,default:()=>[]},isMultiple:{type:Boolean,default:!1},curPage:{type:Number,default:1},isLastPage:{type:Boolean,default:!1}},emits:["updateSelect","updatePage"],setup(e,{emit:j}){const A=e,B=t(200),I=i((()=>{var e,t;return null!=(t=null==(e=A.dynamicOptionInfo)?void 0:e.showKeys)?t:[]})),N=i((()=>I.value&&I.value.length>0?I.value.map((e=>{let t="";return A.fieldTitleList.forEach((i=>{i.columnName===e&&(t=i.title)})),t})):[]));function R(e){const t=A.curPage+e;j("updatePage",t)}function T({distance:e}){const t=B.value+e;B.value=Math.min(Math.max(t,200),1e3)}function w(){}return(t,i)=>n((a(),l("div",{class:"select-dynamic-options",style:o({minWidth:B.value+"px",position:"relative"})},[0===e.optionList.length?(a(),c(s(h),{key:0,description:"无数据"})):(a(),l(d,{key:1},[s(N)&&s(N).length>1?(a(),l("div",C,[(a(!0),l(d,null,u(s(N),(e=>(a(),l("span",{key:e,class:"name"},r(e),1)))),128))])):p("v-if",!0),v("ul",z,[(a(!0),l(d,null,u(e.optionList,(e=>(a(),l("li",{class:m(e.actived?"actived":""),key:e.value,onClick:t=>function(e){var t,i;if(!A.isMultiple)return null==(t=A.optionList)||t.forEach((e=>{e.actived=!1})),e.actived=!0,void j("updateSelect",[e.value]);e.actived?e.actived=!1:e.actived=!0;const n=null==(i=A.optionList)?void 0:i.filter((e=>e.actived)).map((e=>e.value));j("updateSelect",n)}(e)},[(a(!0),l(d,null,u(s(I),(t=>(a(),c(s(k),{key:t,trigger:"hover",duration:0},{trigger:f((()=>[v("span",O,r(e[t]),1)])),default:f((()=>[y(" "+r(e[t]),1)])),_:2},1024)))),128))],10,E)))),128))]),v("div",S,[g(s(L),null,{default:f((()=>[g(s(b),{onClick:i[0]||(i[0]=e=>R(-1)),disabled:e.curPage<=1},{icon:f((()=>[g(s(P),{component:s(x),size:"16"},null,8,["component"])])),default:f((()=>[y(" 上一页 ")])),_:1},8,["disabled"]),g(s(b),{"icon-placement":"right",onClick:i[1]||(i[1]=e=>R(1)),disabled:e.isLastPage},{icon:f((()=>[g(s(P),{component:s(M),size:"16"},null,8,["component"])])),default:f((()=>[y(" 下一页 ")])),_:1},8,["disabled"])])),_:1})])],64))],4)),[[s(_),{mode:"VR",onMove:T,onEnd:w}]])}});export{j as default};