cnhis-design-vue 3.1.53-beta.0 → 3.1.53-beta.2

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 (132) hide show
  1. package/README.md +87 -87
  2. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  3. package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
  4. package/es/components/big-table/src/hooks/useEdit.d.ts +4 -4
  5. package/es/components/big-table/src/hooks/useSeparateRow.d.ts +4 -4
  6. package/es/components/button-print/src/ButtonPrint.vue.d.ts +3 -1
  7. package/es/components/button-print/src/utils/dialog.d.ts +2 -2
  8. package/es/components/button-print/src/utils/print.d.ts +14 -13
  9. package/es/components/button-print/src/utils/print.js +1 -1
  10. package/es/components/callback/src/components/render/popupMaps.d.ts +44 -5
  11. package/es/components/card-reader-sdk/src/types/index.d.ts +3 -3
  12. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  13. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  15. package/es/components/form-config/index.d.ts +24 -24
  16. package/es/components/form-config/src/FormConfig.vue.d.ts +25 -25
  17. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  18. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +5 -5
  19. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +11 -11
  20. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  21. package/es/components/form-render/index.d.ts +5 -5
  22. package/es/components/form-render/index.js +1 -1
  23. package/es/components/form-render/src/FormRender.vue.d.ts +6 -6
  24. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  25. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +6 -6
  26. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +5 -5
  27. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +2 -4
  28. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
  29. package/es/components/form-render/src/components/renderer/searchCascade.d.ts +3 -3
  30. package/es/components/form-render/src/components/renderer/select.d.ts +3 -3
  31. package/es/components/form-render/src/components/renderer/select.js +1 -1
  32. package/es/components/form-render/src/constants/index.d.ts +3 -2
  33. package/es/components/form-render/src/hooks/index.d.ts +0 -2
  34. package/es/components/form-render/src/hooks/index.js +1 -1
  35. package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -3
  36. package/es/components/form-render/src/hooks/useCommonInjection.d.ts +2 -2
  37. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
  38. package/es/components/form-render/src/hooks/useFormContext.d.ts +3 -3
  39. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  40. package/es/components/form-render/src/hooks/useFormItemDeps.d.ts +3 -3
  41. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +5 -4
  42. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  43. package/es/components/form-render/src/types/fieldItem.d.ts +3 -2
  44. package/es/components/form-render/src/types/index.d.ts +2 -13
  45. package/es/components/form-render/src/utils/index.d.ts +1 -2
  46. package/es/components/form-render/src/utils/index.js +1 -1
  47. package/es/components/form-render/src/utils/schema.d.ts +2 -2
  48. package/es/components/guide/src/renderer.js +1 -1
  49. package/es/components/iho-table/index.d.ts +39 -0
  50. package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -0
  51. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  52. package/es/components/iho-table/src/constants/index.d.ts +4 -1
  53. package/es/components/iho-table/src/constants/index.js +1 -1
  54. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +2 -2
  55. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +2 -2
  56. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  57. package/es/components/iho-table/src/plugins/index.js +1 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -2
  59. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  60. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.d.ts +1 -0
  61. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -0
  62. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +552 -0
  63. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.js +1 -0
  64. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -0
  65. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  66. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
  67. package/es/components/iho-table/src/types/index.d.ts +6 -2
  68. package/es/components/iho-table/src/types/pluginType.d.ts +3 -3
  69. package/es/components/index.d.ts +1 -0
  70. package/es/components/index.js +1 -1
  71. package/es/components/info-header/index.d.ts +27 -27
  72. package/es/components/info-header/src/InfoHeader.vue.d.ts +28 -28
  73. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +5 -5
  74. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +6 -6
  75. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +12 -12
  76. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +5 -5
  77. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  78. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  79. package/es/components/search-cascader/index.d.ts +23 -3
  80. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +24 -4
  81. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  82. package/es/components/search-cascader/src/components/ClearIcon.vue.js +1 -0
  83. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  84. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  85. package/es/components/shortcut-setter/index.d.ts +8 -8
  86. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +9 -9
  87. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  88. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
  89. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  90. package/es/env.d.ts +25 -25
  91. package/es/shared/assets/img/failure.png.js +1 -1
  92. package/es/shared/assets/img/no-permission.png.js +1 -1
  93. package/es/shared/assets/img/nodata.png.js +1 -1
  94. package/es/shared/assets/img/notfound.png.js +1 -1
  95. package/es/shared/assets/img/qr.png.js +1 -1
  96. package/es/shared/assets/img/success.png.js +1 -1
  97. package/es/shared/assets/img/video.png.js +1 -1
  98. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  99. package/es/shared/assets/img/xb_big.png.js +1 -1
  100. package/es/shared/assets/img/xb_small.png.js +1 -1
  101. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +4 -4
  102. package/es/shared/components/SlotRender/SlotRender.d.ts +5 -5
  103. package/es/shared/hooks/index.d.ts +2 -0
  104. package/es/shared/hooks/index.js +1 -1
  105. package/es/shared/hooks/{useAsyncQueue.d.ts → useAsyncQueue/index.d.ts} +7 -15
  106. package/es/shared/hooks/useAsyncQueue/index.js +1 -0
  107. package/es/shared/hooks/useAsyncQueue/types.d.ts +20 -0
  108. package/es/shared/hooks/useAsyncQueue/types.js +1 -0
  109. package/es/shared/hooks/useDateTime.d.ts +2 -2
  110. package/es/shared/hooks/useFormRequest/index.d.ts +24 -0
  111. package/es/shared/hooks/useFormRequest/index.js +1 -0
  112. package/es/shared/hooks/useFormRequest/types.d.ts +39 -0
  113. package/es/shared/hooks/useFormRequest/types.js +1 -0
  114. package/es/shared/hooks/useLevelSearchCascader.d.ts +31 -0
  115. package/es/shared/hooks/useLevelSearchCascader.js +1 -0
  116. package/es/shared/package.json.js +1 -1
  117. package/es/shared/types/index.d.ts +1 -1
  118. package/package.json +2 -2
  119. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  120. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  121. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  122. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  123. package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.d.ts +0 -23
  124. package/es/components/form-render/src/components/renderer/levelSearchCascader/utils.js +0 -1
  125. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +0 -16
  126. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +0 -1
  127. package/es/components/form-render/src/hooks/useFormRequest.d.ts +0 -26
  128. package/es/components/form-render/src/hooks/useFormRequest.js +0 -1
  129. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  130. package/es/shared/hooks/useAsyncQueue.js +0 -1
  131. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  132. package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md CHANGED
@@ -1,87 +1,87 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式1 (按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式2 (全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3.FAQ
65
-
66
- ### 3.1 项目打包后样式丢失
67
-
68
- 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
-
70
- ```typescript
71
- // vite.config.ts
72
- import { defineConfig } from 'vite';
73
-
74
- export default defineConfig({
75
- build: {
76
- rollupOptions: {
77
- // ..otherOptions
78
- output: {
79
- dir: './dist',
80
- manualChunks: {
81
- 'cnhis-vendor': ['cnhis-design-vue']
82
- }
83
- }
84
- }
85
- }
86
- });
87
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式1 (按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式2 (全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3.FAQ
65
+
66
+ ### 3.1 项目打包后样式丢失
67
+
68
+ 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
+
70
+ ```typescript
71
+ // vite.config.ts
72
+ import { defineConfig } from 'vite';
73
+
74
+ export default defineConfig({
75
+ build: {
76
+ rollupOptions: {
77
+ // ..otherOptions
78
+ output: {
79
+ dir: './dist',
80
+ manualChunks: {
81
+ 'cnhis-vendor': ['cnhis-design-vue']
82
+ }
83
+ }
84
+ }
85
+ }
86
+ });
87
+ ```
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,ref as a,onDeactivated as t,createVNode as l,unref as u,createTextVNode as n}from"vue";import{useTheme as i}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isString as r,isObject as s,isFunction as m}from"lodash-es";import{FileTrayFull as d,FileTray as v}from"@vicons/ionicons5";import{NPopover as c,NDivider as p,NEllipsis as f,NIcon as V,NInput as h}from"naive-ui";var g=e({props:{modelValue:{type:[String,Object],default:""}},emits:["update:modelValue"],setup(e,{emit:g}){const w=i(),x=o({get:()=>r(e.modelValue)?e.modelValue:s(e.modelValue)&&e.modelValue.content||"",set(o){let a=o;s(e.modelValue)&&(a={...e.modelValue,content:o}),g("update:modelValue",a)}}),T=a(!1),k=o({get:()=>T.value,async set(e){T.value=e,!e&&b.value&&(await new Promise((e=>setTimeout(e,200))),b.value=!1)}}),b=a(!1);let y,_;function P(e){e.stopPropagation(),clearTimeout(y),k.value&&b.value?k.value=!1:u(x)||(y=setTimeout((()=>{b.value=k.value=!0}),200))}function M(e){e.stopPropagation(),clearTimeout(y),u(x)&&(k.value=!0,b.value=!0)}function R(e){e.stopPropagation(),clearTimeout(_),u(x)&&(k.value=!0)}function j(e){e.stopPropagation(),clearTimeout(_),u(x)&&!b.value&&(_=setTimeout((()=>{k.value=!1}),300))}return t((()=>{k.value=!1})),function(){return l("section",{class:["annotation-edit",{"is-active":!!u(x)}],style:{"--icon-right":"-5",...w.value},"annotation-hover-show":!u(x)&&!b.value},[l(c,{"keep-alive-on-hover":!0,style:{maxWidth:"360px",wordBreak:"break-all"},show:k.value,"onUpdate:show":e=>k.value=e,trigger:"manual",duration:100,onClickoutside:P},{default:function(){return l("section",{onMouseleave:j,onMouseenter:R},[l("div",null,[b.value?l(h,{resizable:!1,autosize:{minRows:3,maxRows:5},"show-count":!0,class:"annotation-edit__textarea",type:"textarea",value:x.value,"onUpdate:value":e=>x.value=e},null):l("span",null,[u(x)])]),s(e.modelValue)?[l(p,{style:{margin:"4px 0",minWidth:"360px"}},null),l("section",{class:"annotation-edit__footer"},[m(e.modelValue.footerRender)?e.modelValue.footerRender(e.modelValue):[l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.authorLabel)?o:"质控人",n(": "),e.modelValue.author]}}),l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.dateLabel)?o:"质控时间",n(": "),e.modelValue.date]}})]])]:null])},trigger:function(){return l("div",{class:"annotation-edit__icon",onMouseleave:j,onMouseenter:R,onDblclick:M,onClick:P},[l(V,{component:u(x)?d:v},null)])}})])}}});export{g as default};
1
+ import{defineComponent as e,computed as o,ref as a,onDeactivated as t,createVNode as l,unref as u,createTextVNode as n}from"vue";import{useTheme as i}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isString as r,isObject as s,isFunction as m}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import{FileTrayFull as d,FileTray as v}from"@vicons/ionicons5";import{NPopover as c,NDivider as p,NEllipsis as f,NIcon as h,NInput as V}from"naive-ui";var g=e({props:{modelValue:{type:[String,Object],default:""}},emits:["update:modelValue"],setup(e,{emit:g}){const w=i(),x=o({get:()=>r(e.modelValue)?e.modelValue:s(e.modelValue)&&e.modelValue.content||"",set(o){let a=o;s(e.modelValue)&&(a={...e.modelValue,content:o}),g("update:modelValue",a)}}),T=a(!1),k=o({get:()=>T.value,async set(e){T.value=e,!e&&b.value&&(await new Promise((e=>setTimeout(e,200))),b.value=!1)}}),b=a(!1);let y,_;function P(e){e.stopPropagation(),clearTimeout(y),k.value&&b.value?k.value=!1:u(x)||(y=setTimeout((()=>{b.value=k.value=!0}),200))}function M(e){e.stopPropagation(),clearTimeout(y),u(x)&&(k.value=!0,b.value=!0)}function R(e){e.stopPropagation(),clearTimeout(_),u(x)&&(k.value=!0)}function j(e){e.stopPropagation(),clearTimeout(_),u(x)&&!b.value&&(_=setTimeout((()=>{k.value=!1}),300))}return t((()=>{k.value=!1})),function(){return l("section",{class:["annotation-edit",{"is-active":!!u(x)}],style:{"--icon-right":"-5",...w.value},"annotation-hover-show":!u(x)&&!b.value},[l(c,{"keep-alive-on-hover":!0,style:{maxWidth:"360px",wordBreak:"break-all"},show:k.value,"onUpdate:show":e=>k.value=e,trigger:"manual",duration:100,onClickoutside:P},{default:function(){return l("section",{onMouseleave:j,onMouseenter:R},[l("div",null,[b.value?l(V,{resizable:!1,autosize:{minRows:3,maxRows:5},"show-count":!0,class:"annotation-edit__textarea",type:"textarea",value:x.value,"onUpdate:value":e=>x.value=e},null):l("span",null,[u(x)])]),s(e.modelValue)?[l(p,{style:{margin:"4px 0",minWidth:"360px"}},null),l("section",{class:"annotation-edit__footer"},[m(e.modelValue.footerRender)?e.modelValue.footerRender(e.modelValue):[l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.authorLabel)?o:"质控人",n(": "),e.modelValue.author]}}),l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.dateLabel)?o:"质控时间",n(": "),e.modelValue.date]}})]])]:null])},trigger:function(){return l("div",{class:"annotation-edit__icon",onMouseleave:j,onMouseenter:R,onDblclick:M,onClick:P},[l(h,{component:u(x)?d:v},null)])}})])}}});export{g as default};
@@ -60,19 +60,19 @@ declare const _default: import("vue").DefineComponent<{
60
60
  style: CSSProperties;
61
61
  SlotRender: import("vue").DefineComponent<{
62
62
  renderer: {
63
- type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../es/shared/types").Func<any[], any>>;
63
+ type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../es/shared/types").AnyFn<any[], any>>;
64
64
  required: true;
65
65
  };
66
66
  rootSlots: {
67
- type: PropType<Record<string, import("../../../../../../es/shared/types").Func<any[], any>>>;
67
+ type: PropType<Record<string, import("../../../../../../es/shared/types").AnyFn<any[], any>>>;
68
68
  };
69
69
  }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
70
70
  renderer: {
71
- type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../es/shared/types").Func<any[], any>>;
71
+ type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../es/shared/types").AnyFn<any[], any>>;
72
72
  required: true;
73
73
  };
74
74
  rootSlots: {
75
- type: PropType<Record<string, import("../../../../../../es/shared/types").Func<any[], any>>>;
75
+ type: PropType<Record<string, import("../../../../../../es/shared/types").AnyFn<any[], any>>>;
76
76
  };
77
77
  }>>, {}>;
78
78
  NPopover: any;
@@ -252,19 +252,19 @@ export declare const comps: {
252
252
  style: import("vue").CSSProperties;
253
253
  SlotRender: import("vue").DefineComponent<{
254
254
  renderer: {
255
- type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../..").Func<any[], any>>;
255
+ type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../..").AnyFn<any[], any>>;
256
256
  required: true;
257
257
  };
258
258
  rootSlots: {
259
- type: import("vue").PropType<Record<string, import("../../..").Func<any[], any>>>;
259
+ type: import("vue").PropType<Record<string, import("../../..").AnyFn<any[], any>>>;
260
260
  };
261
261
  }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
262
262
  renderer: {
263
- type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../..").Func<any[], any>>;
263
+ type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../..").AnyFn<any[], any>>;
264
264
  required: true;
265
265
  };
266
266
  rootSlots: {
267
- type: import("vue").PropType<Record<string, import("../../..").Func<any[], any>>>;
267
+ type: import("vue").PropType<Record<string, import("../../..").AnyFn<any[], any>>>;
268
268
  };
269
269
  }>>, {}>;
270
270
  NPopover: any;
@@ -1,11 +1,11 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
1
+ import { AnyObject, AnyFn } from '../../../../../es/shared/types';
2
2
  import { Ref } from 'vue';
3
3
  import { VxeTableEvents, VxeTableInstance } from 'vxe-table';
4
4
  import { VxeTablePropTypes } from 'vxe-table/types/table';
5
5
  export declare class SeparateHandle {
6
- callbacks: Set<Func<any[], any>>;
7
- add(cb: Func): void;
8
- remove(cb: Func): void;
6
+ callbacks: Set<AnyFn<any[], any>>;
7
+ add(cb: AnyFn): void;
8
+ remove(cb: AnyFn): void;
9
9
  clear(): void;
10
10
  trigger(): void;
11
11
  }
@@ -244,7 +244,9 @@ declare const _default: import("vue").DefineComponent<{
244
244
  }, {
245
245
  $message: import("naive-ui").MessageApi;
246
246
  DEFAULT_FORM: {
247
- account: string;
247
+ account: string; /**
248
+ * 打印预览按钮文本
249
+ */
248
250
  password: string;
249
251
  };
250
252
  props: {
@@ -1,9 +1,9 @@
1
- import { Func } from '../../../../../es/shared/types';
1
+ import { AnyFn } from '../../../../../es/shared/types';
2
2
  import { ComponentInternalInstance } from 'vue';
3
3
  export declare class IdentityVerificationDialog {
4
4
  rendered: boolean;
5
5
  static createMsg(message: string): string;
6
- show(instance: ComponentInternalInstance, title: string, api: Func, formatId?: string, templateId?: string): Promise<string>;
6
+ show(instance: ComponentInternalInstance, title: string, api: AnyFn, formatId?: string, templateId?: string): Promise<string>;
7
7
  }
8
8
  export declare class PreviewDialog {
9
9
  rendered: boolean;
@@ -1,4 +1,4 @@
1
- import { AnyObject, Func } from '../../../../../es/shared/types';
1
+ import { AnyObject, AnyFn } from '../../../../../es/shared/types';
2
2
  import { IdentityVerificationDialog, PreviewDialog } from '../../../../../es/components/button-print/src/utils/dialog';
3
3
  export declare class Print {
4
4
  private readonly webview;
@@ -26,15 +26,15 @@ export declare class Print {
26
26
  _queryServicesPrint(params: AnyObject): Promise<any>;
27
27
  _callPrintWithFile(queryParams: AnyObject): Promise<any>;
28
28
  _handleMonitorNotify(message: string | unknown): void;
29
- _handleResult(data: AnyObject, errorCallbackFn?: Func): false | AnyObject;
30
- _handleResultTest(result: unknown, errorCallbackFn?: Func): boolean;
31
- _handleEventQueryPrintData(templateId: string, formatId: string, params: AnyObject, messageTimeout: number, errorCallbackFn?: Func): Promise<false | {
29
+ _handleResult(data: AnyObject, errorCallbackFn?: AnyFn): false | AnyObject;
30
+ _handleResultTest(result: unknown, errorCallbackFn?: AnyFn): boolean;
31
+ _handleEventQueryPrintData(templateId: string, formatId: string, params: AnyObject, messageTimeout: number, errorCallbackFn?: AnyFn): Promise<false | {
32
32
  file: any;
33
33
  printerName: any;
34
34
  pageCount: any;
35
35
  formatId: string;
36
36
  }>;
37
- _handleQueryPrintDataResult(printData: AnyObject, formatId: string, errorCallbackFn?: Func): false | {
37
+ _handleQueryPrintDataResult(printData: AnyObject, formatId: string, errorCallbackFn?: AnyFn): false | {
38
38
  file: any;
39
39
  printerName: any;
40
40
  pageCount: any;
@@ -45,21 +45,22 @@ export declare class Print {
45
45
  _queryProxyOrigin(): Promise<void>;
46
46
  _queryPrintFile(formatId: string, params?: string): Promise<any>;
47
47
  _browserPrint(result: AnyObject, mode: string): Promise<string | void>;
48
- preview({ templateId, formatId, params, signature, btnprint, messageTimeout }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<any>;
49
- printDirect({ templateId, formatId, params, print, signature, printdlgshow, nobillnode, isDownloadFile, messageTimeout }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
48
+ preview({ templateId, formatId, params, signature, btnprint, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<any>;
49
+ printSync(data: AnyObject[], successCallbackFn: AnyFn, errorCallbackFn: AnyFn): Promise<void>;
50
+ printDirect({ templateId, formatId, params, print, signature, printdlgshow, nobillnode, isDownloadFile, messageTimeout }: AnyObject, successCallbackFn: AnyFn, errorCallbackFn: AnyFn, mode?: string): Promise<any>;
50
51
  private _downloadPDF;
51
52
  /**
52
53
  * 下载pdf
53
54
  */
54
- downloadPDF(params: AnyObject, onResolve: Func, onReject: Func): void;
55
- print({ templateId, formatId, params, messageTimeout }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<false | undefined>;
56
- queryPrintData({ templateId, formatId, params, messageTimeout }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<false | {
55
+ downloadPDF(params: AnyObject, onResolve: AnyFn, onReject: AnyFn): void;
56
+ print({ templateId, formatId, params, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | undefined>;
57
+ queryPrintData({ templateId, formatId, params, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | {
57
58
  file: any;
58
59
  printerName: any;
59
60
  pageCount: any;
60
61
  formatId: string;
61
62
  }>;
62
- printFileData({ formatId, file, printerName }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<false | AnyObject>;
63
- editPrintFormat({ templateId, formatId, params, token, messageTimeout }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<false | undefined>;
64
- addPrintFormat({ templateId, params, token }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<false | undefined>;
63
+ printFileData({ formatId, file, printerName }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | AnyObject>;
64
+ editPrintFormat({ templateId, formatId, params, token, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | undefined>;
65
+ addPrintFormat({ templateId, params, token }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | undefined>;
65
66
  }
@@ -1 +1 @@
1
- import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as n,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const h=t.create({timeout:1e3,withCredentials:!1}),m=`${window.location.protocol}//${window.location.host}`,u=`${m}/fdp-api/print/assembly/printIReport`,c=`${m}/bi-api/reprot/print/open/client/getRemote`,p=`${m}/printService/file`;let w=null;class f{constructor(){var t,e,n;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],w)return w;w=this;const r=window;this.CMonitor=r.$CMonitor;try{this.webview=r.top?null==(t=r.top.chrome)?void 0:t.webview:null==(e=r.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(n=r.chrome)?void 0:n.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:n}=e;try{s(i.res||"")}catch(t){n(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{h({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,n){const r={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(r);return this._handleQueryPrintDataResult(a,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:s,print:n,signature:r,printdlgshow:a="0",nobillnode:o="1",btnprint:l="1",messageTimeout:h=0}){const m={templateId:t,formatId:e,params:i,cmdid:s,nobillnode:o,printdlgshow:a,btnprint:l,messageTimeout:h,...r?{signature:r}:{}};if(n){try{n=JSON.parse(n)}catch(t){}m.print=n}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");m.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(m)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:n=0}){const r={};let a={};try{a=Object.assign({},r,JSON.parse(i))}catch(t){a=r}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:n};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:c})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=m+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await n(`${p}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",signature:s,btnprint:n,messageTimeout:l=0},d,h){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==h?void 0:h("获取文件失败!");const s=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,s),void(null==d||d({file:t}))}await this._queryProxyOrigin();const m=await this._testConnection();if(!this._handleResultTest(m,h))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",signature:s,btnprint:n,messageTimeout:l}),a=this._handleResult(r,h);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==d||d(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==h||h(i),this._handleMonitorNotify(i)}}async printDirect({templateId:t,formatId:e,params:i="",print:s,signature:n,printdlgshow:o,nobillnode:l,isDownloadFile:d=!0,messageTimeout:h=0},m,u,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==m||m({file:t}))):null==u?void 0:u("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,u))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:s,signature:n,printdlgshow:o,nobillnode:l,messageTimeout:h}),a=this._handleResult(r,u);if(!a)return!1;d&&["downloadPDF"].includes(c)&&await this._browserPrint(a,c),null==m||m(a)}catch(t){const e="printDirect"===c?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==u||u(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),s=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}this.printDirect(t,(async n=>{if(n||s(null),a(t.formatId))return i(n);const r=this,o=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(n.filedir);i(o,n)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,r);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,r);if(!l)return!1;n&&n(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,r);return!!o&&(n&&n(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,n);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n=0},r,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n}),d=this._handleResult(l,a);if(!d)return!1;r&&r(d)}async addPrintFormat({templateId:t,params:e,token:i},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,n);if(!o)return!1;s&&s(o)}}export{f as Print};
1
+ import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as n,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const h=t.create({timeout:1e3,withCredentials:!1}),c=`${window.location.protocol}//${window.location.host}`,u=`${c}/fdp-api/print/assembly/printIReport`,m=`${c}/bi-api/reprot/print/open/client/getRemote`,p=`${c}/printService/file`;let w=null;class f{constructor(){var t,e,n;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],w)return w;w=this;const r=window;this.CMonitor=r.$CMonitor;try{this.webview=r.top?null==(t=r.top.chrome)?void 0:t.webview:null==(e=r.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(n=r.chrome)?void 0:n.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:n}=e;try{s(i.res||"")}catch(t){n(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{h({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,n){const r={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(r);return this._handleQueryPrintDataResult(a,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:s,print:n,signature:r,printdlgshow:a="0",nobillnode:o="1",btnprint:l="1",messageTimeout:h=0}){const c={templateId:t,formatId:e,params:i,cmdid:s,nobillnode:o,printdlgshow:a,btnprint:l,messageTimeout:h,...r?{signature:r}:{}};if(n){try{n=JSON.parse(n)}catch(t){}c.print=n}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");c.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(c)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:n=0}){const r={};let a={};try{a=Object.assign({},r,JSON.parse(i))}catch(t){a=r}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:n};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:m})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=c+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await n(`${p}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",signature:s,btnprint:n,messageTimeout:l=0},d,h){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==h?void 0:h("获取文件失败!");const s=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,s),void(null==d||d({file:t}))}await this._queryProxyOrigin();const c=await this._testConnection();if(!this._handleResultTest(c,h))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",signature:s,btnprint:n,messageTimeout:l}),a=this._handleResult(r,h);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==d||d(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==h||h(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){const s=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=l(),n=await this.messageCollect(t,{exec:"printA",data:s});if(n&&Array.isArray(n)){n.some((t=>"success"===t.res.result))?null==e||e(n):(null==i||i(n),this._handleMonitorNotify(n))}else{const t="打印命令返回无效数据";this._handleMonitorNotify(n||""),null==i||i({type:"printError",message:t,result:!1,errinfo:t})}}catch(t){const e={error:t,message:"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({templateId:t,formatId:e,params:i="",print:s,signature:n,printdlgshow:o,nobillnode:l,isDownloadFile:d=!0,messageTimeout:h=0},c,u,m="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,m),void(null==c||c({file:t}))):null==u?void 0:u("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,u))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:s,signature:n,printdlgshow:o,nobillnode:l,messageTimeout:h}),a=this._handleResult(r,u);if(!a)return!1;d&&["downloadPDF"].includes(m)&&await this._browserPrint(a,m),null==c||c(a)}catch(t){const e="printDirect"===m?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==u||u(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),s=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}this.printDirect(t,(async n=>{if(n||s(null),a(t.formatId))return i(n);const r=this,o=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(n.filedir);i(o,n)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,r);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,r);if(!l)return!1;n&&n(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,r);return!!o&&(n&&n(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,n);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n=0},r,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n}),d=this._handleResult(l,a);if(!d)return!1;r&&r(d)}async addPrintFormat({templateId:t,params:e,token:i},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,n);if(!o)return!1;s&&s(o)}}export{f as Print};
@@ -121,7 +121,7 @@ export declare const CallbackMaps: Map<string, {
121
121
  }>>;
122
122
  };
123
123
  requestInstance: {
124
- type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
124
+ type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
125
125
  };
126
126
  enterToNextWidget: {
127
127
  type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
@@ -266,7 +266,7 @@ export declare const CallbackMaps: Map<string, {
266
266
  }>>;
267
267
  };
268
268
  requestInstance: {
269
- type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
269
+ type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
270
270
  };
271
271
  enterToNextWidget: {
272
272
  type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
@@ -320,7 +320,7 @@ export declare const CallbackMaps: Map<string, {
320
320
  changeContextCollector: import("../../../../../../es/components/form-render").ContextCollector;
321
321
  formUUID: string;
322
322
  anchorBarRef: import("vue").Ref<{
323
- syncBarPosition: import("../../../..").Func<any[], any>;
323
+ syncBarPosition: import("../../../..").AnyFn<any[], any>;
324
324
  } | undefined>;
325
325
  currentAnchor: import("vue").WritableComputedRef<string>;
326
326
  updateAnchorList: (field: import("@formily/core").GeneralField) => void;
@@ -433,7 +433,7 @@ export declare const CallbackMaps: Map<string, {
433
433
  afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
434
434
  }>;
435
435
  businessFormatter: import("../../../../../../es/components/form-render").FormBusinessFormatter;
436
- requestInstance: import("../../../../../../es/components/form-render").RequestInstance;
436
+ requestInstance: import("../../../..").FormRequestDefine.RequestInstance;
437
437
  enterToNextWidget: boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void);
438
438
  lowCodeReactions: import("../../../..").FormLowCodeReactions.Config[];
439
439
  linebarAutoHidden: boolean;
@@ -841,7 +841,7 @@ export declare const CallbackMaps: Map<string, {
841
841
  }>>;
842
842
  };
843
843
  requestInstance: {
844
- type: import("vue").PropType<import("../../../../../../es/components/form-render").RequestInstance>;
844
+ type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
845
845
  };
846
846
  enterToNextWidget: {
847
847
  type: import("vue").PropType<boolean | ((fieldItem: import("../../../../../../es/components/form-render").FieldItem) => boolean | void)>;
@@ -915,6 +915,17 @@ export declare const CallbackMaps: Map<string, {
915
915
  annotation: {
916
916
  type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
917
917
  };
918
+ requestInstance: {
919
+ type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
920
+ };
921
+ uniqueCacheData: {
922
+ type: BooleanConstructor;
923
+ default: boolean;
924
+ };
925
+ parallelism: {
926
+ type: NumberConstructor;
927
+ default: number;
928
+ };
918
929
  }, {
919
930
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
920
931
  tableConfig: {
@@ -932,6 +943,17 @@ export declare const CallbackMaps: Map<string, {
932
943
  annotation: {
933
944
  type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
934
945
  };
946
+ requestInstance: {
947
+ type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
948
+ };
949
+ uniqueCacheData: {
950
+ type: BooleanConstructor;
951
+ default: boolean;
952
+ };
953
+ parallelism: {
954
+ type: NumberConstructor;
955
+ default: number;
956
+ };
935
957
  }>> & {
936
958
  onFormChange?: ((...args: any[]) => any) | undefined;
937
959
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -1006,6 +1028,10 @@ export declare const CallbackMaps: Map<string, {
1006
1028
  }>;
1007
1029
  eventListener: import("../../../../iho-table/src/hooks/tapHooks/useEventHooks").IhoTableEventListener;
1008
1030
  emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", ...args: any[]) => void;
1031
+ asyncQueue: import("../../../..").AsyncQueue<import("../../../..").FormRequestDefine.AsyncQueueItem, any, {
1032
+ label: string;
1033
+ value: unknown;
1034
+ }[]>;
1009
1035
  hooks: Readonly<{
1010
1036
  configHooks: import("../../../../../../es/components/iho-table").AbstractConfigHooks;
1011
1037
  fieldHooks: import("../../../../../../es/components/iho-table").AbstractFieldHooks;
@@ -5557,6 +5583,17 @@ export declare const CallbackMaps: Map<string, {
5557
5583
  annotation: {
5558
5584
  type: import("vue").PropType<Record<string, import("../../../../annotation-edit/src/type").AnnotationItem>>;
5559
5585
  };
5586
+ requestInstance: {
5587
+ type: import("vue").PropType<import("../../../..").FormRequestDefine.RequestInstance>;
5588
+ };
5589
+ uniqueCacheData: {
5590
+ type: BooleanConstructor;
5591
+ default: boolean;
5592
+ };
5593
+ parallelism: {
5594
+ type: NumberConstructor;
5595
+ default: number;
5596
+ };
5560
5597
  }>> & {
5561
5598
  onFormChange?: ((...args: any[]) => any) | undefined;
5562
5599
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -5625,6 +5662,8 @@ export declare const CallbackMaps: Map<string, {
5625
5662
  onRowDrag?: ((...args: any[]) => any) | undefined;
5626
5663
  }, {
5627
5664
  fieldList: import("../../../../../../es/components/iho-table").LowCodeTableFieldItem[];
5665
+ parallelism: number;
5666
+ uniqueCacheData: boolean;
5628
5667
  tableConfig: import("../../../../../../es/components/iho-table").IhoTableConfig;
5629
5668
  tableData: import("../../../..").AnyObject[];
5630
5669
  }>>;
@@ -1,12 +1,12 @@
1
- import { AnyObject, Func, NumberRange } from '../../../../../es/shared/types';
1
+ import { AnyObject, AnyFn, NumberRange } from '../../../../../es/shared/types';
2
2
  import { TRANS_CMD } from '../../../../../es/components/card-reader-sdk/src/constants';
3
3
  export declare namespace InsuranceType {
4
4
  export type ExecType = 'hisyb' | 'login';
5
5
  export type IHOWindow = Window & {
6
6
  chrome: {
7
7
  webview: {
8
- addEventListener: (type: string, handler: Func) => void;
9
- removeEventListener: (type: string, handler: Func) => void;
8
+ addEventListener: (type: string, handler: AnyFn) => void;
9
+ removeEventListener: (type: string, handler: AnyFn) => void;
10
10
  postMessage: (payload: any) => void;
11
11
  };
12
12
  };
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as a,ref as t,computed as l,watch as n,openBlock as u,createBlock as r,unref as o,isRef as d,createSlots as i,renderList as s,withCtx as f,renderSlot as p,nextTick as m}from"vue";import{NDatePicker as v}from"naive-ui";import"../../../shared/utils/index.js";import{isString as c,isArray as y}from"lodash-es";import{useDateTime as h}from"../../../shared/hooks/useDateTime.js";import{format as g}from"date-fns";var V=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String}},emits:["update:formatted-value"],setup(e,{expose:V,emit:w}){const I=e,R=a(),D=t(null),M=t(null),k=t(),C=l({get:()=>j(I.formattedValue)?null:I.formattedValue,set(e){w("update:formatted-value",e,c(e)?Date.parse(e):y(e)?[Date.parse(e[0]),Date.parse(e[1])]:null)}}),E=l((()=>{const e=Reflect.get(R,"type")||"";return["datetime","datetimerange"].includes(e)})),P=l((()=>{if(Reflect.get(R,"format"))return R.format;const e=R.type||"";return E.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),S=l((()=>E.value?P.value.split(" "):"")),{focus:U,blur:$,handleConfirm:_}=h(D,{formatRef:P,attrs:R,emit:w,allowedInvalidValue:I.allowedInvalidValue});function b(e){e&&E.value&&m((()=>{var e;M.value=null==(e=D.value)?void 0:e.panelInstRef,h(M,{formatRef:S,attrs:R,isPanel:!0})}))}async function x(...e){var a,t,l,n,u,r;const o=Reflect.get(R,"type")||"",d=null==(n=null==(l=null==(t=null==(a=D.value)?void 0:a.inputInstRef)?void 0:t.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(o.includes("range")?null==(u=I.onConfirm)||u.call(I,...e):(await m(),d.focus(),_(d),d.blur(),null==(r=I.onConfirm)||r.call(I,Date.parse(d.value),d.value)),!(null==d?void 0:d.value)||!I.updateUnchangedValue||o.includes("range"))return;const i=d.value;d.value=g(new Date,P.value),d.dispatchEvent(new InputEvent("input")),d.value=i,d.dispatchEvent(new InputEvent("input"))}function j(e){return I.allowedInvalidValue&&I.allowedInvalidValue===e}return n((()=>I.formattedValue),(e=>{k.value=j(e)?e:I.placeholder?I.placeholder:"选择日期时间"}),{immediate:!0}),V({$datePicker:D,focus:U,blur:$}),(e,a)=>(u(),r(o(v),{ref_key:"datePickerRef",ref:D,"onUpdate:show":b,onConfirm:x,placeholder:k.value,"formatted-value":o(C),"onUpdate:formatted-value":a[0]||(a[0]=e=>d(C)?C.value=e:null)},i({_:2},[s(e.$slots,((a,t)=>({name:t,fn:f((()=>[p(e.$slots,t)]))})))]),1032,["placeholder","formatted-value"]))}});export{V as default};
1
+ import{defineComponent as e,useAttrs as a,ref as t,computed as l,watch as n,openBlock as u,createBlock as r,unref as o,isRef as d,createSlots as i,renderList as s,withCtx as p,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as v}from"naive-ui";import"../../../shared/utils/index.js";import{isString as c,isArray as y}from"lodash-es";import{useDateTime as h}from"../../../shared/hooks/useDateTime.js";import"@vue/shared";import{format as g}from"date-fns";var V=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String}},emits:["update:formatted-value"],setup(e,{expose:V,emit:w}){const I=e,R=a(),D=t(null),M=t(null),k=t(),C=l({get:()=>j(I.formattedValue)?null:I.formattedValue,set(e){w("update:formatted-value",e,c(e)?Date.parse(e):y(e)?[Date.parse(e[0]),Date.parse(e[1])]:null)}}),E=l((()=>{const e=Reflect.get(R,"type")||"";return["datetime","datetimerange"].includes(e)})),P=l((()=>{if(Reflect.get(R,"format"))return R.format;const e=R.type||"";return E.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),S=l((()=>E.value?P.value.split(" "):"")),{focus:U,blur:$,handleConfirm:_}=h(D,{formatRef:P,attrs:R,emit:w,allowedInvalidValue:I.allowedInvalidValue});function b(e){e&&E.value&&m((()=>{var e;M.value=null==(e=D.value)?void 0:e.panelInstRef,h(M,{formatRef:S,attrs:R,isPanel:!0})}))}async function x(...e){var a,t,l,n,u,r;const o=Reflect.get(R,"type")||"",d=null==(n=null==(l=null==(t=null==(a=D.value)?void 0:a.inputInstRef)?void 0:t.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(o.includes("range")?null==(u=I.onConfirm)||u.call(I,...e):(await m(),d.focus(),_(d),d.blur(),null==(r=I.onConfirm)||r.call(I,Date.parse(d.value),d.value)),!(null==d?void 0:d.value)||!I.updateUnchangedValue||o.includes("range"))return;const i=d.value;d.value=g(new Date,P.value),d.dispatchEvent(new InputEvent("input")),d.value=i,d.dispatchEvent(new InputEvent("input"))}function j(e){return I.allowedInvalidValue&&I.allowedInvalidValue===e}return n((()=>I.formattedValue),(e=>{k.value=j(e)?e:I.placeholder?I.placeholder:"选择日期时间"}),{immediate:!0}),V({$datePicker:D,focus:U,blur:$}),(e,a)=>(u(),r(o(v),{ref_key:"datePickerRef",ref:D,"onUpdate:show":b,onConfirm:x,placeholder:k.value,"formatted-value":o(C),"onUpdate:formatted-value":a[0]||(a[0]=e=>d(C)?C.value=e:null)},i({_:2},[s(e.$slots,((a,t)=>({name:t,fn:p((()=>[f(e.$slots,t)]))})))]),1032,["placeholder","formatted-value"]))}});export{V as default};