npmapps 1.0.24 → 1.0.26

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 (210) hide show
  1. package/app/.codegraph/daemon.pid +6 -0
  2. package/app/.eslintrc.js +19 -0
  3. package/app/README.md +24 -0
  4. package/app/babel.config.js +5 -0
  5. package/app/devtool-windows-amd64.zip +0 -0
  6. package/app/docs/superpowers/plans/2026-05-29-quill-editor.md +836 -0
  7. package/app/docs/superpowers/specs/2026-05-29-quill-editor-design.md +210 -0
  8. package/app/docs/superpowers/specs/2026-06-06-lazy-cascader-design.md +400 -0
  9. package/app/jsconfig.json +19 -0
  10. package/app/package-lock.json +21347 -0
  11. package/app/package.json +63 -0
  12. package/app/postcss.config.js +10 -0
  13. package/app/public/favicon.ico +0 -0
  14. package/app/public/index.html +17 -0
  15. package/app/public//344/270/200/351/224/256/351/273/221/346/232/227.html +136 -0
  16. package/app/src/App.vue +110 -0
  17. package/app/src/assets/bpmn-camunda.jpg +0 -0
  18. package/app/src/assets/css/diagram.less +17 -0
  19. package/app/src/assets/icon/Icon.less +31 -0
  20. package/app/src/assets/icon/font/app-codes.css +26 -0
  21. package/app/src/assets/icon/font/app.eot +0 -0
  22. package/app/src/assets/icon/font/app.svg +60 -0
  23. package/app/src/assets/icon/font/app.ttf +0 -0
  24. package/app/src/assets/icon/font/app.woff +0 -0
  25. package/app/src/assets/icon/font/app.woff2 +0 -0
  26. package/app/src/assets/icon/font/config.json +248 -0
  27. package/app/src/assets/icon/font/source/raw/align-bottom-tool.svg +30 -0
  28. package/app/src/assets/icon/font/source/raw/align-horizontal-center-tool.svg +85 -0
  29. package/app/src/assets/icon/font/source/raw/align-left-tool.svg +84 -0
  30. package/app/src/assets/icon/font/source/raw/align-right-tool.svg +80 -0
  31. package/app/src/assets/icon/font/source/raw/align-top-tool.svg +84 -0
  32. package/app/src/assets/icon/font/source/raw/align-vertical-center-tool.svg +89 -0
  33. package/app/src/assets/icon/font/source/raw/distribute-horizontally-tool.svg +95 -0
  34. package/app/src/assets/icon/font/source/raw/distribute-vertically-tool.svg +99 -0
  35. package/app/src/assets/icon/font/source/raw/set-color-tool.svg +111 -0
  36. package/app/src/assets/icon/font/source/symbols/align-bottom-tool.svg +30 -0
  37. package/app/src/assets/icon/font/source/symbols/align-horizontal-center-tool.svg +30 -0
  38. package/app/src/assets/icon/font/source/symbols/align-left-tool.svg +30 -0
  39. package/app/src/assets/icon/font/source/symbols/align-right-tool.svg +30 -0
  40. package/app/src/assets/icon/font/source/symbols/align-top-tool.svg +30 -0
  41. package/app/src/assets/icon/font/source/symbols/align-vertical-center-tool.svg +30 -0
  42. package/app/src/assets/icon/font/source/symbols/distribute-horizontally-tool.svg +30 -0
  43. package/app/src/assets/icon/font/source/symbols/distribute-vertically-tool.svg +30 -0
  44. package/app/src/assets/icon/font/source/symbols/set-color-tool.svg +63 -0
  45. package/app/src/assets/logo.png +0 -0
  46. package/app/src/components/EllTable/README.md +70 -0
  47. package/app/src/components/EllTable/article.md +184 -0
  48. package/app/src/components/EllTable/index.js +213 -0
  49. package/app/src/components/FormulaEditor/FunctionSelector.vue +123 -0
  50. package/app/src/components/FormulaEditor/OperatorSelector.vue +184 -0
  51. package/app/src/components/FormulaEditor/ParameterSelector.vue +123 -0
  52. package/app/src/components/FormulaEditor/api.js +69 -0
  53. package/app/src/components/FormulaEditor/index.vue +435 -0
  54. package/app/src/components/HelloWorld.vue +58 -0
  55. package/app/src/components/PageHeader/index.vue +158 -0
  56. package/app/src/components/Splitter/README.md +144 -0
  57. package/app/src/components/Splitter/example.vue +88 -0
  58. package/app/src/components/Splitter/index.vue +203 -0
  59. package/app/src/components/diagram/ToolBar.vue +357 -0
  60. package/app/src/components/diagram/customTranslate/customTranslate.js +12 -0
  61. package/app/src/components/diagram/customTranslate/translationsGerman.js +241 -0
  62. package/app/src/components/diagram/index.vue +261 -0
  63. package/app/src/components/diagram/xmlData.js +29 -0
  64. package/app/src/directives/filldown.js +155 -0
  65. package/app/src/directives/filldownTable.js +291 -0
  66. package/app/src/main.js +40 -0
  67. package/app/src/router/index.js +63 -0
  68. package/app/src/store/index.js +23 -0
  69. package/app/src/utils/winBox.js +23 -0
  70. package/app/src/views/Extend/A.vue +12 -0
  71. package/app/src/views/Extend/B.vue +10 -0
  72. package/app/src/views/Extend/MagicalComponentsForELFormItem.vue +87 -0
  73. package/app/src/views/Extend/index.vue +59 -0
  74. package/app/src/views/Extend/tableMouseHorizontalWheel.vue +193 -0
  75. package/app/src/views/Home.vue +37 -0
  76. package/app/src/views/RouterJump.vue +155 -0
  77. package/app/src/views/css.vue +57 -0
  78. package/app/src/views/cssComponents/EllipsisText.vue +83 -0
  79. package/app/src/views/cssComponents/HoverCard.vue +79 -0
  80. package/app/src/views/cssComponents/TableHover.vue +140 -0
  81. package/app/src/views/cssComponents/inputSlo.vue +52 -0
  82. package/app/src/views/cssComponents/tableFixed.vue +158 -0
  83. package/app/src/views/echarts/echart-dome.vue +82 -0
  84. package/app/src/views/echarts/index.vue +118 -0
  85. package/app/src/views/echarts/pei3d.vue +667 -0
  86. package/app/src/views/element/bpmn/index.vue +18 -0
  87. package/app/src/views/element/components/attendanceCycle/index.vue +131 -0
  88. package/app/src/views/element/components/attendanceGroup/index.vue +147 -0
  89. package/app/src/views/element/components/attendancePersonnel/index.vue +158 -0
  90. package/app/src/views/element/components/companyCalendar/index.vue +147 -0
  91. package/app/src/views/element/components/shift/index.vue +147 -0
  92. package/app/src/views/element/components/shiftRotationSystem/index.vue +147 -0
  93. package/app/src/views/element/elTableJsx/columnManagement.vue +340 -0
  94. package/app/src/views/element/elTableJsx/dialogInput.vue +71 -0
  95. package/app/src/views/element/elTableJsx/elTableJsx.vue +1826 -0
  96. package/app/src/views/element/elTableJsx/formTable.vue +598 -0
  97. package/app/src/views/element/elTableJsx/index.vue +29 -0
  98. package/app/src/views/element/elTableJsx/simpleTable.vue +192 -0
  99. package/app/src/views/element/elTableJsx.zip +0 -0
  100. package/app/src/views/element/index.vue +44 -0
  101. package/app/src/views/element/lazyCascader/LazyCascader.vue +302 -0
  102. package/app/src/views/element/lazyCascader/data.js +205 -0
  103. package/app/src/views/element/lazyCascader/index.vue +315 -0
  104. package/app/src/views/element/quillEditor/README.md +163 -0
  105. package/app/src/views/element/quillEditor/example.vue +314 -0
  106. package/app/src/views/element/quillEditor/index.vue +409 -0
  107. package/app/src/views/element/quillEditor/toolbar.js +122 -0
  108. package/app/vue.config.js +15 -0
  109. package/package.json +1 -1
  110. package/app/wujie-vue3-child/.claude/settings.local.json +0 -8
  111. package/app/wujie-vue3-child/.vscode/extensions.json +0 -3
  112. package/app/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
  113. package/app/wujie-vue3-child/README.md +0 -5
  114. package/app/wujie-vue3-child/index.html +0 -13
  115. package/app/wujie-vue3-child/package-lock.json +0 -5744
  116. package/app/wujie-vue3-child/package.json +0 -28
  117. package/app/wujie-vue3-child/public/vite.svg +0 -1
  118. package/app/wujie-vue3-child/src/App.vue +0 -130
  119. package/app/wujie-vue3-child/src/assets/vue.svg +0 -1
  120. package/app/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
  121. package/app/wujie-vue3-child/src/components/tags-view.vue +0 -193
  122. package/app/wujie-vue3-child/src/components/tags-view1.vue +0 -131
  123. package/app/wujie-vue3-child/src/directives/aiLoading.js +0 -182
  124. package/app/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
  125. package/app/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
  126. package/app/wujie-vue3-child/src/main.js +0 -18
  127. package/app/wujie-vue3-child/src/router/index.js +0 -104
  128. package/app/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
  129. package/app/wujie-vue3-child/src/style.css +0 -171
  130. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
  131. package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
  132. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
  133. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
  134. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
  135. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
  136. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
  137. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
  138. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
  139. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
  140. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
  141. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
  142. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
  143. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
  144. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
  145. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
  146. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
  147. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
  148. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
  149. package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
  150. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
  151. package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
  152. package/app/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -293
  153. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
  154. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
  155. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
  156. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
  157. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
  158. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
  159. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
  160. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
  161. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
  162. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
  163. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
  164. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
  165. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
  166. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
  167. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
  168. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
  169. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
  170. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
  171. package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
  172. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
  173. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
  174. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
  175. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
  176. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
  177. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
  178. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
  179. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
  180. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
  181. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
  182. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
  183. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
  184. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
  185. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
  186. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
  187. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
  188. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
  189. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
  190. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
  191. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
  192. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
  193. package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
  194. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
  195. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
  196. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
  197. package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
  198. package/app/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
  199. package/app/wujie-vue3-child/src/views/home.vue +0 -53
  200. package/app/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
  201. package/app/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
  202. package/app/wujie-vue3-child/src/views/jsx/com.vue +0 -44
  203. package/app/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
  204. package/app/wujie-vue3-child/src/views/jsx/index.vue +0 -72
  205. package/app/wujie-vue3-child/src/views/jsx/props.vue +0 -33
  206. package/app/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
  207. package/app/wujie-vue3-child/src/views/phone-code.vue +0 -318
  208. package/app/wujie-vue3-child/src/views/router-jump.vue +0 -123
  209. package/app/wujie-vue3-child/src/views/test.vue +0 -192
  210. package/app/wujie-vue3-child/vite.config.js +0 -15
@@ -0,0 +1,598 @@
1
+ <template>
2
+ <div>
3
+ <PageHeader title="表单表格" description="展示带表单项编辑的 JSX 表格,支持 input/select/switch/slider/date-picker 等单元格编辑" usage="input.type 指定单元格编辑器类型(text/select/number/switch/slider/date-picker 等),showInputType 控制触发方式(click/doubleClick)" />
4
+ <elTableJsx ref="elTableJsx" :columns="columns" :tableData="tableData" stripe @cell-click="onCellClick"
5
+ :formOptions="formOptions">
6
+ <template #header-left>
7
+ <el-button type="primary" size="mini" @click="test">测试</el-button>
8
+ </template>
9
+ <!-- <template #header-right>
10
+
11
+ </template> -->
12
+ </elTableJsx>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import PageHeader from '@/components/PageHeader/index.vue';
18
+ import elTableJsx from "./elTableJsx.vue";
19
+ import dialogInput from "./dialogInput.vue";
20
+ const list = [
21
+ {
22
+ name: "",
23
+ gender: "1",
24
+ gender1: "1",
25
+ age: 28,
26
+ age1: 28,
27
+ status: true,
28
+ progress: 10,
29
+ time: "",
30
+ date: '2024-05-01',
31
+ phone: "13812345678",
32
+ email: "",
33
+ address: "",
34
+ department: "",
35
+ position: "高级工程师",
36
+ entryDate: "2020-01-15 11:11:11",
37
+ },
38
+ {
39
+ name: "李四",
40
+ gender: "",
41
+ gender1: "",
42
+ age: 32,
43
+ age1: 32,
44
+ status: false,
45
+ progress: 10,
46
+ time: "12:00:00",
47
+ date: '',
48
+ phone: "13987654321",
49
+ email: "lisi@example.com",
50
+ address: "上海市浦东新区陆家嘴环路888号",
51
+ department: "产品部",
52
+ position: "产品经理",
53
+ entryDate: "2019-06-20 11:11:11",
54
+ },
55
+ {
56
+ name: "",
57
+ gender: "1",
58
+ gender1: "1",
59
+
60
+ age: 35,
61
+ age1: 35,
62
+ status: true,
63
+ progress: 10,
64
+ time: "12:00:00",
65
+ date: '2024-05-01',
66
+ phone: "13567891234",
67
+ email: "wangwu@example.com",
68
+ address: "广州市天河区珠江新城华夏路10号",
69
+ department: "市场部",
70
+ position: "市场总监",
71
+ entryDate: "2018-03-10 11:11:11",
72
+ },
73
+ {
74
+ name: "赵六",
75
+ gender: "0",
76
+ gender1: "0",
77
+ age: 26,
78
+ age1: 26,
79
+ status: true,
80
+ progress: 10,
81
+ time: "12:00:00",
82
+ date: '2024-05-01',
83
+ phone: "13789012345",
84
+ email: "zhaoliu@example.com",
85
+ address: "深圳市南山区科技园科发路8号",
86
+ department: "设计部",
87
+ position: "UI设计师",
88
+ entryDate: "2021-09-01 11:11:11",
89
+ },
90
+ {
91
+ name: "钱七",
92
+ gender: "1",
93
+ gender1: "1",
94
+ age: 40,
95
+ age1: 40,
96
+ status: false,
97
+ progress: 10,
98
+ time: "12:00:00",
99
+ date: '2024-05-01',
100
+ phone: "13456789012",
101
+ email: "qianqi@example.com",
102
+ address: "成都市武侯区天府大道1234号",
103
+ department: "财务部",
104
+ position: "财务总监",
105
+ entryDate: "2017-12-05 11:11:11",
106
+ },
107
+ {
108
+ name: "孙八",
109
+ gender: "1",
110
+ gender1: "1",
111
+ age: 29,
112
+ age1: 29,
113
+ status: true,
114
+ progress: 10,
115
+ time: "12:00:00",
116
+ date: '2024-05-01',
117
+ phone: "13234567890",
118
+ email: "sunba@example.com",
119
+ address: "武汉市江汉区解放大道456号",
120
+ department: "人力资源部",
121
+ position: "HR经理",
122
+ entryDate: "2020-07-15 11:11:11",
123
+ },
124
+ ];
125
+ const getList = () => {
126
+ return new Promise((resolve, reject) => {
127
+ setTimeout(() => {
128
+ resolve(list);
129
+ }, 1000);
130
+ });
131
+ };
132
+ export default {
133
+ components: {
134
+ PageHeader,
135
+ elTableJsx,
136
+ },
137
+ data() {
138
+ return {
139
+ columns: [
140
+ {
141
+ label: "基本信息",
142
+ key: "basic",
143
+ width: "600",
144
+ props: {
145
+ align: "center",
146
+ },
147
+ children: [
148
+ {
149
+ label: "姓名(input始终显示/必填)",
150
+ key: "name",
151
+ input: {
152
+ type: "text",
153
+ showInputType: "always",
154
+ rules: [
155
+ {
156
+ required: true,
157
+ message: "请输入姓名",
158
+ trigger: "blur",
159
+ },
160
+ ],
161
+ props: {
162
+ clearable: true,
163
+ },
164
+ on: {
165
+ change: (val) => {
166
+ console.log("change", val);
167
+ },
168
+ blur: (val) => {
169
+ console.log("blur", val);
170
+ },
171
+ },
172
+ },
173
+ props: {
174
+ align: "center",
175
+ width: "220",
176
+ },
177
+ slots: {
178
+ header: (slotData) => {
179
+ const { column } = slotData;
180
+ return (
181
+ <span class={{ required: column.input && column.input.rules && column.input.rules.length }}>
182
+ {column.label + 1}
183
+ </span>
184
+ )
185
+ }
186
+ }
187
+ },
188
+ {
189
+ label: "性别(必填)",
190
+ key: "gender",
191
+ input: {
192
+ type: "select",
193
+ columnOptions: {
194
+ formatter: ({ row }) => {
195
+ if (row["gender"] === "1") {
196
+ return "男";
197
+ } else if (row["gender"] === "0") {
198
+ return "女";
199
+ } else {
200
+ return <i class="el-icon-edit"></i>;
201
+ }
202
+ },
203
+ },
204
+ // showInputType: 'always',
205
+ rules: [
206
+ {
207
+ required: true,
208
+ message: "请选择性别",
209
+ trigger: "blur",
210
+ },
211
+ ],
212
+ options: [
213
+ {
214
+ label: "男",
215
+ value: "1",
216
+ },
217
+ {
218
+ label: "女",
219
+ value: "0",
220
+ },
221
+ ],
222
+ delayedShutdown: 300,
223
+ on: {
224
+ change: (val) => {
225
+ const { e: value, row, vm } = val;
226
+ if (value === '1') {
227
+ this.$set(row, "progress", 80);
228
+ this.$set(row, "department", '测试');
229
+ vm.__columns[0].children[0].input.rules = [];
230
+ this.$nextTick(() => {
231
+ vm.updateView()
232
+ })
233
+
234
+ }
235
+ if (value === '0') {
236
+ this.$set(row, "progress", 20);
237
+ this.$set(row, "department", '测试222');
238
+ vm.__columns[0].children[0].input.rules = [
239
+ {
240
+ required: true,
241
+ message: "请输入姓名",
242
+ trigger: "blur",
243
+ },
244
+ ]
245
+ this.$nextTick(() => {
246
+ vm.updateView()
247
+ })
248
+
249
+ }
250
+ },
251
+ }
252
+ },
253
+ props: {
254
+ align: "center",
255
+ width: "180",
256
+ },
257
+ },
258
+ {
259
+ label: "性别(双击)",
260
+ key: "gender1",
261
+ input: {
262
+ type: "select",
263
+ columnOptions: {
264
+ formatter: ({ row }) => {
265
+ if (row["gender1"] === "1") {
266
+ return "男";
267
+ } else if (row["gender1"] === "0") {
268
+ return "女";
269
+ } else {
270
+ return <i class="el-icon-edit"></i>;
271
+ }
272
+ },
273
+ },
274
+ showInputType: 'doubleClick',
275
+ options: [
276
+ {
277
+ label: "男",
278
+ value: "1",
279
+ },
280
+ {
281
+ label: "女",
282
+ value: "0",
283
+ },
284
+ ],
285
+ },
286
+ props: {
287
+ align: "center",
288
+ width: "180",
289
+ },
290
+ },
291
+ {
292
+ label: "年龄",
293
+ key: "age",
294
+ input: {
295
+ type: "number",
296
+ },
297
+ props: {
298
+ align: "center",
299
+ width: "180",
300
+ },
301
+ },
302
+ {
303
+ label: "年龄1(doubleClick)",
304
+ key: "age1",
305
+ input: {
306
+ type: "number",
307
+ showInputType: "doubleClick",
308
+ },
309
+ props: {
310
+ align: "center",
311
+ width: "180",
312
+ },
313
+ },
314
+ ],
315
+ },
316
+ {
317
+ label: "状态",
318
+ key: "status",
319
+ input: {
320
+ type: "switch",
321
+ // showInputType: "always",
322
+ columnOptions: {
323
+ formatter: ({ row }) => {
324
+ if (row["status"]) {
325
+ return "启用";
326
+ } else if (!row["status"]) {
327
+ return "禁用";
328
+ }
329
+ },
330
+ },
331
+ delayedShutdown: 300
332
+ },
333
+
334
+ props: {
335
+ align: "center",
336
+ width: "180",
337
+ }
338
+ },
339
+ {
340
+ label: "进度",
341
+ key: "progress",
342
+ input: {
343
+ type: "slider",
344
+ delayedShutdown: 300
345
+ // showInputType: "always",
346
+ // props: {
347
+ // disabled: true,
348
+ // }
349
+ },
350
+ props: {
351
+ align: "center",
352
+ width: "180",
353
+ }
354
+ },
355
+ {
356
+ label: '时间',
357
+ key: 'time',
358
+ input: {
359
+ type: 'time-picker',
360
+ // showInputType: 'always',
361
+ props: {
362
+ valueFormat: 'HH:mm:ss',
363
+ format: 'HH:mm:ss',
364
+ }
365
+ },
366
+ props: {
367
+ align: "center",
368
+ width: "180",
369
+ }
370
+ },
371
+ {
372
+ label: '日期',
373
+ key: 'date',
374
+ input: {
375
+ type: 'date-picker',
376
+ // showInputType: 'always',
377
+ props: {
378
+ valueFormat: 'yyyy-MM-dd',
379
+ format: 'yyyy-MM-dd',
380
+ },
381
+ rules: [
382
+ {
383
+ required: true,
384
+ message: "请输入日期",
385
+ trigger: "blur",
386
+ },
387
+ ]
388
+ },
389
+ props: {
390
+ align: "center",
391
+ width: "180",
392
+ }
393
+ },
394
+ {
395
+ label: "电话(点击不聚焦)",
396
+ key: "phone",
397
+ input: {
398
+ type: "text",
399
+ columnOptions: {
400
+ formatter: ({ row }) => {
401
+ return <el-tag type="success">{row["phone"]}</el-tag>;
402
+ },
403
+ clickInputNoFoucs: true, // 点击不聚焦
404
+ },
405
+ props: {
406
+ clearable: true,
407
+ },
408
+ on: {
409
+ change: (val) => {
410
+ console.log("change", val);
411
+ },
412
+ blur: (val) => {
413
+ console.log("blur", val);
414
+ },
415
+ },
416
+ },
417
+ props: {
418
+ align: "center",
419
+ minWidth: "250",
420
+ },
421
+ },
422
+ {
423
+ label: "邮箱",
424
+ key: "email",
425
+ input: {
426
+
427
+ type: "text",
428
+ rules: [
429
+ {
430
+ required: true,
431
+ message: "请输入邮箱",
432
+ trigger: "blur",
433
+ },
434
+ ],
435
+ },
436
+ props: {
437
+ align: "center",
438
+ minWidth: "300",
439
+ },
440
+ },
441
+ {
442
+ label: "住址(doubleClick)",
443
+ key: "address",
444
+ input: {
445
+ type: "text",
446
+ showInputType: "doubleClick",
447
+ rules: [
448
+ {
449
+ required: true,
450
+ message: "请输入地址",
451
+ trigger: "blur",
452
+ },
453
+ ],
454
+ props: {
455
+ clearable: true,
456
+ }
457
+ },
458
+ props: {
459
+ align: "center",
460
+ minWidth: "350",
461
+ },
462
+ },
463
+
464
+ {
465
+ label: "部门(customize)",
466
+ key: "department",
467
+ input: {
468
+ type: "customize",
469
+ slotFn: (slotData) => {
470
+ // console.log(slotData, "slotFn");
471
+ return <dialogInput slotData={slotData} />
472
+ },
473
+ rules: [
474
+ {
475
+ required: true,
476
+ message: "请输入部门",
477
+ trigger: "blur",
478
+ },
479
+ ]
480
+ },
481
+ props: {
482
+ align: "center",
483
+ minWidth: "250",
484
+ },
485
+ },
486
+ {
487
+ label: "职位",
488
+ key: "position",
489
+ input: {
490
+ type: "text",
491
+ },
492
+ props: {
493
+ align: "center",
494
+ minWidth: "250",
495
+ },
496
+ },
497
+ {
498
+ label: "入职时间",
499
+ key: "entryDate",
500
+ input: {
501
+ type: "date-picker",
502
+ props: {
503
+ type: "datetime",
504
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
505
+ format: "yyyy-MM-dd HH:mm:ss",
506
+ },
507
+ },
508
+ props: {
509
+ align: "center",
510
+ minWidth: "250",
511
+ },
512
+ },
513
+ {
514
+ label: "操作",
515
+ key: "action",
516
+ props: {
517
+ align: "center",
518
+ minWidth: "250",
519
+ fixed: "right",
520
+ },
521
+ input: {
522
+ type: "customize",
523
+ props: {
524
+ // disabled: true
525
+ },
526
+ slotFn: (slotData) => {
527
+ const { row, column, vm, $index } = slotData;
528
+ return (
529
+ <span>
530
+ <el-button type="primary" size={vm.tableSize} onClick={() => {
531
+ vm.spliceTableData($index + 1, 0, {
532
+ name: "",
533
+ gender: "",
534
+ gender1: "",
535
+ age: "",
536
+ age1: "",
537
+ status: false,
538
+ progress: 0,
539
+ time: "",
540
+ date: '',
541
+ phone: "",
542
+ email: "",
543
+ address: "",
544
+ department: "",
545
+ position: "",
546
+ entryDate: "",
547
+ })
548
+ }}>新增行</el-button>
549
+ <el-button disabled={row.status} type="primary" size={vm.tableSize} onClick={() => {
550
+ vm.spliceTableData($index, 1)
551
+ }}>删除行</el-button>
552
+ </span>
553
+ )
554
+ }
555
+ },
556
+
557
+ }
558
+ ],
559
+ formOptions: {
560
+ show: true,
561
+ props: {},
562
+ // 输入框显示模式,always: 点击 click 双击 double-click
563
+ showInputType: "click",
564
+ },
565
+ tableData: [],
566
+ };
567
+ },
568
+ methods: {
569
+ onCellClick(row, column, cell, event) {
570
+ console.log("onCellClick", row, column, cell, event);
571
+ },
572
+ async test() {
573
+ console.log("test", this.$refs.elTableJsx.getData());
574
+ const tableData = this.$refs.elTableJsx.getData();
575
+ try {
576
+ await tableData.formRef.validate()
577
+ } catch (error) {
578
+ console.log(error, "error");
579
+ }
580
+ },
581
+ },
582
+ created() {
583
+ getList().then((res) => {
584
+ this.tableData = res;
585
+ });
586
+ },
587
+ };
588
+ </script>
589
+
590
+ <style lang="less">
591
+ .required{
592
+ &::before{
593
+ content: '*';
594
+ color: red;
595
+ margin-right: 4px;
596
+ }
597
+ }
598
+ </style>
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <div>
3
+ <el-tabs type="border-card" v-model="activeName">
4
+ <el-tab-pane label="简单表格" name="first">
5
+ <simple-table v-if="activeName === 'first'"></simple-table>
6
+ </el-tab-pane>
7
+ <el-tab-pane label="表单表格" name="second">
8
+ <form-table v-if="activeName === 'second'"></form-table>
9
+ </el-tab-pane>
10
+ </el-tabs>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import simpleTable from "./simpleTable";
16
+ import formTable from "./formTable.vue";
17
+ export default {
18
+ components: {
19
+ simpleTable,
20
+ formTable,
21
+ },
22
+ data() {
23
+ return {
24
+ activeName: "second",
25
+ };
26
+ },
27
+ methods: {},
28
+ };
29
+ </script>