cnhis-design-vue 3.2.5-beta.14 → 3.2.5-beta.15

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 (253) 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/classification/src/components/table-modal/index.vue.d.ts +3 -0
  4. package/es/components/classification/src/index.vue.d.ts +3 -3
  5. package/es/components/form-config/index.d.ts +5 -30
  6. package/es/components/form-config/src/FormConfig.vue.d.ts +5 -30
  7. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  8. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +5 -12
  9. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  10. package/es/components/form-config/src/types/index.d.ts +1 -0
  11. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  12. package/es/components/form-render/src/types/fieldItem.d.ts +1 -4
  13. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  14. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  15. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  16. package/es/components/shortcut-setter/index.d.ts +1 -4
  17. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -4
  18. package/es/env.d.ts +25 -25
  19. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  20. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  21. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  22. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  23. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  24. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  25. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  26. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  27. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  28. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  29. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  30. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  31. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  32. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  33. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  34. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  35. package/es/shared/assets/img/emoji/emotion_001.png.js +1 -1
  36. package/es/shared/assets/img/emoji/emotion_002.png.js +1 -1
  37. package/es/shared/assets/img/emoji/emotion_003.png.js +1 -1
  38. package/es/shared/assets/img/emoji/emotion_004.png.js +1 -1
  39. package/es/shared/assets/img/emoji/emotion_005.png.js +1 -1
  40. package/es/shared/assets/img/emoji/emotion_006.png.js +1 -1
  41. package/es/shared/assets/img/emoji/emotion_007.png.js +1 -1
  42. package/es/shared/assets/img/emoji/emotion_008.png.js +1 -1
  43. package/es/shared/assets/img/emoji/emotion_009.png.js +1 -1
  44. package/es/shared/assets/img/emoji/emotion_010.png.js +1 -1
  45. package/es/shared/assets/img/emoji/emotion_011.png.js +1 -1
  46. package/es/shared/assets/img/emoji/emotion_012.png.js +1 -1
  47. package/es/shared/assets/img/emoji/emotion_013.png.js +1 -1
  48. package/es/shared/assets/img/emoji/emotion_014.png.js +1 -1
  49. package/es/shared/assets/img/emoji/emotion_015.png.js +1 -1
  50. package/es/shared/assets/img/emoji/emotion_016.png.js +1 -1
  51. package/es/shared/assets/img/emoji/emotion_017.png.js +1 -1
  52. package/es/shared/assets/img/emoji/emotion_018.png.js +1 -1
  53. package/es/shared/assets/img/emoji/emotion_019.png.js +1 -1
  54. package/es/shared/assets/img/emoji/emotion_020.png.js +1 -1
  55. package/es/shared/assets/img/emoji/emotion_021.png.js +1 -1
  56. package/es/shared/assets/img/emoji/emotion_022.png.js +1 -1
  57. package/es/shared/assets/img/emoji/emotion_023.png.js +1 -1
  58. package/es/shared/assets/img/emoji/emotion_024.png.js +1 -1
  59. package/es/shared/assets/img/emoji/emotion_025.png.js +1 -1
  60. package/es/shared/assets/img/emoji/emotion_026.png.js +1 -1
  61. package/es/shared/assets/img/emoji/emotion_027.png.js +1 -1
  62. package/es/shared/assets/img/emoji/emotion_028.png.js +1 -1
  63. package/es/shared/assets/img/emoji/emotion_029.png.js +1 -1
  64. package/es/shared/assets/img/emoji/emotion_030.png.js +1 -1
  65. package/es/shared/assets/img/emoji/emotion_031.png.js +1 -1
  66. package/es/shared/assets/img/emoji/emotion_032.png.js +1 -1
  67. package/es/shared/assets/img/emoji/emotion_033.png.js +1 -1
  68. package/es/shared/assets/img/emoji/emotion_034.png.js +1 -1
  69. package/es/shared/assets/img/emoji/emotion_035.png.js +1 -1
  70. package/es/shared/assets/img/emoji/emotion_036.png.js +1 -1
  71. package/es/shared/assets/img/emoji/emotion_037.png.js +1 -1
  72. package/es/shared/assets/img/emoji/emotion_038.png.js +1 -1
  73. package/es/shared/assets/img/emoji/emotion_039.png.js +1 -1
  74. package/es/shared/assets/img/emoji/emotion_040.png.js +1 -1
  75. package/es/shared/assets/img/emoji/emotion_041.png.js +1 -1
  76. package/es/shared/assets/img/emoji/emotion_042.png.js +1 -1
  77. package/es/shared/assets/img/emoji/emotion_043.png.js +1 -1
  78. package/es/shared/assets/img/emoji/emotion_044.png.js +1 -1
  79. package/es/shared/assets/img/emoji/emotion_045.png.js +1 -1
  80. package/es/shared/assets/img/emoji/emotion_046.png.js +1 -1
  81. package/es/shared/assets/img/emoji/emotion_047.png.js +1 -1
  82. package/es/shared/assets/img/emoji/emotion_048.png.js +1 -1
  83. package/es/shared/assets/img/emoji/emotion_049.png.js +1 -1
  84. package/es/shared/assets/img/emoji/emotion_050.png.js +1 -1
  85. package/es/shared/assets/img/emoji/emotion_051.png.js +1 -1
  86. package/es/shared/assets/img/emoji/emotion_052.png.js +1 -1
  87. package/es/shared/assets/img/emoji/emotion_053.png.js +1 -1
  88. package/es/shared/assets/img/emoji/emotion_054.png.js +1 -1
  89. package/es/shared/assets/img/emoji/emotion_055.png.js +1 -1
  90. package/es/shared/assets/img/emoji/emotion_056.png.js +1 -1
  91. package/es/shared/assets/img/emoji/emotion_057.png.js +1 -1
  92. package/es/shared/assets/img/emoji/emotion_058.png.js +1 -1
  93. package/es/shared/assets/img/emoji/emotion_059.png.js +1 -1
  94. package/es/shared/assets/img/emoji/emotion_060.png.js +1 -1
  95. package/es/shared/assets/img/emoji/emotion_061.png.js +1 -1
  96. package/es/shared/assets/img/emoji/emotion_062.png.js +1 -1
  97. package/es/shared/assets/img/emoji/emotion_063.png.js +1 -1
  98. package/es/shared/assets/img/emoji/emotion_064.png.js +1 -1
  99. package/es/shared/assets/img/emoji/emotion_065.png.js +1 -1
  100. package/es/shared/assets/img/emoji/emotion_066.png.js +1 -1
  101. package/es/shared/assets/img/emoji/emotion_067.png.js +1 -1
  102. package/es/shared/assets/img/emoji/emotion_068.png.js +1 -1
  103. package/es/shared/assets/img/emoji/emotion_069.png.js +1 -1
  104. package/es/shared/assets/img/emoji/emotion_070.png.js +1 -1
  105. package/es/shared/assets/img/emoji/emotion_071.png.js +1 -1
  106. package/es/shared/assets/img/emoji/emotion_072.png.js +1 -1
  107. package/es/shared/assets/img/emoji/emotion_073.png.js +1 -1
  108. package/es/shared/assets/img/emoji/emotion_074.png.js +1 -1
  109. package/es/shared/assets/img/emoji/emotion_075.png.js +1 -1
  110. package/es/shared/assets/img/emoji/emotion_076.png.js +1 -1
  111. package/es/shared/assets/img/emoji/emotion_077.png.js +1 -1
  112. package/es/shared/assets/img/emoji/emotion_078.png.js +1 -1
  113. package/es/shared/assets/img/emoji/emotion_079.png.js +1 -1
  114. package/es/shared/assets/img/emoji/emotion_080.png.js +1 -1
  115. package/es/shared/assets/img/emoji/emotion_081.png.js +1 -1
  116. package/es/shared/assets/img/emoji/emotion_082.png.js +1 -1
  117. package/es/shared/assets/img/emoji/emotion_083.png.js +1 -1
  118. package/es/shared/assets/img/emoji/emotion_084.png.js +1 -1
  119. package/es/shared/assets/img/emoji/emotion_085.png.js +1 -1
  120. package/es/shared/assets/img/emoji/emotion_086.png.js +1 -1
  121. package/es/shared/assets/img/emoji/emotion_087.png.js +1 -1
  122. package/es/shared/assets/img/emoji/emotion_088.png.js +1 -1
  123. package/es/shared/assets/img/emoji/emotion_089.png.js +1 -1
  124. package/es/shared/assets/img/emoji/emotion_090.png.js +1 -1
  125. package/es/shared/assets/img/emoji/emotion_091.png.js +1 -1
  126. package/es/shared/assets/img/emoji/emotion_092.png.js +1 -1
  127. package/es/shared/assets/img/emoji/emotion_093.png.js +1 -1
  128. package/es/shared/assets/img/emoji/emotion_094.png.js +1 -1
  129. package/es/shared/assets/img/emoji/emotion_095.png.js +1 -1
  130. package/es/shared/assets/img/emoji/emotion_096.png.js +1 -1
  131. package/es/shared/assets/img/emoji/emotion_097.png.js +1 -1
  132. package/es/shared/assets/img/emoji/emotion_098.png.js +1 -1
  133. package/es/shared/assets/img/emoji/emotion_099.png.js +1 -1
  134. package/es/shared/assets/img/emoji/emotion_100.png.js +1 -1
  135. package/es/shared/assets/img/emoji/emotion_101.png.js +1 -1
  136. package/es/shared/assets/img/emoji/emotion_102.png.js +1 -1
  137. package/es/shared/assets/img/emoji/emotion_103.png.js +1 -1
  138. package/es/shared/assets/img/emoji/emotion_104.png.js +1 -1
  139. package/es/shared/assets/img/emoji/emotion_105.png.js +1 -1
  140. package/es/shared/assets/img/emoji/emotion_106.png.js +1 -1
  141. package/es/shared/assets/img/emoji/emotion_107.png.js +1 -1
  142. package/es/shared/assets/img/emoji/emotion_108.png.js +1 -1
  143. package/es/shared/assets/img/emoji/emotion_109.png.js +1 -1
  144. package/es/shared/assets/img/emoji/emotion_110.png.js +1 -1
  145. package/es/shared/assets/img/emoji/emotion_111.png.js +1 -1
  146. package/es/shared/assets/img/emoji/emotion_112.png.js +1 -1
  147. package/es/shared/assets/img/emoji/emotion_113.png.js +1 -1
  148. package/es/shared/assets/img/emoji/emotion_114.png.js +1 -1
  149. package/es/shared/assets/img/emoji/emotion_115.png.js +1 -1
  150. package/es/shared/assets/img/emoji/emotion_116.png.js +1 -1
  151. package/es/shared/assets/img/emoji/emotion_117.png.js +1 -1
  152. package/es/shared/assets/img/emoji/emotion_118.png.js +1 -1
  153. package/es/shared/assets/img/emoji/emotion_119.png.js +1 -1
  154. package/es/shared/assets/img/emoji/emotion_120.png.js +1 -1
  155. package/es/shared/assets/img/emoji/emotion_121.png.js +1 -1
  156. package/es/shared/assets/img/emoji/emotion_122.png.js +1 -1
  157. package/es/shared/assets/img/emoji/emotion_123.png.js +1 -1
  158. package/es/shared/assets/img/emoji/emotion_124.png.js +1 -1
  159. package/es/shared/assets/img/emoji/emotion_125.png.js +1 -1
  160. package/es/shared/assets/img/emoji/emotion_126.png.js +1 -1
  161. package/es/shared/assets/img/emoji/emotion_127.png.js +1 -1
  162. package/es/shared/assets/img/emoji/emotion_128.png.js +1 -1
  163. package/es/shared/assets/img/emoji/emotion_129.png.js +1 -1
  164. package/es/shared/assets/img/emoji/emotion_130.png.js +1 -1
  165. package/es/shared/assets/img/emoji/emotion_131.png.js +1 -1
  166. package/es/shared/assets/img/emoji/emotion_132.png.js +1 -1
  167. package/es/shared/assets/img/emoji/emotion_133.png.js +1 -1
  168. package/es/shared/assets/img/emoji/emotion_134.png.js +1 -1
  169. package/es/shared/assets/img/emoji/emotion_135.png.js +1 -1
  170. package/es/shared/assets/img/emoji/emotion_136.png.js +1 -1
  171. package/es/shared/assets/img/emoji/emotion_137.png.js +1 -1
  172. package/es/shared/assets/img/emoji/emotion_138.png.js +1 -1
  173. package/es/shared/assets/img/emoji/emotion_139.png.js +1 -1
  174. package/es/shared/assets/img/emoji/emotion_140.png.js +1 -1
  175. package/es/shared/assets/img/emoji/emotion_141.png.js +1 -1
  176. package/es/shared/assets/img/emoji/emotion_142.png.js +1 -1
  177. package/es/shared/assets/img/emoji/emotion_143.png.js +1 -1
  178. package/es/shared/assets/img/emoji/emotion_144.png.js +1 -1
  179. package/es/shared/assets/img/emoji/emotion_145.png.js +1 -1
  180. package/es/shared/assets/img/emoji/emotion_146.png.js +1 -1
  181. package/es/shared/assets/img/emoji/emotion_147.png.js +1 -1
  182. package/es/shared/assets/img/emoji/emotion_148.png.js +1 -1
  183. package/es/shared/assets/img/emoji/emotion_149.png.js +1 -1
  184. package/es/shared/assets/img/emoji/emotion_150.png.js +1 -1
  185. package/es/shared/assets/img/emoji/emotion_151.png.js +1 -1
  186. package/es/shared/assets/img/emoji/emotion_152.png.js +1 -1
  187. package/es/shared/assets/img/emoji/emotion_153.png.js +1 -1
  188. package/es/shared/assets/img/emoji/emotion_154.png.js +1 -1
  189. package/es/shared/assets/img/emoji/emotion_155.png.js +1 -1
  190. package/es/shared/assets/img/emoji/emotion_156.png.js +1 -1
  191. package/es/shared/assets/img/emoji/emotion_157.png.js +1 -1
  192. package/es/shared/assets/img/emoji/emotion_158.png.js +1 -1
  193. package/es/shared/assets/img/emoji/emotion_159.png.js +1 -1
  194. package/es/shared/assets/img/emoji/emotion_160.png.js +1 -1
  195. package/es/shared/assets/img/emoji/emotion_161.png.js +1 -1
  196. package/es/shared/assets/img/emoji/emotion_162.png.js +1 -1
  197. package/es/shared/assets/img/emoji/emotion_163.png.js +1 -1
  198. package/es/shared/assets/img/emoji/emotion_164.png.js +1 -1
  199. package/es/shared/assets/img/emoji/emotion_165.png.js +1 -1
  200. package/es/shared/assets/img/emoji/emotion_166.png.js +1 -1
  201. package/es/shared/assets/img/emoji/emotion_167.png.js +1 -1
  202. package/es/shared/assets/img/failure.png.js +1 -1
  203. package/es/shared/assets/img/no-permission.png.js +1 -1
  204. package/es/shared/assets/img/nodata.png.js +1 -1
  205. package/es/shared/assets/img/notfound.png.js +1 -1
  206. package/es/shared/assets/img/qr.png.js +1 -1
  207. package/es/shared/assets/img/success.png.js +1 -1
  208. package/es/shared/assets/img/table_style_2.png.js +1 -1
  209. package/es/shared/assets/img/tooth/l-b-1.png.js +1 -1
  210. package/es/shared/assets/img/tooth/l-b-2.png.js +1 -1
  211. package/es/shared/assets/img/tooth/l-b-3.png.js +1 -1
  212. package/es/shared/assets/img/tooth/l-b-4.png.js +1 -1
  213. package/es/shared/assets/img/tooth/l-b-5.png.js +1 -1
  214. package/es/shared/assets/img/tooth/l-b-6.png.js +1 -1
  215. package/es/shared/assets/img/tooth/l-b-7.png.js +1 -1
  216. package/es/shared/assets/img/tooth/l-b-8.png.js +1 -1
  217. package/es/shared/assets/img/tooth/l-t-1.png.js +1 -1
  218. package/es/shared/assets/img/tooth/l-t-2.png.js +1 -1
  219. package/es/shared/assets/img/tooth/l-t-3.png.js +1 -1
  220. package/es/shared/assets/img/tooth/l-t-4.png.js +1 -1
  221. package/es/shared/assets/img/tooth/l-t-5.png.js +1 -1
  222. package/es/shared/assets/img/tooth/l-t-6.png.js +1 -1
  223. package/es/shared/assets/img/tooth/l-t-7.png.js +1 -1
  224. package/es/shared/assets/img/tooth/l-t-8.png.js +1 -1
  225. package/es/shared/assets/img/tooth/r-b-1.png.js +1 -1
  226. package/es/shared/assets/img/tooth/r-b-2.png.js +1 -1
  227. package/es/shared/assets/img/tooth/r-b-3.png.js +1 -1
  228. package/es/shared/assets/img/tooth/r-b-4.png.js +1 -1
  229. package/es/shared/assets/img/tooth/r-b-5.png.js +1 -1
  230. package/es/shared/assets/img/tooth/r-b-6.png.js +1 -1
  231. package/es/shared/assets/img/tooth/r-b-7.png.js +1 -1
  232. package/es/shared/assets/img/tooth/r-b-8.png.js +1 -1
  233. package/es/shared/assets/img/tooth/r-t-1.png.js +1 -1
  234. package/es/shared/assets/img/tooth/r-t-2.png.js +1 -1
  235. package/es/shared/assets/img/tooth/r-t-3.png.js +1 -1
  236. package/es/shared/assets/img/tooth/r-t-4.png.js +1 -1
  237. package/es/shared/assets/img/tooth/r-t-5.png.js +1 -1
  238. package/es/shared/assets/img/tooth/r-t-6.png.js +1 -1
  239. package/es/shared/assets/img/tooth/r-t-7.png.js +1 -1
  240. package/es/shared/assets/img/tooth/r-t-8.png.js +1 -1
  241. package/es/shared/assets/img/video.png.js +1 -1
  242. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  243. package/es/shared/assets/img/xb_big.png.js +1 -1
  244. package/es/shared/assets/img/xb_small.png.js +1 -1
  245. package/es/shared/package.json.js +1 -1
  246. package/package.json +2 -2
  247. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  248. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  249. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  250. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  251. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  252. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  253. 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};
@@ -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,12 +127,6 @@ 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
- };
136
130
  }, {
137
131
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
138
132
  maxHeight: {
@@ -260,12 +254,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
260
254
  beforeMove: {
261
255
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
262
256
  };
263
- requiredReminderConfig: {
264
- type: import("vue").PropType<Partial<Partial<{
265
- enabled: boolean;
266
- content: string;
267
- }>>>;
268
- };
269
257
  }>> & {
270
258
  onAddItem?: ((...args: any[]) => any) | undefined;
271
259
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -1815,10 +1803,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1815
1803
  value?: any;
1816
1804
  describe?: string | undefined;
1817
1805
  } | undefined;
1818
- reminderConfig?: {
1819
- enabled?: boolean | undefined;
1820
- content?: string | undefined;
1821
- } | undefined;
1806
+ requiredReminderContent?: string | undefined;
1822
1807
  date_format?: string | undefined;
1823
1808
  step_length?: string | number | undefined;
1824
1809
  urlConfig?: {
@@ -3474,6 +3459,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3474
3459
  fold?: boolean | undefined;
3475
3460
  required?: boolean | undefined;
3476
3461
  requiredDisabled?: boolean | undefined;
3462
+ requiredReminderContent?: string | undefined;
3477
3463
  editableDisabled?: boolean | undefined;
3478
3464
  editable?: boolean | undefined;
3479
3465
  notes?: string | undefined;
@@ -3489,6 +3475,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3489
3475
  fold?: boolean | undefined;
3490
3476
  required?: boolean | undefined;
3491
3477
  requiredDisabled?: boolean | undefined;
3478
+ requiredReminderContent?: string | undefined;
3492
3479
  editableDisabled?: boolean | undefined;
3493
3480
  editable?: boolean | undefined;
3494
3481
  notes?: string | undefined;
@@ -3586,10 +3573,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3586
3573
  value?: any;
3587
3574
  describe?: string | undefined;
3588
3575
  } | undefined;
3589
- reminderConfig?: {
3590
- enabled?: boolean | undefined;
3591
- content?: string | undefined;
3592
- } | undefined;
3576
+ requiredReminderContent?: string | undefined;
3593
3577
  date_format?: string | undefined;
3594
3578
  step_length?: string | number | undefined;
3595
3579
  urlConfig?: {
@@ -5330,10 +5314,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
5330
5314
  value?: any;
5331
5315
  describe?: string | undefined;
5332
5316
  } | undefined;
5333
- reminderConfig?: {
5334
- enabled?: boolean | undefined;
5335
- content?: string | undefined;
5336
- } | undefined;
5317
+ requiredReminderContent?: string | undefined;
5337
5318
  date_format?: string | undefined;
5338
5319
  step_length?: string | number | undefined;
5339
5320
  urlConfig?: {
@@ -8354,12 +8335,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
8354
8335
  beforeMove: {
8355
8336
  type: import("vue").PropType<((payload: import("./src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
8356
8337
  };
8357
- requiredReminderConfig: {
8358
- type: import("vue").PropType<Partial<Partial<{
8359
- enabled: boolean;
8360
- content: string;
8361
- }>>>;
8362
- };
8363
8338
  }>> & {
8364
8339
  onAddItem?: ((...args: any[]) => any) | undefined;
8365
8340
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -130,12 +130,6 @@ 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
- };
139
133
  }, {
140
134
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
141
135
  maxHeight: {
@@ -263,12 +257,6 @@ declare const _default: import("vue").DefineComponent<{
263
257
  beforeMove: {
264
258
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
265
259
  };
266
- requiredReminderConfig: {
267
- type: PropType<Partial<Partial<{
268
- enabled: boolean;
269
- content: string;
270
- }>>>;
271
- };
272
260
  }>> & {
273
261
  onAddItem?: ((...args: any[]) => any) | undefined;
274
262
  onRemoveItem?: ((...args: any[]) => any) | undefined;
@@ -1818,10 +1806,7 @@ declare const _default: import("vue").DefineComponent<{
1818
1806
  value?: any;
1819
1807
  describe?: string | undefined;
1820
1808
  } | undefined;
1821
- reminderConfig?: {
1822
- enabled?: boolean | undefined;
1823
- content?: string | undefined;
1824
- } | undefined;
1809
+ requiredReminderContent?: string | undefined;
1825
1810
  date_format?: string | undefined;
1826
1811
  step_length?: string | number | undefined;
1827
1812
  urlConfig?: {
@@ -3477,6 +3462,7 @@ declare const _default: import("vue").DefineComponent<{
3477
3462
  fold?: boolean | undefined;
3478
3463
  required?: boolean | undefined;
3479
3464
  requiredDisabled?: boolean | undefined;
3465
+ requiredReminderContent?: string | undefined;
3480
3466
  editableDisabled?: boolean | undefined;
3481
3467
  editable?: boolean | undefined;
3482
3468
  notes?: string | undefined;
@@ -3492,6 +3478,7 @@ declare const _default: import("vue").DefineComponent<{
3492
3478
  fold?: boolean | undefined;
3493
3479
  required?: boolean | undefined;
3494
3480
  requiredDisabled?: boolean | undefined;
3481
+ requiredReminderContent?: string | undefined;
3495
3482
  editableDisabled?: boolean | undefined;
3496
3483
  editable?: boolean | undefined;
3497
3484
  notes?: string | undefined;
@@ -3589,10 +3576,7 @@ declare const _default: import("vue").DefineComponent<{
3589
3576
  value?: any;
3590
3577
  describe?: string | undefined;
3591
3578
  } | undefined;
3592
- reminderConfig?: {
3593
- enabled?: boolean | undefined;
3594
- content?: string | undefined;
3595
- } | undefined;
3579
+ requiredReminderContent?: string | undefined;
3596
3580
  date_format?: string | undefined;
3597
3581
  step_length?: string | number | undefined;
3598
3582
  urlConfig?: {
@@ -5333,10 +5317,7 @@ declare const _default: import("vue").DefineComponent<{
5333
5317
  value?: any;
5334
5318
  describe?: string | undefined;
5335
5319
  } | undefined;
5336
- reminderConfig?: {
5337
- enabled?: boolean | undefined;
5338
- content?: string | undefined;
5339
- } | undefined;
5320
+ requiredReminderContent?: string | undefined;
5340
5321
  date_format?: string | undefined;
5341
5322
  step_length?: string | number | undefined;
5342
5323
  urlConfig?: {
@@ -8357,12 +8338,6 @@ declare const _default: import("vue").DefineComponent<{
8357
8338
  beforeMove: {
8358
8339
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
8359
8340
  };
8360
- requiredReminderConfig: {
8361
- type: PropType<Partial<Partial<{
8362
- enabled: boolean;
8363
- content: string;
8364
- }>>>;
8365
- };
8366
8341
  }>> & {
8367
8342
  onAddItem?: ((...args: any[]) => any) | undefined;
8368
8343
  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 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};
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};
@@ -326,10 +326,7 @@ 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
+ requiredReminderContent?: string | undefined;
333
330
  date_format?: string | undefined;
334
331
  step_length?: string | number | undefined;
335
332
  urlConfig?: {
@@ -1985,6 +1982,7 @@ declare const _default: import("vue").DefineComponent<{
1985
1982
  fold?: boolean | undefined;
1986
1983
  required?: boolean | undefined;
1987
1984
  requiredDisabled?: boolean | undefined;
1985
+ requiredReminderContent?: string | undefined;
1988
1986
  editableDisabled?: boolean | undefined;
1989
1987
  editable?: boolean | undefined;
1990
1988
  notes?: string | undefined;
@@ -2000,6 +1998,7 @@ declare const _default: import("vue").DefineComponent<{
2000
1998
  fold?: boolean | undefined;
2001
1999
  required?: boolean | undefined;
2002
2000
  requiredDisabled?: boolean | undefined;
2001
+ requiredReminderContent?: string | undefined;
2003
2002
  editableDisabled?: boolean | undefined;
2004
2003
  editable?: boolean | undefined;
2005
2004
  notes?: string | undefined;
@@ -2097,10 +2096,7 @@ declare const _default: import("vue").DefineComponent<{
2097
2096
  value?: any;
2098
2097
  describe?: string | undefined;
2099
2098
  } | undefined;
2100
- reminderConfig?: {
2101
- enabled?: boolean | undefined;
2102
- content?: string | undefined;
2103
- } | undefined;
2099
+ requiredReminderContent?: string | undefined;
2104
2100
  date_format?: string | undefined;
2105
2101
  step_length?: string | number | undefined;
2106
2102
  urlConfig?: {
@@ -3841,10 +3837,7 @@ declare const _default: import("vue").DefineComponent<{
3841
3837
  value?: any;
3842
3838
  describe?: string | undefined;
3843
3839
  } | undefined;
3844
- reminderConfig?: {
3845
- enabled?: boolean | undefined;
3846
- content?: string | undefined;
3847
- } | undefined;
3840
+ requiredReminderContent?: string | undefined;
3848
3841
  date_format?: string | undefined;
3849
3842
  step_length?: string | number | undefined;
3850
3843
  urlConfig?: {
@@ -1 +1 @@
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};
1
+ import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as _,isNullOptionConfig as n,isVisibleOptionConfig as m,rowsOptionConfig as r}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as s}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=s();function E(){const s=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,...o()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",..._()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",requiredReminderContent:null==e?void 0:e.requiredReminderContent,...n()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...m()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...r()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=s.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};
@@ -34,6 +34,7 @@ export declare type FormConfigItem = {
34
34
  fold: boolean;
35
35
  required: boolean;
36
36
  requiredDisabled: boolean;
37
+ requiredReminderContent: string;
37
38
  editableDisabled: boolean;
38
39
  editable: boolean;
39
40
  notes: string;
@@ -1 +1 @@
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};
1
+ import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as l,mergeProps as r,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 s,assignValueBindKey as p}from"../../utils/schema.js";import{connect as d,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=d(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:s}){const p=o(),d=t(!1),{field:c,fieldKey:h}=m(),f=i((()=>{var e,o;return null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.requiredReminderContent})),y=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),w=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),j=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},k=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},C=i({get:()=>e.value===y.value,set(o){if(!f.value||"SWITCH"!==e.showMode||"required"!==h.value||o)return s("update:value",o?y.value:w.value);d.value=!0}});function D(){s("update:value",w.value)}return()=>"SWITCH"===e.showMode?[l(n,r({value:C.value,"onUpdate:value":e=>C.value=e},p),{checked:j,unchecked:k}),f.value?l(a,{show:d.value,"onUpdate:show":e=>d.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":"取消",content:f.value,onPositiveClick:D},null):null]:l(v,{checked:C.value,"onUpdate:checked":e=>C.value=e},{default:j})}}),c(s,p));export{h as SWITCH};
@@ -103,10 +103,7 @@ 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
+ requiredReminderContent: string;
110
107
  date_format: string;
111
108
  step_length: string | number;
112
109
  urlConfig: UrlConfig;
@@ -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};