cnhis-design-vue 3.1.42-release.0 → 3.1.42-release.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 (254) hide show
  1. package/README.md +87 -87
  2. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  3. package/es/components/annotation-edit/src/type.d.ts +3 -0
  4. package/es/components/annotation-edit/style/index.css +1 -1
  5. package/es/components/base-search/index.d.ts +271 -0
  6. package/es/components/base-search/index.js +1 -0
  7. package/es/components/{table-filter/src/base-search-com/BaseSearch.vue.d.ts → base-search/src/index.vue.d.ts} +26 -113
  8. package/es/components/base-search/src/index.vue.js +1 -0
  9. package/es/components/base-search/style/iconfont.ttf +0 -0
  10. package/es/components/base-search/style/index.css +1 -0
  11. package/es/components/big-table/style/index.css +1 -1
  12. package/es/components/button-print/index.d.ts +3 -2
  13. package/es/components/button-print/src/ButtonPrint.vue.d.ts +3 -2
  14. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  15. package/es/components/button-print/src/api.d.ts +3 -0
  16. package/es/components/button-print/src/api.js +1 -0
  17. package/es/components/button-print/src/utils/print.js +1 -1
  18. package/es/components/classification/index.d.ts +995 -0
  19. package/es/components/classification/index.js +1 -0
  20. package/es/components/{table-filter → classification}/src/components/search-filter/index.vue.d.ts +10 -93
  21. package/es/components/classification/src/components/search-filter/index.vue.js +1 -0
  22. package/es/components/{table-filter → classification}/src/components/set-classification/index.vue.d.ts +5 -130
  23. package/es/components/classification/src/components/set-classification/index.vue.js +1 -0
  24. package/es/components/{table-filter → classification}/src/components/table-modal/index.vue.d.ts +0 -42
  25. package/es/components/classification/src/components/table-modal/index.vue.js +1 -0
  26. package/es/components/classification/src/const/index.d.ts +2 -0
  27. package/es/components/classification/src/const/index.js +1 -0
  28. package/es/components/{table-filter/src/classification/Classification-com.vue.d.ts → classification/src/index.vue.d.ts} +57 -291
  29. package/es/components/classification/src/index.vue.js +1 -0
  30. package/es/components/classification/style/iconfont.ttf +0 -0
  31. package/es/components/classification/style/index.css +1 -0
  32. package/es/components/config-provider/index.d.ts +14 -0
  33. package/es/components/config-provider/index.js +1 -0
  34. package/es/components/config-provider/src/ConfigProvider.d.ts +14 -0
  35. package/es/components/config-provider/src/ConfigProvider.js +1 -0
  36. package/es/components/config-provider/src/interface.d.ts +19 -0
  37. package/es/components/config-provider/src/interface.js +1 -0
  38. package/es/components/config-provider/src/utils/index.d.ts +2 -0
  39. package/es/components/config-provider/src/utils/index.js +1 -0
  40. package/es/components/date-picker/index.d.ts +12 -0
  41. package/es/components/date-picker/index.js +1 -0
  42. package/es/components/date-picker/src/DatePicker.vue.d.ts +12 -0
  43. package/es/components/date-picker/src/DatePicker.vue.js +1 -0
  44. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/useRight.js +1 -1
  48. package/es/components/field-set/index.d.ts +82 -13
  49. package/es/components/field-set/src/FieldSet.vue.d.ts +78 -27
  50. package/es/components/field-set/src/types/index.d.ts +18 -0
  51. package/es/components/field-set/src/types/index.js +1 -0
  52. package/es/components/form-config/index.d.ts +36 -27
  53. package/es/components/form-config/src/FormConfig.vue.d.ts +36 -27
  54. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  55. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +11 -11
  56. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +14 -14
  57. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +9 -1
  58. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  59. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +33 -6
  60. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  61. package/es/components/form-config/style/index.css +1 -1
  62. package/es/components/form-render/index.d.ts +11 -11
  63. package/es/components/form-render/index.js +1 -1
  64. package/es/components/form-render/src/FormRender.vue.d.ts +11 -11
  65. package/es/components/form-render/src/FormRender.vue.js +1 -1
  66. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +11 -11
  67. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  68. package/es/components/form-render/src/components/renderer/date.js +1 -1
  69. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  70. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  71. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  72. package/es/components/form-render/src/components/renderer/select.js +1 -1
  73. package/es/components/form-render/src/hooks/index.d.ts +1 -1
  74. package/es/components/form-render/src/hooks/index.js +1 -1
  75. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
  76. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  77. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
  78. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
  79. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  80. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -2
  81. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  82. package/es/components/form-render/src/types/index.d.ts +2 -1
  83. package/es/components/form-render/style/index.css +1 -1
  84. package/es/components/iho-table/index.d.ts +1526 -0
  85. package/es/components/iho-table/src/IhoTable.vue.d.ts +1526 -0
  86. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  87. package/es/components/iho-table/src/constants/index.d.ts +6 -5
  88. package/es/components/iho-table/src/constants/index.js +1 -1
  89. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  90. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  91. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -1
  92. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  93. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  94. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  95. package/es/components/iho-table/src/plugins/index.js +1 -1
  96. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  97. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +12 -7
  98. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  99. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  100. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  101. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -1
  102. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  103. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +12 -1
  104. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  105. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  106. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  107. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  108. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.d.ts +1 -0
  109. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -0
  110. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  111. package/es/components/iho-table/src/types/index.d.ts +2 -0
  112. package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
  113. package/es/components/iho-table/src/utils/index.d.ts +2 -0
  114. package/es/components/iho-table/src/utils/index.js +1 -1
  115. package/es/components/iho-table/style/index.css +1 -1
  116. package/es/components/index.css +1 -1
  117. package/es/components/index.d.ts +9 -2
  118. package/es/components/index.js +1 -1
  119. package/es/components/info-header/index.d.ts +3800 -157
  120. package/es/components/info-header/src/InfoHeader.vue.d.ts +3801 -157
  121. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  122. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1842 -0
  123. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -0
  124. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1972 -0
  125. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -0
  126. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  127. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +2669 -139
  128. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  129. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +745 -0
  130. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  131. package/es/components/info-header/src/constants/index.d.ts +4 -0
  132. package/es/components/info-header/src/constants/index.js +1 -0
  133. package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +4 -0
  134. package/es/components/info-header/src/hooks/useThemeOverrides.js +1 -0
  135. package/es/components/info-header/src/types/index.d.ts +17 -3
  136. package/es/components/info-header/style/index.css +1 -1
  137. package/es/components/keyboard/index.d.ts +3 -1
  138. package/es/components/keyboard/src/Keyboard.vue.d.ts +3 -1
  139. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  140. package/es/components/keyboard/src/constants/index.d.ts +2 -0
  141. package/es/components/keyboard/src/constants/index.js +1 -0
  142. package/es/components/keyboard/style/index.css +1 -1
  143. package/es/components/quick-search/index.d.ts +713 -0
  144. package/es/components/quick-search/index.js +1 -0
  145. package/es/components/{table-filter/src/quick-search/QuickSearch.vue.d.ts → quick-search/src/index.vue.d.ts} +31 -120
  146. package/es/components/quick-search/src/index.vue.js +1 -0
  147. package/es/components/quick-search/style/index.css +1 -0
  148. package/es/components/recommend-search/index.d.ts +2 -2
  149. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  150. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  151. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  152. package/es/components/scale-view/src/components/formitem/sign-com.d.ts +1 -1
  153. package/es/components/scale-view/src/hooks/use-component.d.ts +69 -116
  154. package/es/components/search-cascader/index.d.ts +2 -2
  155. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
  156. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  157. package/es/components/select-label/index.d.ts +70 -169
  158. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -53
  159. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  160. package/es/components/select-label/src/SelectLabel.vue.d.ts +70 -116
  161. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  162. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  163. package/es/components/select-label/style/iconfont.ttf +0 -0
  164. package/es/components/select-label/style/index.css +1 -1
  165. package/es/components/shortcut-setter/index.d.ts +12 -12
  166. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +12 -12
  167. package/es/components/steps-wheel/index.d.ts +1 -0
  168. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -0
  169. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  170. package/es/components/steps-wheel/src/constants/index.d.ts +2 -0
  171. package/es/components/steps-wheel/src/constants/index.js +1 -0
  172. package/es/components/steps-wheel/style/index.css +1 -1
  173. package/es/components/table-filter/index.d.ts +0 -2386
  174. package/es/components/table-filter/index.js +1 -1
  175. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
  176. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  177. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -42
  178. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  179. package/es/components/table-filter/src/components/render-widget/enums.d.ts +0 -8
  180. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  181. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +2 -1
  182. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  183. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  184. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +4 -1
  185. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  186. package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -54
  187. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  188. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  189. package/es/components/table-filter/src/tool/baseOptions.d.ts +8 -0
  190. package/es/components/table-filter/src/tool/baseOptions.js +1 -0
  191. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +0 -7
  192. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  193. package/es/components/table-filter/src/tool/transformData.d.ts +1 -37
  194. package/es/components/table-filter/src/tool/transformData.js +1 -1
  195. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  196. package/es/components/table-filter/src/types/enums.js +1 -1
  197. package/es/components/table-filter/src/types/index.d.ts +13 -243
  198. package/es/components/time-picker/index.d.ts +12 -0
  199. package/es/components/time-picker/index.js +1 -0
  200. package/es/components/time-picker/src/TimePicker.vue.d.ts +12 -0
  201. package/es/components/time-picker/src/TimePicker.vue.js +1 -0
  202. package/es/env.d.ts +24 -24
  203. package/es/shared/hooks/index.d.ts +3 -0
  204. package/es/shared/hooks/index.js +1 -0
  205. package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
  206. package/es/shared/hooks/useAsyncQueue.js +1 -0
  207. package/es/shared/hooks/useDateTime.d.ts +6 -0
  208. package/es/shared/hooks/useDateTime.js +1 -0
  209. package/es/shared/hooks/useTheme.d.ts +3 -0
  210. package/es/shared/hooks/useTheme.js +1 -0
  211. package/es/shared/utils/index.d.ts +1 -0
  212. package/es/shared/utils/index.js +1 -1
  213. package/package.json +2 -2
  214. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  215. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  216. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  217. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  218. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  219. package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
  220. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.d.ts +0 -2
  221. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.js +0 -1
  222. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +0 -1
  223. package/es/components/table-filter/src/classification/Classification-com.vue.js +0 -1
  224. package/es/components/table-filter/src/components/search-filter/index.vue.js +0 -1
  225. package/es/components/table-filter/src/components/set-classification/index.vue.js +0 -1
  226. package/es/components/table-filter/src/components/table-modal/index.vue.js +0 -1
  227. package/es/components/table-filter/src/const/index.d.ts +0 -5
  228. package/es/components/table-filter/src/const/index.js +0 -1
  229. package/es/components/table-filter/src/directive/resize.d.ts +0 -4
  230. package/es/components/table-filter/src/directive/resize.js +0 -1
  231. package/es/components/table-filter/src/hooks/export.d.ts +0 -1
  232. package/es/components/table-filter/src/hooks/export.js +0 -1
  233. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +0 -8
  234. package/es/components/table-filter/src/hooks/useTableSearchCon.js +0 -1
  235. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +0 -12
  236. package/es/components/table-filter/src/hooks/useWordBookutils.js +0 -1
  237. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +0 -1
  238. package/es/components/table-filter/src/tool/getWidgetType.d.ts +0 -1
  239. package/es/components/table-filter/src/tool/getWidgetType.js +0 -1
  240. package/es/components/table-filter/src/tool/options.d.ts +0 -18
  241. package/es/components/table-filter/src/tool/options.js +0 -1
  242. package/es/components/table-filter/src/tool/resizeSensor.d.ts +0 -16
  243. package/es/components/table-filter/src/tool/resizeSensor.js +0 -1
  244. package/es/components/table-filter/src/tool/time-domain.d.ts +0 -39
  245. package/es/components/table-filter/src/tool/time-domain.js +0 -1
  246. package/es/components/table-filter/src/tool/utils.d.ts +0 -4
  247. package/es/components/table-filter/src/tool/utils.js +0 -1
  248. package/es/components/table-filter/style/index.css +0 -1
  249. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  250. package/es/shared/utils/colorLog.d.ts +0 -31
  251. package/es/shared/utils/colorLog.js +0 -1
  252. package/es/shared/utils/tapable/index.d.ts +0 -139
  253. /package/es/components/{table-filter → classification}/src/directive/flexibleResize.d.ts +0 -0
  254. /package/es/components/{table-filter → classification}/src/directive/flexibleResize.js +0 -0
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 t,onDeactivated as a,createVNode as l,unref as n,createTextVNode as u}from"vue";import{FileTrayFull as i,FileTray as r}from"@vicons/ionicons5";import{isString as s,isObject as m}from"lodash-es";import{NPopover as v,NDivider as c,NEllipsis as d,NIcon as p,NInput as f}from"naive-ui";var g=e({props:{modelValue:{type:[String,Object],default:""}},emits:["update:modelValue"],setup(e,{emit:g}){const V=o({get:()=>s(e.modelValue)?e.modelValue:m(e.modelValue)&&e.modelValue.content||"",set(o){let t=o;m(e.modelValue)&&(t={...e.modelValue,content:o}),g("update:modelValue",t)}}),h=t(!1),w=o({get:()=>h.value,async set(e){h.value=e,!e&&x.value&&(await new Promise((e=>setTimeout(e,200))),x.value=!1)}}),x=t(!1);let T,y;function _(e){e.stopPropagation(),clearTimeout(T),w.value&&x.value?w.value=!1:n(V)||(T=setTimeout((()=>{x.value=w.value=!0}),200))}function k(e){e.stopPropagation(),clearTimeout(T),n(V)&&(w.value=!0,x.value=!0)}function P(e){e.stopPropagation(),clearTimeout(y),n(V)&&(w.value=!0)}function b(e){e.stopPropagation(),clearTimeout(y),n(V)&&!x.value&&(y=setTimeout((()=>{w.value=!1}),300))}return a((()=>{w.value=!1})),function(){return l("section",{class:["annotation-edit",{"is-active":!!n(V)}],style:{"--icon-right":"-5"},"annotation-hover-show":!n(V)&&!x.value},[l(v,{"keep-alive-on-hover":!0,style:{maxWidth:"360px",wordBreak:"break-all"},show:w.value,"onUpdate:show":e=>w.value=e,trigger:"manual",duration:100},{default:function(){return l("section",{onMouseleave:b,onMouseenter:P},[l("div",null,[x.value?l(f,{resizable:!1,autosize:{minRows:3,maxRows:5},"show-count":!0,class:"annotation-edit__textarea",type:"textarea",value:V.value,"onUpdate:value":e=>V.value=e},null):l("span",null,[n(V)])]),m(e.modelValue)?[l(c,{style:{margin:"4px 0",minWidth:"360px"}},null),l("section",{class:"annotation-edit__footer"},[l(d,null,{default:()=>[u("质控人: "),e.modelValue.author]}),l(d,null,{default:()=>[u("质控时间: "),e.modelValue.date]})])]:null])},trigger:function(){return l("div",{class:"annotation-edit__icon",onMouseleave:b,onMouseenter:P,onDblclick:k,onClick:_},[l(p,{component:n(V)?i:r},null)])}})])}}});export{g as default};
1
+ import{defineComponent as e,computed as o,ref as a,onDeactivated as l,createVNode as t,unref as u,createTextVNode as n}from"vue";import{useTheme as i}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";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),b=o({get:()=>T.value,async set(e){T.value=e,!e&&k.value&&(await new Promise((e=>setTimeout(e,200))),k.value=!1)}}),k=a(!1);let y,_;function P(e){e.stopPropagation(),clearTimeout(y),b.value&&k.value?b.value=!1:u(x)||(y=setTimeout((()=>{k.value=b.value=!0}),200))}function M(e){e.stopPropagation(),clearTimeout(y),u(x)&&(b.value=!0,k.value=!0)}function R(e){e.stopPropagation(),clearTimeout(_),u(x)&&(b.value=!0)}function j(e){e.stopPropagation(),clearTimeout(_),u(x)&&!k.value&&(_=setTimeout((()=>{b.value=!1}),300))}return l((()=>{b.value=!1})),function(){return t("section",{class:["annotation-edit",{"is-active":!!u(x)}],style:{"--icon-right":"-5",...w.value},"annotation-hover-show":!u(x)&&!k.value},[t(c,{"keep-alive-on-hover":!0,style:{maxWidth:"360px",wordBreak:"break-all"},show:b.value,"onUpdate:show":e=>b.value=e,trigger:"manual",duration:100},{default:function(){return t("section",{onMouseleave:j,onMouseenter:R},[t("div",null,[k.value?t(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):t("span",null,[u(x)])]),s(e.modelValue)?[t(p,{style:{margin:"4px 0",minWidth:"360px"}},null),t("section",{class:"annotation-edit__footer"},[m(e.modelValue.footerRender)?e.modelValue.footerRender(e.modelValue):[t(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.authorLabel)?o:"质控人",n(": "),e.modelValue.author]}}),t(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.dateLabel)?o:"质控时间",n(": "),e.modelValue.date]}})]])]:null])},trigger:function(){return t("div",{class:"annotation-edit__icon",onMouseleave:j,onMouseenter:R,onDblclick:M,onClick:P},[t(V,{component:u(x)?d:v},null)])}})])}}});export{g as default};
@@ -1,5 +1,8 @@
1
1
  export declare type AnnotationItem = string | Partial<{
2
2
  content: string;
3
3
  author: string;
4
+ authorLabel: string;
4
5
  date: string;
6
+ dateLabel: string;
7
+ footerRender: (item: Exclude<AnnotationItem, string>) => any;
5
8
  }>;
@@ -1 +1 @@
1
- .annotation-edit{align-items:center;color:#0067ee;cursor:pointer;display:inline-flex;font-size:16px;user-select:none}.annotation-edit.is-active{color:#ff9828}.annotation-edit__icon{align-items:center;display:inline-flex}.annotation-edit__textarea{min-width:200px}.annotation-edit__footer{align-items:center;display:flex;flex-wrap:nowrap;gap:8px;justify-content:space-between;opacity:.5}.annotation-edit__footer>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.annotation-edit__footer>div:first-of-type{min-width:30%}
1
+ .annotation-edit{align-items:center;color:var(--c-primary-color);cursor:pointer;display:inline-flex;font-size:16px;user-select:none}.annotation-edit.is-active{color:var(--c-primary-color);filter:hue-rotate(140deg)}.annotation-edit__icon{align-items:center;display:inline-flex}.annotation-edit__textarea{min-width:200px}.annotation-edit__footer{align-items:center;display:flex;flex-wrap:nowrap;gap:8px;justify-content:space-between;opacity:.5}.annotation-edit__footer>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.annotation-edit__footer>div:first-of-type{min-width:30%}
@@ -0,0 +1,271 @@
1
+ import { SFCWithInstall } from '../../../es/shared/types';
2
+ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
3
+ showSettings: {
4
+ type: import("vue").PropType<import("..").IsettingsType>;
5
+ default: () => {
6
+ hideQuickSearch: number;
7
+ };
8
+ };
9
+ searchFieldList: {
10
+ type: import("vue").PropType<import("..").IApiServerType[]>;
11
+ default: () => never[];
12
+ };
13
+ qqConObjCount: {
14
+ type: NumberConstructor;
15
+ default: number;
16
+ };
17
+ }, {
18
+ outQuickSearchFn: {
19
+ handlerInitSearchItem(arr: import("..").ISearchType[]): void;
20
+ };
21
+ isRender: (cfg: import("..").ISearchType) => any;
22
+ getRenderSearchConObj: (cfg: import("..").ISearchType) => {
23
+ field_key: string;
24
+ con: string | undefined;
25
+ value: any[] | null;
26
+ unit: null;
27
+ } | null;
28
+ isExistDefValByRenderWidget: (cfg: import("..").ISearchType) => boolean;
29
+ resetRenderWidgetValue: (cfg: import("..").ISearchType) => any;
30
+ transformData: (advancedFilterData: import("..").IApiServerType[]) => {
31
+ fieldType: string;
32
+ columnName: string;
33
+ settingObj: {};
34
+ setting: string;
35
+ widgetCfg: {
36
+ isRender: boolean;
37
+ widgetType: string | null;
38
+ valueList: {
39
+ value: any;
40
+ label: string;
41
+ }[] | undefined;
42
+ defaultValue: any;
43
+ defValueUnit: any;
44
+ multiple: boolean;
45
+ };
46
+ title: string;
47
+ alias: string | undefined;
48
+ isShowSearch: number;
49
+ filterExplicit: number;
50
+ explicitRequired: number;
51
+ advanceOptionSetting: string;
52
+ placeholder: string | undefined;
53
+ advanceColWidth: string;
54
+ }[];
55
+ transformParams: (paramsList: any) => {};
56
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
57
+ showSettings: {
58
+ type: import("vue").PropType<import("..").IsettingsType>;
59
+ default: () => {
60
+ hideQuickSearch: number;
61
+ };
62
+ };
63
+ searchFieldList: {
64
+ type: import("vue").PropType<import("..").IApiServerType[]>;
65
+ default: () => never[];
66
+ };
67
+ qqConObjCount: {
68
+ type: NumberConstructor;
69
+ default: number;
70
+ };
71
+ }>> & {
72
+ onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
73
+ onOnFilterSearch?: ((...args: any[]) => any) | undefined;
74
+ onHandleReset?: ((...args: any[]) => any) | undefined;
75
+ onGetFilterParam?: ((...args: any[]) => any) | undefined;
76
+ }>>;
77
+ emit: (event: "foldQuickSearch" | "onFilterSearch" | "handleReset" | "getFilterParam", ...args: any[]) => void;
78
+ curConObj: import("vue").Ref<{
79
+ field_key: string;
80
+ con: string;
81
+ value: any;
82
+ unit: string | null;
83
+ }[]>;
84
+ showResetFilterBtn: import("vue").Ref<boolean>;
85
+ outSearchFieldList: import("vue").Ref<{
86
+ columnName: string;
87
+ title: string;
88
+ fieldType?: string | undefined;
89
+ filterExplicit?: number | undefined;
90
+ isShowSearch?: number | undefined;
91
+ setting?: any;
92
+ settingObj?: any;
93
+ placeholder?: string | undefined;
94
+ AGEAttr?: boolean | undefined;
95
+ CL?: string | undefined;
96
+ CONVERT?: any;
97
+ EVALUATEAttr?: boolean | undefined;
98
+ EQ?: string | undefined;
99
+ LABELAttr?: boolean | undefined;
100
+ _isBlock?: boolean | undefined;
101
+ _frontId?: any;
102
+ NUMBERFiled?: boolean | undefined;
103
+ PASSWORDTYPE?: boolean | undefined;
104
+ advanceColWidth?: string | undefined;
105
+ advanceOptionSetting?: string | undefined;
106
+ alias?: string | undefined;
107
+ ageObj?: any;
108
+ attr?: string | undefined;
109
+ bigValue?: string | number | undefined;
110
+ classify?: string | undefined;
111
+ colWidth?: number | undefined;
112
+ columnFullName?: string | undefined;
113
+ com?: string | undefined;
114
+ comType?: string | undefined;
115
+ comAttr?: string | undefined;
116
+ con?: string | undefined;
117
+ dataSource?: any;
118
+ dictionarieObj?: any;
119
+ explicitRequired?: number | undefined;
120
+ explicitDefaultVal?: string | undefined;
121
+ extraField?: boolean | undefined;
122
+ fieldSetting?: string | undefined;
123
+ format?: string | undefined;
124
+ i18n?: string | undefined;
125
+ id?: string | undefined;
126
+ inputVal?: string | undefined;
127
+ inputUnit?: string | undefined;
128
+ isAvg?: number | undefined;
129
+ isEdit?: number | undefined;
130
+ isFixed?: number | undefined;
131
+ isFixedShow?: number | undefined;
132
+ isFontWeight?: number | undefined;
133
+ isMerge?: number | undefined;
134
+ isOrder?: number | undefined;
135
+ isPreciseSearch?: boolean | undefined;
136
+ isRender?: boolean | undefined;
137
+ isSearch?: number | undefined;
138
+ isShow?: number | undefined;
139
+ isSort?: number | undefined;
140
+ isSum?: number | undefined;
141
+ labelObj?: any;
142
+ labelList?: {
143
+ labelId?: string | undefined;
144
+ change_text: string;
145
+ field_key: string;
146
+ filter: {
147
+ con: string;
148
+ conName?: string | undefined;
149
+ field_key: string;
150
+ key?: string | undefined;
151
+ value: string;
152
+ }[];
153
+ label: string;
154
+ labelName: string;
155
+ sqlExpression: string;
156
+ value: string;
157
+ isSelect?: boolean | undefined;
158
+ }[] | undefined;
159
+ labelSelectList?: {
160
+ labelId?: string | undefined;
161
+ change_text: string;
162
+ field_key: string;
163
+ filter: {
164
+ con: string;
165
+ conName?: string | undefined;
166
+ field_key: string;
167
+ key?: string | undefined;
168
+ value: string;
169
+ }[];
170
+ label: string;
171
+ labelName: string;
172
+ sqlExpression: string;
173
+ value: string;
174
+ isSelect?: boolean | undefined;
175
+ }[] | undefined;
176
+ lessValue?: string | number | undefined;
177
+ marginx?: string | undefined;
178
+ notParticipatingSearch?: number | undefined;
179
+ order?: string | undefined;
180
+ QUOTE?: any;
181
+ searchPageConfig?: any;
182
+ selecteds?: any;
183
+ sequence?: number | undefined;
184
+ showDate?: boolean | undefined;
185
+ showFormat?: string | undefined;
186
+ showTime?: boolean | undefined;
187
+ sid?: string | undefined;
188
+ start_val?: number | null | undefined;
189
+ end_val?: number | null | undefined;
190
+ tempCon?: any;
191
+ tableId?: string | undefined;
192
+ value?: any;
193
+ unit?: string | undefined;
194
+ widgetCfg?: any;
195
+ formTitle?: string | undefined;
196
+ random_key?: string | undefined;
197
+ widgetType?: any;
198
+ hasFieldList?: any;
199
+ search_DefaultValue?: any;
200
+ }[]>;
201
+ showQuickSearch: import("vue").ComputedRef<boolean>;
202
+ initOutSearchFieldList: (config?: any) => void;
203
+ isShowSetting: (v: string) => boolean;
204
+ foldQuickSearch: () => void;
205
+ outFilterChange: (config?: {}) => void;
206
+ getConObjParams: () => any;
207
+ getConObj: (arr: any) => any;
208
+ onFilterSearch: (obj: import("..").ISearchParamsType[], transResult: object, isOutFilter?: boolean, config?: {}) => void;
209
+ handleReset: () => void;
210
+ resetFunc: (arr: import("..").ISearchType[]) => void;
211
+ RenderWidget: import("vue").DefineComponent<{
212
+ cfg: {
213
+ type: ObjectConstructor;
214
+ required: true;
215
+ };
216
+ modelValue: {
217
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
218
+ };
219
+ }, any, {
220
+ initialProps: {};
221
+ }, {
222
+ valueCp(): any;
223
+ }, {
224
+ search(): void;
225
+ getEleWidth(cfg: any): string | undefined;
226
+ initComponentProps(cfg: any): void;
227
+ generateWidget(cfg: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
228
+ [key: string]: any;
229
+ }> | null;
230
+ handleUpdate(val: any, widgetType: any, defValueUnit: any): void;
231
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange")[], "update:modelValue" | "outFilterChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
232
+ cfg: {
233
+ type: ObjectConstructor;
234
+ required: true;
235
+ };
236
+ modelValue: {
237
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
238
+ };
239
+ }>> & {
240
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
241
+ onOutFilterChange?: ((...args: any[]) => any) | undefined;
242
+ }, {}>;
243
+ NIcon: any;
244
+ NButton: any;
245
+ Search: 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<{}>>, {}>;
246
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("foldQuickSearch" | "onFilterSearch" | "handleReset" | "getFilterParam")[], "foldQuickSearch" | "onFilterSearch" | "handleReset" | "getFilterParam", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
247
+ showSettings: {
248
+ type: import("vue").PropType<import("..").IsettingsType>;
249
+ default: () => {
250
+ hideQuickSearch: number;
251
+ };
252
+ };
253
+ searchFieldList: {
254
+ type: import("vue").PropType<import("..").IApiServerType[]>;
255
+ default: () => never[];
256
+ };
257
+ qqConObjCount: {
258
+ type: NumberConstructor;
259
+ default: number;
260
+ };
261
+ }>> & {
262
+ onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
263
+ onOnFilterSearch?: ((...args: any[]) => any) | undefined;
264
+ onHandleReset?: ((...args: any[]) => any) | undefined;
265
+ onGetFilterParam?: ((...args: any[]) => any) | undefined;
266
+ }, {
267
+ showSettings: import("..").IsettingsType;
268
+ searchFieldList: import("..").IApiServerType[];
269
+ qqConObjCount: number;
270
+ }>>;
271
+ export default CBaseSearch;
@@ -0,0 +1 @@
1
+ import{COMPONENT_NAMESPACE as r}from"../../shared/global/variable.js";import{safeComponentRegister as s}from"../../shared/utils/index.js";import a from"./src/index.vue.js";const e=a;e.install=function(a){s(a,e,r+"BaseSearch")};export{e as default};