cnhis-design-vue 3.2.5-beta.11 → 3.2.5-beta.13

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 (259) hide show
  1. package/README.md +87 -87
  2. package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
  3. package/es/components/callback/src/components/render/popupMaps.d.ts +2 -0
  4. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  5. package/es/components/classification/src/index.vue.d.ts +3 -3
  6. package/es/components/form-config/index.d.ts +30 -0
  7. package/es/components/form-config/src/FormConfig.vue.d.ts +30 -0
  8. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  9. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +12 -0
  10. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  11. package/es/components/form-config/src/types/index.d.ts +4 -0
  12. package/es/components/form-render/src/components/renderer/switch.d.ts +1 -1
  13. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  14. package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
  15. package/es/components/iho-table/index.d.ts +2 -0
  16. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  17. package/es/components/iho-table/src/plugins/pagerScrollPlugin/index.js +1 -1
  18. package/es/components/iho-table/src/types/index.d.ts +1 -0
  19. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  20. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  21. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  22. package/es/components/shortcut-setter/index.d.ts +4 -0
  23. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -0
  24. package/es/env.d.ts +25 -25
  25. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  26. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  27. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  28. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  29. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  30. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  31. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  32. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  33. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  34. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  35. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  36. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  37. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  38. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  39. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  40. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  41. package/es/shared/assets/img/emoji/emotion_001.png.js +1 -1
  42. package/es/shared/assets/img/emoji/emotion_002.png.js +1 -1
  43. package/es/shared/assets/img/emoji/emotion_003.png.js +1 -1
  44. package/es/shared/assets/img/emoji/emotion_004.png.js +1 -1
  45. package/es/shared/assets/img/emoji/emotion_005.png.js +1 -1
  46. package/es/shared/assets/img/emoji/emotion_006.png.js +1 -1
  47. package/es/shared/assets/img/emoji/emotion_007.png.js +1 -1
  48. package/es/shared/assets/img/emoji/emotion_008.png.js +1 -1
  49. package/es/shared/assets/img/emoji/emotion_009.png.js +1 -1
  50. package/es/shared/assets/img/emoji/emotion_010.png.js +1 -1
  51. package/es/shared/assets/img/emoji/emotion_011.png.js +1 -1
  52. package/es/shared/assets/img/emoji/emotion_012.png.js +1 -1
  53. package/es/shared/assets/img/emoji/emotion_013.png.js +1 -1
  54. package/es/shared/assets/img/emoji/emotion_014.png.js +1 -1
  55. package/es/shared/assets/img/emoji/emotion_015.png.js +1 -1
  56. package/es/shared/assets/img/emoji/emotion_016.png.js +1 -1
  57. package/es/shared/assets/img/emoji/emotion_017.png.js +1 -1
  58. package/es/shared/assets/img/emoji/emotion_018.png.js +1 -1
  59. package/es/shared/assets/img/emoji/emotion_019.png.js +1 -1
  60. package/es/shared/assets/img/emoji/emotion_020.png.js +1 -1
  61. package/es/shared/assets/img/emoji/emotion_021.png.js +1 -1
  62. package/es/shared/assets/img/emoji/emotion_022.png.js +1 -1
  63. package/es/shared/assets/img/emoji/emotion_023.png.js +1 -1
  64. package/es/shared/assets/img/emoji/emotion_024.png.js +1 -1
  65. package/es/shared/assets/img/emoji/emotion_025.png.js +1 -1
  66. package/es/shared/assets/img/emoji/emotion_026.png.js +1 -1
  67. package/es/shared/assets/img/emoji/emotion_027.png.js +1 -1
  68. package/es/shared/assets/img/emoji/emotion_028.png.js +1 -1
  69. package/es/shared/assets/img/emoji/emotion_029.png.js +1 -1
  70. package/es/shared/assets/img/emoji/emotion_030.png.js +1 -1
  71. package/es/shared/assets/img/emoji/emotion_031.png.js +1 -1
  72. package/es/shared/assets/img/emoji/emotion_032.png.js +1 -1
  73. package/es/shared/assets/img/emoji/emotion_033.png.js +1 -1
  74. package/es/shared/assets/img/emoji/emotion_034.png.js +1 -1
  75. package/es/shared/assets/img/emoji/emotion_035.png.js +1 -1
  76. package/es/shared/assets/img/emoji/emotion_036.png.js +1 -1
  77. package/es/shared/assets/img/emoji/emotion_037.png.js +1 -1
  78. package/es/shared/assets/img/emoji/emotion_038.png.js +1 -1
  79. package/es/shared/assets/img/emoji/emotion_039.png.js +1 -1
  80. package/es/shared/assets/img/emoji/emotion_040.png.js +1 -1
  81. package/es/shared/assets/img/emoji/emotion_041.png.js +1 -1
  82. package/es/shared/assets/img/emoji/emotion_042.png.js +1 -1
  83. package/es/shared/assets/img/emoji/emotion_043.png.js +1 -1
  84. package/es/shared/assets/img/emoji/emotion_044.png.js +1 -1
  85. package/es/shared/assets/img/emoji/emotion_045.png.js +1 -1
  86. package/es/shared/assets/img/emoji/emotion_046.png.js +1 -1
  87. package/es/shared/assets/img/emoji/emotion_047.png.js +1 -1
  88. package/es/shared/assets/img/emoji/emotion_048.png.js +1 -1
  89. package/es/shared/assets/img/emoji/emotion_049.png.js +1 -1
  90. package/es/shared/assets/img/emoji/emotion_050.png.js +1 -1
  91. package/es/shared/assets/img/emoji/emotion_051.png.js +1 -1
  92. package/es/shared/assets/img/emoji/emotion_052.png.js +1 -1
  93. package/es/shared/assets/img/emoji/emotion_053.png.js +1 -1
  94. package/es/shared/assets/img/emoji/emotion_054.png.js +1 -1
  95. package/es/shared/assets/img/emoji/emotion_055.png.js +1 -1
  96. package/es/shared/assets/img/emoji/emotion_056.png.js +1 -1
  97. package/es/shared/assets/img/emoji/emotion_057.png.js +1 -1
  98. package/es/shared/assets/img/emoji/emotion_058.png.js +1 -1
  99. package/es/shared/assets/img/emoji/emotion_059.png.js +1 -1
  100. package/es/shared/assets/img/emoji/emotion_060.png.js +1 -1
  101. package/es/shared/assets/img/emoji/emotion_061.png.js +1 -1
  102. package/es/shared/assets/img/emoji/emotion_062.png.js +1 -1
  103. package/es/shared/assets/img/emoji/emotion_063.png.js +1 -1
  104. package/es/shared/assets/img/emoji/emotion_064.png.js +1 -1
  105. package/es/shared/assets/img/emoji/emotion_065.png.js +1 -1
  106. package/es/shared/assets/img/emoji/emotion_066.png.js +1 -1
  107. package/es/shared/assets/img/emoji/emotion_067.png.js +1 -1
  108. package/es/shared/assets/img/emoji/emotion_068.png.js +1 -1
  109. package/es/shared/assets/img/emoji/emotion_069.png.js +1 -1
  110. package/es/shared/assets/img/emoji/emotion_070.png.js +1 -1
  111. package/es/shared/assets/img/emoji/emotion_071.png.js +1 -1
  112. package/es/shared/assets/img/emoji/emotion_072.png.js +1 -1
  113. package/es/shared/assets/img/emoji/emotion_073.png.js +1 -1
  114. package/es/shared/assets/img/emoji/emotion_074.png.js +1 -1
  115. package/es/shared/assets/img/emoji/emotion_075.png.js +1 -1
  116. package/es/shared/assets/img/emoji/emotion_076.png.js +1 -1
  117. package/es/shared/assets/img/emoji/emotion_077.png.js +1 -1
  118. package/es/shared/assets/img/emoji/emotion_078.png.js +1 -1
  119. package/es/shared/assets/img/emoji/emotion_079.png.js +1 -1
  120. package/es/shared/assets/img/emoji/emotion_080.png.js +1 -1
  121. package/es/shared/assets/img/emoji/emotion_081.png.js +1 -1
  122. package/es/shared/assets/img/emoji/emotion_082.png.js +1 -1
  123. package/es/shared/assets/img/emoji/emotion_083.png.js +1 -1
  124. package/es/shared/assets/img/emoji/emotion_084.png.js +1 -1
  125. package/es/shared/assets/img/emoji/emotion_085.png.js +1 -1
  126. package/es/shared/assets/img/emoji/emotion_086.png.js +1 -1
  127. package/es/shared/assets/img/emoji/emotion_087.png.js +1 -1
  128. package/es/shared/assets/img/emoji/emotion_088.png.js +1 -1
  129. package/es/shared/assets/img/emoji/emotion_089.png.js +1 -1
  130. package/es/shared/assets/img/emoji/emotion_090.png.js +1 -1
  131. package/es/shared/assets/img/emoji/emotion_091.png.js +1 -1
  132. package/es/shared/assets/img/emoji/emotion_092.png.js +1 -1
  133. package/es/shared/assets/img/emoji/emotion_093.png.js +1 -1
  134. package/es/shared/assets/img/emoji/emotion_094.png.js +1 -1
  135. package/es/shared/assets/img/emoji/emotion_095.png.js +1 -1
  136. package/es/shared/assets/img/emoji/emotion_096.png.js +1 -1
  137. package/es/shared/assets/img/emoji/emotion_097.png.js +1 -1
  138. package/es/shared/assets/img/emoji/emotion_098.png.js +1 -1
  139. package/es/shared/assets/img/emoji/emotion_099.png.js +1 -1
  140. package/es/shared/assets/img/emoji/emotion_100.png.js +1 -1
  141. package/es/shared/assets/img/emoji/emotion_101.png.js +1 -1
  142. package/es/shared/assets/img/emoji/emotion_102.png.js +1 -1
  143. package/es/shared/assets/img/emoji/emotion_103.png.js +1 -1
  144. package/es/shared/assets/img/emoji/emotion_104.png.js +1 -1
  145. package/es/shared/assets/img/emoji/emotion_105.png.js +1 -1
  146. package/es/shared/assets/img/emoji/emotion_106.png.js +1 -1
  147. package/es/shared/assets/img/emoji/emotion_107.png.js +1 -1
  148. package/es/shared/assets/img/emoji/emotion_108.png.js +1 -1
  149. package/es/shared/assets/img/emoji/emotion_109.png.js +1 -1
  150. package/es/shared/assets/img/emoji/emotion_110.png.js +1 -1
  151. package/es/shared/assets/img/emoji/emotion_111.png.js +1 -1
  152. package/es/shared/assets/img/emoji/emotion_112.png.js +1 -1
  153. package/es/shared/assets/img/emoji/emotion_113.png.js +1 -1
  154. package/es/shared/assets/img/emoji/emotion_114.png.js +1 -1
  155. package/es/shared/assets/img/emoji/emotion_115.png.js +1 -1
  156. package/es/shared/assets/img/emoji/emotion_116.png.js +1 -1
  157. package/es/shared/assets/img/emoji/emotion_117.png.js +1 -1
  158. package/es/shared/assets/img/emoji/emotion_118.png.js +1 -1
  159. package/es/shared/assets/img/emoji/emotion_119.png.js +1 -1
  160. package/es/shared/assets/img/emoji/emotion_120.png.js +1 -1
  161. package/es/shared/assets/img/emoji/emotion_121.png.js +1 -1
  162. package/es/shared/assets/img/emoji/emotion_122.png.js +1 -1
  163. package/es/shared/assets/img/emoji/emotion_123.png.js +1 -1
  164. package/es/shared/assets/img/emoji/emotion_124.png.js +1 -1
  165. package/es/shared/assets/img/emoji/emotion_125.png.js +1 -1
  166. package/es/shared/assets/img/emoji/emotion_126.png.js +1 -1
  167. package/es/shared/assets/img/emoji/emotion_127.png.js +1 -1
  168. package/es/shared/assets/img/emoji/emotion_128.png.js +1 -1
  169. package/es/shared/assets/img/emoji/emotion_129.png.js +1 -1
  170. package/es/shared/assets/img/emoji/emotion_130.png.js +1 -1
  171. package/es/shared/assets/img/emoji/emotion_131.png.js +1 -1
  172. package/es/shared/assets/img/emoji/emotion_132.png.js +1 -1
  173. package/es/shared/assets/img/emoji/emotion_133.png.js +1 -1
  174. package/es/shared/assets/img/emoji/emotion_134.png.js +1 -1
  175. package/es/shared/assets/img/emoji/emotion_135.png.js +1 -1
  176. package/es/shared/assets/img/emoji/emotion_136.png.js +1 -1
  177. package/es/shared/assets/img/emoji/emotion_137.png.js +1 -1
  178. package/es/shared/assets/img/emoji/emotion_138.png.js +1 -1
  179. package/es/shared/assets/img/emoji/emotion_139.png.js +1 -1
  180. package/es/shared/assets/img/emoji/emotion_140.png.js +1 -1
  181. package/es/shared/assets/img/emoji/emotion_141.png.js +1 -1
  182. package/es/shared/assets/img/emoji/emotion_142.png.js +1 -1
  183. package/es/shared/assets/img/emoji/emotion_143.png.js +1 -1
  184. package/es/shared/assets/img/emoji/emotion_144.png.js +1 -1
  185. package/es/shared/assets/img/emoji/emotion_145.png.js +1 -1
  186. package/es/shared/assets/img/emoji/emotion_146.png.js +1 -1
  187. package/es/shared/assets/img/emoji/emotion_147.png.js +1 -1
  188. package/es/shared/assets/img/emoji/emotion_148.png.js +1 -1
  189. package/es/shared/assets/img/emoji/emotion_149.png.js +1 -1
  190. package/es/shared/assets/img/emoji/emotion_150.png.js +1 -1
  191. package/es/shared/assets/img/emoji/emotion_151.png.js +1 -1
  192. package/es/shared/assets/img/emoji/emotion_152.png.js +1 -1
  193. package/es/shared/assets/img/emoji/emotion_153.png.js +1 -1
  194. package/es/shared/assets/img/emoji/emotion_154.png.js +1 -1
  195. package/es/shared/assets/img/emoji/emotion_155.png.js +1 -1
  196. package/es/shared/assets/img/emoji/emotion_156.png.js +1 -1
  197. package/es/shared/assets/img/emoji/emotion_157.png.js +1 -1
  198. package/es/shared/assets/img/emoji/emotion_158.png.js +1 -1
  199. package/es/shared/assets/img/emoji/emotion_159.png.js +1 -1
  200. package/es/shared/assets/img/emoji/emotion_160.png.js +1 -1
  201. package/es/shared/assets/img/emoji/emotion_161.png.js +1 -1
  202. package/es/shared/assets/img/emoji/emotion_162.png.js +1 -1
  203. package/es/shared/assets/img/emoji/emotion_163.png.js +1 -1
  204. package/es/shared/assets/img/emoji/emotion_164.png.js +1 -1
  205. package/es/shared/assets/img/emoji/emotion_165.png.js +1 -1
  206. package/es/shared/assets/img/emoji/emotion_166.png.js +1 -1
  207. package/es/shared/assets/img/emoji/emotion_167.png.js +1 -1
  208. package/es/shared/assets/img/failure.png.js +1 -1
  209. package/es/shared/assets/img/no-permission.png.js +1 -1
  210. package/es/shared/assets/img/nodata.png.js +1 -1
  211. package/es/shared/assets/img/notfound.png.js +1 -1
  212. package/es/shared/assets/img/qr.png.js +1 -1
  213. package/es/shared/assets/img/success.png.js +1 -1
  214. package/es/shared/assets/img/table_style_2.png.js +1 -1
  215. package/es/shared/assets/img/tooth/l-b-1.png.js +1 -1
  216. package/es/shared/assets/img/tooth/l-b-2.png.js +1 -1
  217. package/es/shared/assets/img/tooth/l-b-3.png.js +1 -1
  218. package/es/shared/assets/img/tooth/l-b-4.png.js +1 -1
  219. package/es/shared/assets/img/tooth/l-b-5.png.js +1 -1
  220. package/es/shared/assets/img/tooth/l-b-6.png.js +1 -1
  221. package/es/shared/assets/img/tooth/l-b-7.png.js +1 -1
  222. package/es/shared/assets/img/tooth/l-b-8.png.js +1 -1
  223. package/es/shared/assets/img/tooth/l-t-1.png.js +1 -1
  224. package/es/shared/assets/img/tooth/l-t-2.png.js +1 -1
  225. package/es/shared/assets/img/tooth/l-t-3.png.js +1 -1
  226. package/es/shared/assets/img/tooth/l-t-4.png.js +1 -1
  227. package/es/shared/assets/img/tooth/l-t-5.png.js +1 -1
  228. package/es/shared/assets/img/tooth/l-t-6.png.js +1 -1
  229. package/es/shared/assets/img/tooth/l-t-7.png.js +1 -1
  230. package/es/shared/assets/img/tooth/l-t-8.png.js +1 -1
  231. package/es/shared/assets/img/tooth/r-b-1.png.js +1 -1
  232. package/es/shared/assets/img/tooth/r-b-2.png.js +1 -1
  233. package/es/shared/assets/img/tooth/r-b-3.png.js +1 -1
  234. package/es/shared/assets/img/tooth/r-b-4.png.js +1 -1
  235. package/es/shared/assets/img/tooth/r-b-5.png.js +1 -1
  236. package/es/shared/assets/img/tooth/r-b-6.png.js +1 -1
  237. package/es/shared/assets/img/tooth/r-b-7.png.js +1 -1
  238. package/es/shared/assets/img/tooth/r-b-8.png.js +1 -1
  239. package/es/shared/assets/img/tooth/r-t-1.png.js +1 -1
  240. package/es/shared/assets/img/tooth/r-t-2.png.js +1 -1
  241. package/es/shared/assets/img/tooth/r-t-3.png.js +1 -1
  242. package/es/shared/assets/img/tooth/r-t-4.png.js +1 -1
  243. package/es/shared/assets/img/tooth/r-t-5.png.js +1 -1
  244. package/es/shared/assets/img/tooth/r-t-6.png.js +1 -1
  245. package/es/shared/assets/img/tooth/r-t-7.png.js +1 -1
  246. package/es/shared/assets/img/tooth/r-t-8.png.js +1 -1
  247. package/es/shared/assets/img/video.png.js +1 -1
  248. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  249. package/es/shared/assets/img/xb_big.png.js +1 -1
  250. package/es/shared/assets/img/xb_small.png.js +1 -1
  251. package/es/shared/package.json.js +1 -1
  252. package/package.json +2 -2
  253. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  254. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  255. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  256. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  257. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  258. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  259. 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,ref as t,watch as n,withDirectives as s,openBlock as i,createElementBlock as o,normalizeStyle as r,unref as a,createElementVNode as c,toDisplayString as l,createVNode as u,createCommentVNode as d,withCtx as f,Fragment as p,renderList as m,createBlock as g,createTextVNode as v,vShow as h}from"vue";import{NIcon as y,NPopover as M,NTooltip as k,NUpload as x,NUploadTrigger as C,NButton as T}from"naive-ui";import{format as b}from"date-fns";import{useState as w}from"../hooks/useState.js";import{useSession as E}from"../hooks/useSession.js";import{images as I,alt as _}from"../utils/emoji.js";import{MESSAGE_TYPE as R}from"../constants/index.js";import{uploadFileApi as j}from"../api/index.js";import{CloseCircleOutline as L}from"@vicons/ionicons5";import{cloneDeep as S}from"lodash-es";import{simplifyMessage as F}from"../utils/index.js";const H={key:0,class:"reference-content-box"},K={class:"reference-content"},D=["innerHTML"],N={class:"tool-box"},J=c("span",null,[c("i",{class:"chat--iconfont chat--icon-face"})],-1),O={class:"emoji-box"},A=c("span",null,"默认表情",-1),G={class:"list-box"},U=["onClick"],X=["src"],z=[c("i",{class:"chat--iconfont chat--icon-good"},null,-1)],B=["onClick"],q=[c("i",{class:"chat--iconfont chat--icon-image"},null,-1)],P=["onClick"],Q=[c("i",{class:"chat--iconfont chat--icon-folder"},null,-1)],V={class:"btn-box"},W=c("span",{class:"tip"},"Enter 发送, Shift + Enter 换行",-1);var Y=e({__name:"ChatFooter",setup(e){const Y=t(),Z=t(""),{state:$,stompClient:ee}=w(),{setCurrentSessionItem:te}=E($),ne=t(!1);function se(e){["Enter"].includes(e.key)&&(function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e)||(e.preventDefault(),re()))}function ie(){var e,t;Z.value=(null==(t=null==(e=Y.value)?void 0:e.innerText)?void 0:t.trim())||""}async function oe(e,t){const{file:n,name:s}=e.file,i=new FormData;i.append("sender",$.userInfo.id),i.append("file",n);const o=await j(i);if(!o)return console.log("上传失败");ae({chatMessageType:t,msg:t===R.FILE?s:o,url:o})}function re(){if(!(Z.value.length>2e3))return Z.value?void ae({msg:Z.value}):console.log("请输入内容");console.log("请控制在2000字以内")}async function ae(e){const{chatMessageType:t=R.TEXT,msg:n,url:s}=e,i={msg:n,chatMessageType:t};t===R.FILE&&(i.fileUrl=s),[R.TEXT,R.BLEND].includes(t)&&(Y.value.innerHTML="",Z.value=""),$.currentReferenceMsg.id&&(i.referenceContent=S($.currentReferenceMsg),$.currentReferenceMsg.id="");const o=b(new Date,"yyyy-MM-dd HH:mm:ss");$.currentMsg={content:i,sender:$.userInfo.id,id:"",sendTime:o,sending:!0,fail:!1},$.isAppendMsg=!0,te({lastMessageSendTime:o,lastMessage:i,sortTime:o});try{ee.value.send("/app/chat/send",{},JSON.stringify({chatType:"SINGLE",content:i,receiver:$.currentSessionItem.receiver})),$.currentMsg={...$.currentMsg,fail:!1}}catch(e){$.currentMsg={...$.currentMsg,fail:!0}}finally{$.currentMsg={...$.currentMsg,sending:!1}}}return n((()=>$.currentReferenceMsg.id),(e=>{var t;e&&(null==(t=Y.value)||t.focus())})),(e,t)=>s((i(),o("section",{class:"chat-footer",style:r({cursor:a($).id?"default":"not-allowed"})},[a($).currentReferenceMsg.id?(i(),o("div",H,[c("div",K,[c("span",null,l(a($).currentReferenceMsg.senderName)+":",1),c("pre",{innerHTML:a(F)(a($).currentReferenceMsg.content)},null,8,D)]),u(a(y),{component:a(L),onClick:t[0]||(t[0]=()=>a($).currentReferenceMsg.id="")},null,8,["component"])])):d("v-if",!0),c("div",N,[u(a(M),{show:ne.value,"onUpdate:show":t[1]||(t[1]=e=>ne.value=e),placement:"top",trigger:"click","show-arrow":!1,"display-directive":"show",delay:0},{trigger:f((()=>[J])),default:f((()=>[c("div",O,[d(' <span>最近使用</span>\n\t\t\t\t\t<div class="list-box">\n\t\t\t\t\t\t<template v-for="(img, index) in images" :key="index">\n\t\t\t\t\t\t\t<i>\n\t\t\t\t\t\t\t\t<img :src="img" />\n\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</div> '),A,c("div",G,[(i(!0),o(p,null,m(a(I),((e,t)=>(i(),o(p,{key:t},[t>0?(i(),g(a(k),{key:0,"show-arrow":!1,trigger:"hover"},{trigger:f((()=>[c("i",{onClick:()=>function(e){ne.value=!1,ae({chatMessageType:R.EMOJI,msg:e})}(t)},[c("img",{src:e},null,8,X)],8,U)])),default:f((()=>[v(" "+l(a(_)[t-1]||"微笑"),1)])),_:2},1024)):d("v-if",!0)],64)))),128))])])])),_:1},8,["show"]),c("span",{onClick:t[2]||(t[2]=()=>ae({chatMessageType:a(R).EMOJI,msg:0}))},z),u(a(x),{abstract:"",multiple:"",accept:"image/*",onChange:t[3]||(t[3]=e=>oe(e,a(R).IMAGE))},{default:f((()=>[u(a(C),{abstract:""},{default:f((({handleClick:e})=>[c("span",{onClick:e},q,8,B)])),_:1})])),_:1}),u(a(x),{abstract:"",multiple:"",accept:"video/*,.pdf,.doc.docx,,.zip,.xlsx,.txt",onChange:t[4]||(t[4]=e=>oe(e,a(R).FILE))},{default:f((()=>[u(a(C),{abstract:""},{default:f((({handleClick:e})=>[c("span",{onClick:e},Q,8,P)])),_:1})])),_:1})]),s(c("div",{ref_key:"inputRef",ref:Y,class:"input-box",contenteditable:"",onKeydown:se,onInput:ie},null,544),[[h,a($).id]]),c("div",V,[W,u(a(T),{type:"primary",round:"",disabled:!Z.value,onClick:re},{default:f((()=>[v("发送")])),_:1},8,["disabled"])])],4)),[[h,a($).id]])}});export{Y as default};
1
+ import{defineComponent as e,ref as t,watch as n,withDirectives as s,openBlock as i,createElementBlock as r,normalizeStyle as o,unref as a,createElementVNode as c,toDisplayString as l,createVNode as u,createCommentVNode as d,withCtx as f,Fragment as p,renderList as m,createBlock as g,createTextVNode as v,vShow as h}from"vue";import{NIcon as y,NPopover as M,NTooltip as k,NUpload as x,NUploadTrigger as C,NButton as T}from"naive-ui";import{format as b}from"date-fns";import{useState as w}from"../hooks/useState.js";import{useSession as E}from"../hooks/useSession.js";import{images as I,alt as _}from"../utils/emoji.js";import{MESSAGE_TYPE as R}from"../constants/index.js";import{uploadFileApi as j}from"../api/index.js";import{CloseCircleOutline as L}from"@vicons/ionicons5";import{cloneDeep as S}from"lodash-es";import{simplifyMessage as F}from"../utils/index.js";const H={key:0,class:"reference-content-box"},K={class:"reference-content"},D=["innerHTML"],N={class:"tool-box"},J=c("span",null,[c("i",{class:"chat--iconfont chat--icon-face"})],-1),O={class:"emoji-box"},A=c("span",null,"默认表情",-1),G={class:"list-box"},U=["onClick"],X=["src"],z=[c("i",{class:"chat--iconfont chat--icon-good"},null,-1)],B=["onClick"],q=[c("i",{class:"chat--iconfont chat--icon-image"},null,-1)],P=["onClick"],Q=[c("i",{class:"chat--iconfont chat--icon-folder"},null,-1)],V={class:"btn-box"},W=c("span",{class:"tip"},"Enter 发送, Shift + Enter 换行",-1);var Y=e({__name:"ChatFooter",setup(e){const Y=t(),Z=t(""),{state:$,stompClient:ee}=w(),{setCurrentSessionItem:te}=E($),ne=t(!1);function se(e){["Enter"].includes(e.key)&&(function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e)||(e.preventDefault(),oe()))}function ie(){var e,t;Z.value=(null==(t=null==(e=Y.value)?void 0:e.innerText)?void 0:t.trim())||""}async function re(e,t){const{file:n,name:s}=e.file,i=new FormData;i.append("sender",$.userInfo.id),i.append("file",n);const r=await j(i);if(!r)return console.log("上传失败");ae({chatMessageType:t,msg:t===R.FILE?s:r,url:r})}function oe(){if(!(Z.value.length>2e3))return Z.value?void ae({msg:Z.value}):console.log("请输入内容");console.log("请控制在2000字以内")}async function ae(e){const{chatMessageType:t=R.TEXT,msg:n,url:s}=e,i={msg:n,chatMessageType:t};t===R.FILE&&(i.fileUrl=s),[R.TEXT,R.BLEND].includes(t)&&(Y.value.innerHTML="",Z.value=""),$.currentReferenceMsg.id&&(i.referenceContent=S($.currentReferenceMsg),$.currentReferenceMsg.id="");const r=b(new Date,"yyyy-MM-dd HH:mm:ss");$.currentMsg={content:i,sender:$.userInfo.id,id:"",sendTime:r,sending:!0,fail:!1},$.isAppendMsg=!0,te({lastMessageSendTime:r,lastMessage:i,sortTime:r});try{ee.value.send("/app/chat/send",{},JSON.stringify({chatType:"SINGLE",content:i,receiver:$.currentSessionItem.receiver})),$.currentMsg={...$.currentMsg,fail:!1}}catch(e){$.currentMsg={...$.currentMsg,fail:!0}}finally{$.currentMsg={...$.currentMsg,sending:!1}}}return n((()=>$.currentReferenceMsg.id),(e=>{var t;e&&(null==(t=Y.value)||t.focus())})),(e,t)=>s((i(),r("section",{class:"chat-footer",style:o({cursor:a($).id?"default":"not-allowed"})},[a($).currentReferenceMsg.id?(i(),r("div",H,[c("div",K,[c("span",null,l(a($).currentReferenceMsg.senderName)+":",1),c("pre",{innerHTML:a(F)(a($).currentReferenceMsg.content)},null,8,D)]),u(a(y),{component:a(L),onClick:t[0]||(t[0]=()=>a($).currentReferenceMsg.id="")},null,8,["component"])])):d("v-if",!0),c("div",N,[u(a(M),{show:ne.value,"onUpdate:show":t[1]||(t[1]=e=>ne.value=e),placement:"top",trigger:"click","show-arrow":!1,"display-directive":"show",delay:0},{trigger:f((()=>[J])),default:f((()=>[c("div",O,[d(' <span>最近使用</span>\r\n\t\t\t\t\t<div class="list-box">\r\n\t\t\t\t\t\t<template v-for="(img, index) in images" :key="index">\r\n\t\t\t\t\t\t\t<i>\r\n\t\t\t\t\t\t\t\t<img :src="img" />\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</div> '),A,c("div",G,[(i(!0),r(p,null,m(a(I),((e,t)=>(i(),r(p,{key:t},[t>0?(i(),g(a(k),{key:0,"show-arrow":!1,trigger:"hover"},{trigger:f((()=>[c("i",{onClick:()=>function(e){ne.value=!1,ae({chatMessageType:R.EMOJI,msg:e})}(t)},[c("img",{src:e},null,8,X)],8,U)])),default:f((()=>[v(" "+l(a(_)[t-1]||"微笑"),1)])),_:2},1024)):d("v-if",!0)],64)))),128))])])])),_:1},8,["show"]),c("span",{onClick:t[2]||(t[2]=()=>ae({chatMessageType:a(R).EMOJI,msg:0}))},z),u(a(x),{abstract:"",multiple:"",accept:"image/*",onChange:t[3]||(t[3]=e=>re(e,a(R).IMAGE))},{default:f((()=>[u(a(C),{abstract:""},{default:f((({handleClick:e})=>[c("span",{onClick:e},q,8,B)])),_:1})])),_:1}),u(a(x),{abstract:"",multiple:"",accept:"video/*,.pdf,.doc.docx,,.zip,.xlsx,.txt",onChange:t[4]||(t[4]=e=>re(e,a(R).FILE))},{default:f((()=>[u(a(C),{abstract:""},{default:f((({handleClick:e})=>[c("span",{onClick:e},Q,8,P)])),_:1})])),_:1})]),s(c("div",{ref_key:"inputRef",ref:Y,class:"input-box",contenteditable:"",onKeydown:se,onInput:ie},null,544),[[h,a($).id]]),c("div",V,[W,u(a(T),{type:"primary",round:"",disabled:!Z.value,onClick:oe},{default:f((()=>[v("发送")])),_:1},8,["disabled"])])],4)),[[h,a($).id]])}});export{Y as default};
@@ -4186,6 +4186,7 @@ export declare const CallbackMaps: Map<string, {
4186
4186
  pagerScroll?: {
4187
4187
  enable?: boolean | undefined;
4188
4188
  capacity?: number | undefined;
4189
+ loading?: boolean | undefined;
4189
4190
  } | undefined;
4190
4191
  stickyFixedConfig?: {
4191
4192
  enable?: boolean | undefined;
@@ -7758,6 +7759,7 @@ export declare const CallbackMaps: Map<string, {
7758
7759
  pagerScroll?: {
7759
7760
  enable?: boolean | undefined;
7760
7761
  capacity?: number | undefined;
7762
+ loading?: boolean | undefined;
7761
7763
  } | undefined;
7762
7764
  stickyFixedConfig?: {
7763
7765
  enable?: boolean | undefined;
@@ -175,6 +175,9 @@ declare const _default: import("vue").DefineComponent<{
175
175
  modelValue: unknown[];
176
176
  componentData: Record<string, any>;
177
177
  } & {
178
+ /**
179
+ * 改变弹窗大小
180
+ */
178
181
  itemKey?: string | Function | undefined;
179
182
  }>, {
180
183
  move: Function;
@@ -699,6 +699,9 @@ declare const _default: import("vue").DefineComponent<{
699
699
  handleInitConditions: () => Promise<void>;
700
700
  validate: () => Promise<unknown>;
701
701
  saveAdd: () => void;
702
+ /**
703
+ * 改变展示方式
704
+ */
702
705
  cancelSaveAdd: () => void;
703
706
  checkActionList: () => boolean;
704
707
  NSpin: any;
@@ -1449,9 +1452,6 @@ declare const _default: import("vue").DefineComponent<{
1449
1452
  isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | 0;
1450
1453
  };
1451
1454
  NSelect: any;
1452
- /**
1453
- * 改变展示方式
1454
- */
1455
1455
  NPopover: any;
1456
1456
  CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
1457
1457
  updateUnchangedValue: {
@@ -127,6 +127,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
127
127
  beforeMove: {
128
128
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
129
129
  };
130
+ requiredReminderConfig: {
131
+ type: import("vue").PropType<Partial<Partial<{
132
+ enabled: boolean;
133
+ content: string;
134
+ }>>>;
135
+ };
130
136
  }, {
131
137
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
132
138
  maxHeight: {
@@ -254,6 +260,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
254
260
  beforeMove: {
255
261
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
256
262
  };
263
+ requiredReminderConfig: {
264
+ type: import("vue").PropType<Partial<Partial<{
265
+ enabled: boolean;
266
+ content: string;
267
+ }>>>;
268
+ };
257
269
  }>> & {
258
270
  onAddItem?: ((...args: any[]) => any) | undefined;
259
271
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -1803,6 +1815,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1803
1815
  value?: any;
1804
1816
  describe?: string | undefined;
1805
1817
  } | undefined;
1818
+ reminderConfig?: {
1819
+ enabled?: boolean | undefined;
1820
+ content?: string | undefined;
1821
+ } | undefined;
1806
1822
  date_format?: string | undefined;
1807
1823
  step_length?: string | number | undefined;
1808
1824
  urlConfig?: {
@@ -3570,6 +3586,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3570
3586
  value?: any;
3571
3587
  describe?: string | undefined;
3572
3588
  } | undefined;
3589
+ reminderConfig?: {
3590
+ enabled?: boolean | undefined;
3591
+ content?: string | undefined;
3592
+ } | undefined;
3573
3593
  date_format?: string | undefined;
3574
3594
  step_length?: string | number | undefined;
3575
3595
  urlConfig?: {
@@ -5310,6 +5330,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
5310
5330
  value?: any;
5311
5331
  describe?: string | undefined;
5312
5332
  } | undefined;
5333
+ reminderConfig?: {
5334
+ enabled?: boolean | undefined;
5335
+ content?: string | undefined;
5336
+ } | undefined;
5313
5337
  date_format?: string | undefined;
5314
5338
  step_length?: string | number | undefined;
5315
5339
  urlConfig?: {
@@ -8330,6 +8354,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
8330
8354
  beforeMove: {
8331
8355
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
8332
8356
  };
8357
+ requiredReminderConfig: {
8358
+ type: import("vue").PropType<Partial<Partial<{
8359
+ enabled: boolean;
8360
+ content: string;
8361
+ }>>>;
8362
+ };
8333
8363
  }>> & {
8334
8364
  onAddItem?: ((...args: any[]) => any) | undefined;
8335
8365
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -130,6 +130,12 @@ declare const _default: import("vue").DefineComponent<{
130
130
  beforeMove: {
131
131
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
132
132
  };
133
+ requiredReminderConfig: {
134
+ type: PropType<Partial<Partial<{
135
+ enabled: boolean;
136
+ content: string;
137
+ }>>>;
138
+ };
133
139
  }, {
134
140
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
135
141
  maxHeight: {
@@ -257,6 +263,12 @@ declare const _default: import("vue").DefineComponent<{
257
263
  beforeMove: {
258
264
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
259
265
  };
266
+ requiredReminderConfig: {
267
+ type: PropType<Partial<Partial<{
268
+ enabled: boolean;
269
+ content: string;
270
+ }>>>;
271
+ };
260
272
  }>> & {
261
273
  onAddItem?: ((...args: any[]) => any) | undefined;
262
274
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -1806,6 +1818,10 @@ declare const _default: import("vue").DefineComponent<{
1806
1818
  value?: any;
1807
1819
  describe?: string | undefined;
1808
1820
  } | undefined;
1821
+ reminderConfig?: {
1822
+ enabled?: boolean | undefined;
1823
+ content?: string | undefined;
1824
+ } | undefined;
1809
1825
  date_format?: string | undefined;
1810
1826
  step_length?: string | number | undefined;
1811
1827
  urlConfig?: {
@@ -3573,6 +3589,10 @@ declare const _default: import("vue").DefineComponent<{
3573
3589
  value?: any;
3574
3590
  describe?: string | undefined;
3575
3591
  } | undefined;
3592
+ reminderConfig?: {
3593
+ enabled?: boolean | undefined;
3594
+ content?: string | undefined;
3595
+ } | undefined;
3576
3596
  date_format?: string | undefined;
3577
3597
  step_length?: string | number | undefined;
3578
3598
  urlConfig?: {
@@ -5313,6 +5333,10 @@ declare const _default: import("vue").DefineComponent<{
5313
5333
  value?: any;
5314
5334
  describe?: string | undefined;
5315
5335
  } | undefined;
5336
+ reminderConfig?: {
5337
+ enabled?: boolean | undefined;
5338
+ content?: string | undefined;
5339
+ } | undefined;
5316
5340
  date_format?: string | undefined;
5317
5341
  step_length?: string | number | undefined;
5318
5342
  urlConfig?: {
@@ -8333,6 +8357,12 @@ declare const _default: import("vue").DefineComponent<{
8333
8357
  beforeMove: {
8334
8358
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
8335
8359
  };
8360
+ requiredReminderConfig: {
8361
+ type: PropType<Partial<Partial<{
8362
+ enabled: boolean;
8363
+ content: string;
8364
+ }>>>;
8365
+ };
8336
8366
  }>> & {
8337
8367
  onAddItem?: ((...args: any[]) => any) | undefined;
8338
8368
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as g,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as C}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as L}from"naive-ui";import{useVersion as k}from"../../../shared/hooks/useVersion.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import b from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import M from"./components/FormConfigEdit.vue.js";import w from"./components/FormConfigEventSetting.vue.js";import R from"./components/FormConfigMaterialItem.js";import{useDataNormalize as E}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as I,InjectionFormConfigEmit as D,InjectionFieldList as H,InjectionMaterialList as O,InjectionLowCodeReactions as S,InjectionActiveFieldItem as N,FORM_CONFIG_GROUP as U}from"./constants/index.js";import"./utils/index.js";import{useSortableConfig as A}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const B=["id"],T={class:"form-config__material"},P=m("header",{class:"form-config__materialHeader"},"物料区",-1),z={class:"form-config__displayWrapper"},W={class:"form-config__displayHeader"},q={class:"form-config__config"},G=m("header",{class:"form-config__configHeader"},"配置区",-1),J={class:"form-config__configContent"};var K=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:K,emit:Q}){const X=e;o(I,X),o(D,Q);const Y=x(),Z=h(),$=t([]);o(H,$);const ee=t([]);o(O,ee);const oe=t([]);function te(e){$.value.some((o=>o.key===e.key))||$.value.push(e)}o(S,oe);const re=(e,o)=>y(X.textFormatter)?X.textFormatter(e,o):o,ae=t();o(N,ae);const ie=t(),{transform:se,inverseTransform:le}=E(X),ne=r({get:()=>null,set(e){if(!e)return;const o=ue.value.find((o=>o.key===e));o&&(o.__extra=!0,ee.value.push(o),Q("addItem",o))}}),me=t([]),ue=r((()=>{if(!g(me.value))return[];const e=[];return C([...ee.value,...$.value],(o=>e.push(o.key))),me.value.filter((o=>!e.find((e=>e===o.key))))}));async function fe(){X.extraMaterialList&&!me.value.length&&(me.value=y(X.extraMaterialList)?await X.extraMaterialList():X.extraMaterialList)}return K({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):t.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(_(a(e))))),$.value=se(t),ee.value=r,oe.value=o,ae.value=void 0},validate(){var e;return null==(e=ie.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:le(_(a($.value)),e,{show:!0}),materialList:le(_(a(ee.value)),e,{show:!1}),lowCodeReactions:_(a(oe.value))}),clearExtraList(){me.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(Z)},id:n(Y)},n(k)()),[m("section",T,[P,u(n(F),l(A({fieldList:$,materialList:ee,hooks:{beforeMove:X.beforeMove}}),{class:"form-config__materialContent",modelValue:n(ee),"onUpdate:modelValue":t[0]||(t[0]=e=>f(ee)?ee.value=e:null)}),{item:d((({element:e})=>[u(n(R),{"form-config-item":e,"text-formatter":re,"material-List":n(ee)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),c(n(j),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(ne),"onUpdate:value":t[1]||(t[1]=e=>f(ne)?ne.value=e:null),placeholder:"请选择额外物料",options:n(ue),"label-field":"name","value-field":"key",onFocus:fe},null,8,["value","options"])):p("v-if",!0)]),m("section",z,[m("header",W,[v(" 布局区 "),u(n(L),null,{default:d((()=>[e.showLowCodeReactions?(i(),c(w,{key:0,modelValue:oe.value,"onUpdate:modelValue":t[2]||(t[2]=e=>oe.value=e),onValidateFailure:t[3]||(t[3]=e=>Q("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(b,{onSubmit:te})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":re,modelValue:n($),"onUpdate:modelValue":t[4]||(t[4]=e=>f($)?$.value=e:null)},null,8,["group","modelValue"])]),m("section",q,[G,m("section",J,[u(M,{ref_key:"formConfigEditRef",ref:ie,uuid:n(Y),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,B))}});export{K as default};
1
+ import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as g,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as C}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as j,NSpace as L}from"naive-ui";import{useVersion as k}from"../../../shared/hooks/useVersion.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import b from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import M from"./components/FormConfigEdit.vue.js";import R from"./components/FormConfigEventSetting.vue.js";import w from"./components/FormConfigMaterialItem.js";import{useDataNormalize as E}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as I,InjectionFormConfigEmit as D,InjectionFieldList as H,InjectionMaterialList as O,InjectionLowCodeReactions as S,InjectionActiveFieldItem as N,FORM_CONFIG_GROUP as U}from"./constants/index.js";import"./utils/index.js";import{useSortableConfig as A}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const B=["id"],T={class:"form-config__material"},P=m("header",{class:"form-config__materialHeader"},"物料区",-1),q={class:"form-config__displayWrapper"},z={class:"form-config__displayHeader"},W={class:"form-config__config"},G=m("header",{class:"form-config__configHeader"},"配置区",-1),J={class:"form-config__configContent"};var K=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function},requiredReminderConfig:{type:Object}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:K,emit:Q}){const X=e;o(I,X),o(D,Q);const Y=x(),Z=h(),$=t([]);o(H,$);const ee=t([]);o(O,ee);const oe=t([]);function te(e){$.value.some((o=>o.key===e.key))||$.value.push(e)}o(S,oe);const re=(e,o)=>y(X.textFormatter)?X.textFormatter(e,o):o,ae=t();o(N,ae);const ie=t(),{transform:se,inverseTransform:le}=E(X),ne=r({get:()=>null,set(e){if(!e)return;const o=ue.value.find((o=>o.key===e));o&&(o.__extra=!0,ee.value.push(o),Q("addItem",o))}}),me=t([]),ue=r((()=>{if(!g(me.value))return[];const e=[];return C([...ee.value,...$.value],(o=>e.push(o.key))),me.value.filter((o=>!e.find((e=>e===o.key))))}));async function fe(){X.extraMaterialList&&!me.value.length&&(me.value=y(X.extraMaterialList)?await X.extraMaterialList():X.extraMaterialList)}return K({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):t.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(_(a(e))))),$.value=se(t),ee.value=r,oe.value=o,ae.value=void 0},validate(){var e;return null==(e=ie.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:le(_(a($.value)),e,{show:!0}),materialList:le(_(a(ee.value)),e,{show:!1}),lowCodeReactions:_(a(oe.value))}),clearExtraList(){me.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(Z)},id:n(Y)},n(k)()),[m("section",T,[P,u(n(F),l(A({fieldList:$,materialList:ee,hooks:{beforeMove:X.beforeMove}}),{class:"form-config__materialContent",modelValue:n(ee),"onUpdate:modelValue":t[0]||(t[0]=e=>f(ee)?ee.value=e:null)}),{item:d((({element:e})=>[u(n(w),{"form-config-item":e,"text-formatter":re,"material-List":n(ee)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),c(n(j),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(ne),"onUpdate:value":t[1]||(t[1]=e=>f(ne)?ne.value=e:null),placeholder:"请选择额外物料",options:n(ue),"label-field":"name","value-field":"key",onFocus:fe},null,8,["value","options"])):p("v-if",!0)]),m("section",q,[m("header",z,[v(" 布局区 "),u(n(L),null,{default:d((()=>[e.showLowCodeReactions?(i(),c(R,{key:0,modelValue:oe.value,"onUpdate:modelValue":t[2]||(t[2]=e=>oe.value=e),onValidateFailure:t[3]||(t[3]=e=>Q("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(b,{onSubmit:te})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":re,modelValue:n($),"onUpdate:modelValue":t[4]||(t[4]=e=>f($)?$.value=e:null)},null,8,["group","modelValue"])]),m("section",W,[G,m("section",J,[u(M,{ref_key:"formConfigEditRef",ref:ie,uuid:n(Y),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,B))}});export{K as default};
@@ -326,6 +326,10 @@ declare const _default: import("vue").DefineComponent<{
326
326
  value?: any;
327
327
  describe?: string | undefined;
328
328
  } | undefined;
329
+ reminderConfig?: {
330
+ enabled?: boolean | undefined;
331
+ content?: string | undefined;
332
+ } | undefined;
329
333
  date_format?: string | undefined;
330
334
  step_length?: string | number | undefined;
331
335
  urlConfig?: {
@@ -2093,6 +2097,10 @@ declare const _default: import("vue").DefineComponent<{
2093
2097
  value?: any;
2094
2098
  describe?: string | undefined;
2095
2099
  } | undefined;
2100
+ reminderConfig?: {
2101
+ enabled?: boolean | undefined;
2102
+ content?: string | undefined;
2103
+ } | undefined;
2096
2104
  date_format?: string | undefined;
2097
2105
  step_length?: string | number | undefined;
2098
2106
  urlConfig?: {
@@ -3833,6 +3841,10 @@ declare const _default: import("vue").DefineComponent<{
3833
3841
  value?: any;
3834
3842
  describe?: string | undefined;
3835
3843
  } | undefined;
3844
+ reminderConfig?: {
3845
+ enabled?: boolean | undefined;
3846
+ content?: string | undefined;
3847
+ } | undefined;
3836
3848
  date_format?: string | undefined;
3837
3849
  step_length?: string | number | undefined;
3838
3850
  urlConfig?: {
@@ -1 +1 @@
1
- import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as _,isEditOptionConfig as o,isNullOptionConfig as m,isVisibleOptionConfig as s,rowsOptionConfig as n}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as r}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=r();function E(){const r=new Map([[l.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=d.call(Object.assign({},null==l?void 0:l.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,..._()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...o()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",...m()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...s()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...n()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=r.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const p=new Map([["LINE_BAR",[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],["NEWLINE",[l.KEY,l.NAME]],...["COMPLEX","COMBINATION"].map((e=>[e,[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM]]))]),h=[l.KEY,l.NAME,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED,l.SHOW];return{generateFieldListByKeys:E,generateFieldListByFormConfigItem:function(e,t){var i;const a=p.get(e.type)||h;return"TEXTAREA"===(t?t.html_type:null==(i=e.originalSetting)?void 0:i.html_type)&&a.splice(3,0,l.ROWS),E(a,e,t)}}}export{E as useConfigurationField};
1
+ import{omit as e,pick as l}from"lodash-es";import{InjectionFormConfigProps as t,EditAbleField as i,widgetWidthOptionConfig as a,isShowOptionConfig as o,isNotFoldOptionConfig as _,isEditOptionConfig as n,isNullOptionConfig as m,isVisibleOptionConfig as r,rowsOptionConfig as s}from"../constants/index.js";import"../../../form-render/index.js";import{inject as d}from"vue";import{useFieldNormalize as E}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:p}=E();function h(){const E=d(t),h=new Map([[i.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[i.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[i.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[i.DEFAULT_VALUE,(t,i)=>{const a=p.call(Object.assign({},null==t?void 0:t.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...l(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[i.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...a()})],[i.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[i.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...o()})],[i.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,..._()})],[i.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...n()})],[i.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",reminderConfig:{enabled:!1,...null==E?void 0:E.requiredReminderConfig},...m()})],[i.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...r()})],[i.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...s()})]]);function T(e,l,t){return e.map((e=>{var i,a;return{...null!=(a=null==(i=h.get(e))?void 0:i(l,t))?a:{},val_key:e}}))}const u=new Map([["LINE_BAR",[i.KEY,i.NAME,i.LAYOUT_WIDTH_ENUM,i.NOTES,i.DEFAULT_EXPAND,i.FOLD]],["NEWLINE",[i.KEY,i.NAME]],...["COMPLEX","COMBINATION"].map((e=>[e,[i.KEY,i.NAME,i.LAYOUT_WIDTH_ENUM]]))]),y=[i.KEY,i.NAME,i.DEFAULT_VALUE,i.LAYOUT_WIDTH_ENUM,i.DESC,i.NOTES,i.EDITABLE,i.REQUIRED,i.SHOW];return{generateFieldListByKeys:T,generateFieldListByFormConfigItem:function(e,l){var t;const a=u.get(e.type)||y;return"TEXTAREA"===(l?l.html_type:null==(t=e.originalSetting)?void 0:t.html_type)&&a.splice(3,0,i.ROWS),T(a,e,l)}}}export{h as useConfigurationField};
@@ -62,4 +62,8 @@ interface FieldVisitorContext {
62
62
  replace(f: FieldItem): void;
63
63
  }
64
64
  export declare type FormConfigVisitor = Record<string, (context: FieldVisitorContext) => void>;
65
+ export declare type FormConfigReminderConfig = Partial<{
66
+ enabled: boolean;
67
+ content: string;
68
+ }>;
65
69
  export {};
@@ -16,7 +16,7 @@ export declare const SWITCH: import("vue").DefineComponent<{
16
16
  default: string;
17
17
  };
18
18
  onChange: {};
19
- }, () => JSX.Element | JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ }, () => JSX.Element | (JSX.Element | null)[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
20
  value: {};
21
21
  openDescription: {
22
22
  type: PropType<Description>;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as r,mergeProps as l,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as s}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as p,assignValueBindKey as v}from"../../utils/schema.js";import{connect as c,mapProps as d}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=c(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:p}){const v=o(),c=t(!1),{fieldKey:d}=m(),h=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),f=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),y=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},w=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},j=i({get:()=>e.value===h.value,set(o){if("SWITCH"!==e.showMode||"required"!==d.value||o)return p("update:value",o?h.value:f.value);c.value=!0}});function k(){p("update:value",f.value)}return()=>"SWITCH"===e.showMode?[r(n,l({value:j.value,"onUpdate:value":e=>j.value=e},v),{checked:y,unchecked:w}),r(a,{show:c.value,"onUpdate:show":e=>c.value=e,"display-directive":"show",preset:"dialog",title:"确认",content:"是否确认由必填改为非必填?","positive-text":"确认","negative-text":"取消",onPositiveClick:k},null)]:r(s,{checked:j.value,"onUpdate:checked":e=>j.value=e},{default:y})}}),d(p,v));export{h as SWITCH};
1
+ import{defineComponent as e,useAttrs as o,ref as l,computed as i,createVNode as r,mergeProps as t,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as v}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as d,assignValueBindKey as s}from"../../utils/schema.js";import{connect as p,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const f=p(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:d}){const s=o(),p=l(!1),{field:c,fieldKey:f}=m(),h=i((()=>{var e,o,l;return null==(l=null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.reminderConfig)?void 0:l.enabled})),y=i((()=>{var o,l;return null==(l=null==(o=e.openDescription)?void 0:o.value)||l})),g=i((()=>{var o,l;return null!=(l=null==(o=e.closeDescription)?void 0:o.value)&&l})),w=()=>{var o,l;return u(null!=(l=null==(o=e.openDescription)?void 0:o.describe)?l:"")},C=()=>{var o,l;return u(null!=(l=null==(o=e.closeDescription)?void 0:o.describe)?l:"")},j=i({get:()=>e.value===y.value,set(o){if(!h.value||"SWITCH"!==e.showMode||"required"!==f.value||o)return d("update:value",o?y.value:g.value);p.value=!0}});function k(){d("update:value",g.value)}return()=>{return"SWITCH"===e.showMode?[r(n,t({value:j.value,"onUpdate:value":e=>j.value=e},s),{checked:w,unchecked:C}),h.value?r(a,{show:p.value,"onUpdate:show":e=>p.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":"取消",content:null!=(u=null==(i=null==(l=null==(o=c.value.decoratorProps)?void 0:o.fieldItem)?void 0:l.reminderConfig)?void 0:i.content)?u:"是否确认由必填改为非必填?",onPositiveClick:k},null):null]:r(v,{checked:j.value,"onUpdate:checked":e=>j.value=e},{default:w});var o,l,i,u}}}),c(d,s));export{f as SWITCH};
@@ -103,6 +103,10 @@ export declare type FieldItem = {
103
103
  wordbook: LowCodeTypes.wordbook;
104
104
  open: LowCodeTypes.switchProperty;
105
105
  close: LowCodeTypes.switchProperty;
106
+ reminderConfig?: Partial<{
107
+ enabled: boolean;
108
+ content: string;
109
+ }>;
106
110
  date_format: string;
107
111
  step_length: string | number;
108
112
  urlConfig: UrlConfig;
@@ -3219,6 +3219,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
3219
3219
  pagerScroll?: {
3220
3220
  enable?: boolean | undefined;
3221
3221
  capacity?: number | undefined;
3222
+ loading?: boolean | undefined;
3222
3223
  } | undefined;
3223
3224
  stickyFixedConfig?: {
3224
3225
  enable?: boolean | undefined;
@@ -6791,6 +6792,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
6791
6792
  pagerScroll?: {
6792
6793
  enable?: boolean | undefined;
6793
6794
  capacity?: number | undefined;
6795
+ loading?: boolean | undefined;
6794
6796
  } | undefined;
6795
6797
  stickyFixedConfig?: {
6796
6798
  enable?: boolean | undefined;
@@ -3220,6 +3220,7 @@ declare const _default: import("vue").DefineComponent<{
3220
3220
  pagerScroll?: {
3221
3221
  enable?: boolean | undefined;
3222
3222
  capacity?: number | undefined;
3223
+ loading?: boolean | undefined;
3223
3224
  } | undefined;
3224
3225
  stickyFixedConfig?: {
3225
3226
  enable?: boolean | undefined;
@@ -6792,6 +6793,7 @@ declare const _default: import("vue").DefineComponent<{
6792
6793
  pagerScroll?: {
6793
6794
  enable?: boolean | undefined;
6794
6795
  capacity?: number | undefined;
6796
+ loading?: boolean | undefined;
6795
6797
  } | undefined;
6796
6798
  stickyFixedConfig?: {
6797
6799
  enable?: boolean | undefined;
@@ -1 +1 @@
1
- import{useThrottleFn as e}from"@vueuse/core";import{onBeforeUnmount as t}from"vue";import"../../../index.js";import{LOWEST_PRIORITY as o}from"../../constants/index.js";import{isPagerScrollEnable as a,scrollStateMap as l,pageCapacityCalc as r}from"./utils.js";import{defineTablePlugin as u}from"../../hooks/useTablePlugin.js";function i(){const i="pagerScrollPlugin";return u({name:i,apply(u){u.configHooks.config.tap(i,(e=>a(e)&&e.uuid?(e.scrollY={...e.scrollY,gt:0},e):e));u.eventHooks.onScroll.tap(i,e((async({$event:e},t,{$table:o,loading:r,$xeTable:u})=>{var i,n,s;if(!a(t)||!t.uuid)return;const c=null==(s=null==(n=null==(i=null==u?void 0:u.value)?void 0:i.getRefMaps().refTableBody)?void 0:n.value)?void 0:s.$el;if(c&&c.scrollHeight-c.scrollTop-c.clientHeight<3){const e=l.getItemFromUUID(t.uuid),{capacityInfo:a,currentPage:u=0}=e;if(!a)return;if(u<a.length-1){e.currentPage=u+1;try{r.value=!0,await(null==o?void 0:o.insertAt(a[u+1].pageData,-1))}finally{r.value=!1}}}}),300)),u.dataHooks.dataList.tap({name:i,stage:o},((e,t)=>{var o,u;if(!a(t)||!t.uuid)return e;const i=l.getItemFromUUID(t.uuid);return i.dataList=e,i.capacityInfo=r(e,t),i.currentPage=0,null!=(u=null==(o=i.capacityInfo[0])?void 0:o.pageData)?u:[]})),u.setupHooks.setup.tap(i,(e=>{t((()=>{e.value.uuid&&l.removeItemFromUUID(e.value.uuid)}))}))}})}export{i as pagerScrollPlugin};
1
+ import{useThrottleFn as e}from"@vueuse/core";import{promiseTimeout as t}from"@vueuse/shared";import{onBeforeUnmount as o}from"vue";import"../../../index.js";import{LOWEST_PRIORITY as a}from"../../constants/index.js";import{isPagerScrollEnable as l,scrollStateMap as r,pageCapacityCalc as i}from"./utils.js";import{defineTablePlugin as u}from"../../hooks/useTablePlugin.js";function n(){const n="pagerScrollPlugin";return u({name:n,apply(u){u.configHooks.config.tap(n,(e=>l(e)&&e.uuid?(e.scrollY={...e.scrollY,gt:0},e):e));u.eventHooks.onScroll.tap(n,e((async(e,o,{$table:a,loading:i,$xeTable:u})=>{var n,s,c;if(!l(o)||!o.uuid)return;const p=null==(c=null==(s=null==(n=null==u?void 0:u.value)?void 0:n.getRefMaps().refTableBody)?void 0:s.value)?void 0:c.$el;if(p&&p.scrollHeight-p.scrollTop-p.clientHeight<3){const e=r.getItemFromUUID(o.uuid),{capacityInfo:l,currentPage:u=0}=e;if(!l)return;if(u<l.length-1){e.currentPage=u+1;const r=()=>null==a?void 0:a.insertAt(l[u+1].pageData,-1);if(o.pagerScroll.loading)try{i.value=!0,await r(),await t(100)}finally{i.value=!1}else await r()}}}),300)),u.dataHooks.dataList.tap({name:n,stage:a},((e,t)=>{var o,a;if(!l(t)||!t.uuid)return e;const u=r.getItemFromUUID(t.uuid);return u.dataList=e,u.capacityInfo=i(e,t),u.currentPage=0,null!=(a=null==(o=u.capacityInfo[0])?void 0:o.pageData)?a:[]})),u.setupHooks.setup.tap(n,(e=>{o((()=>{e.value.uuid&&r.removeItemFromUUID(e.value.uuid)}))}))}})}export{n as pagerScrollPlugin};
@@ -92,6 +92,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
92
92
  pagerScroll: Partial<{
93
93
  enable: boolean;
94
94
  capacity: number;
95
+ loading: boolean;
95
96
  }>;
96
97
  stickyFixedConfig: Partial<{
97
98
  enable: boolean;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
1
+ import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};