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
@@ -1,69 +0,0 @@
1
- <script lang="jsx">
2
- import { defineComponent, ref } from "vue";
3
- import BtnSelect from "./btnSelect.vue";
4
-
5
- export default defineComponent({
6
- name: "BtnSelectView",
7
- setup() {
8
- const options = ref([
9
- { label: "选项一", value: "a" },
10
- { label: "选项二", value: "b" },
11
- { label: "选项三", value: "c" },
12
- { label: "禁用项", value: "d", disabled: true },
13
- ]);
14
- const singleValue = ref(null);
15
- const multiValue = ref([]);
16
- const searchValue = ref(null);
17
- return () => (
18
- <>
19
- <div style="display:flex; gap:16px; align-items:center; flex-wrap:wrap;">
20
- <span>按钮下拉框(普通)</span>
21
- <BtnSelect
22
- label="名称"
23
- options={options.value}
24
- modelValue={singleValue.value}
25
- onUpdate:modelValue={(v) => {
26
- singleValue.value = v;
27
- }}
28
- />
29
- <span>按钮下拉框(多选)</span>
30
- <BtnSelect
31
- label="名称"
32
- options={options.value}
33
- multiple={true}
34
- modelValue={multiValue.value}
35
- onUpdate:modelValue={(v) => {
36
- multiValue.value = v;
37
- }}
38
- />
39
- <span>按钮下拉框(带搜索)</span>
40
- <BtnSelect
41
- label="名称"
42
- options={options.value}
43
- searchable={true}
44
- multiple={true}
45
- collapseTags={true}
46
- itemRender={(opt, { checked }) => (
47
- <div style="display:flex;align-items:center;justify-content:space-between;min-width:200px;">
48
- <span>
49
- {opt.label}
50
- {opt.disabled ? <span style="margin-left:8px;color:#F56C6C;">禁用</span> : null}
51
- </span>
52
- {checked ? (
53
- <span style="color:#67C23A;">✓ 已选</span>
54
- ) : (
55
- <span style="color:#909399;">点击选择</span>
56
- )}
57
- </div>
58
- )}
59
- modelValue={searchValue.value}
60
- onUpdate:modelValue={(v) => {
61
- searchValue.value = v;
62
- }}
63
- />
64
- </div>
65
- </>
66
- );
67
- },
68
- });
69
- </script>
@@ -1,44 +0,0 @@
1
- <script lang="jsx">
2
- import { defineComponent, Fragment } from 'vue'
3
- import { ElButton } from 'element-plus'
4
- import { useRouter, useRoute } from 'vue-router'
5
-
6
- export default defineComponent({
7
- name: 'ComView',
8
- setup(props, { slots, emit ,attrs}) {
9
- console.log(props, 'props');
10
- console.log(attrs, 'attrs');
11
- const router = useRouter()
12
- console.log(router, 'router');
13
- const goHome = () => {
14
- router.push('/')
15
- }
16
- const route = useRoute()
17
- console.log(route, 'route');
18
-
19
- return () => (
20
- <>
21
- <div>ComView</div>
22
- <div>props: {attrs.count}</div>
23
- <ElButton
24
- type="primary"
25
- onClick={() => {
26
- attrs.dialog.close()
27
- }}
28
- >
29
- close dialog
30
- </ElButton>
31
- <ElButton
32
- type="primary"
33
- onClick={() => {
34
- goHome()
35
- attrs.dialog.close()
36
- }}
37
- >
38
- go home
39
- </ElButton>
40
- </>
41
- )
42
- }
43
- })
44
- </script>
@@ -1,66 +0,0 @@
1
- import { defineComponent, ref, h, render } from 'vue'
2
- import { ElDialog, ElButton } from 'element-plus'
3
-
4
- export const openDialog = (options = {}, appContext) => {
5
- const {
6
- props = {},
7
- events = {},
8
- slots = {}
9
- } = options
10
-
11
- const container = document.createElement('div')
12
- document.body.appendChild(container)
13
-
14
- let vnode
15
- const visible = ref(true)
16
- const DialogHost = defineComponent({
17
- name: 'FunctionDialogHost',
18
- setup(props,{expose}) {
19
- const handleSlot = () => {
20
- const slotList = {}
21
- for (const slotName in slots) {
22
- if (slots.hasOwnProperty(slotName)) {
23
- const slot = slots[slotName]
24
- if (slot) {
25
- slotList[slotName] = slot()
26
- }
27
- }
28
- }
29
- return slotList
30
- }
31
- const cleanup = () => {
32
- try {
33
- render(null, container)
34
- } catch {}
35
- if (container && container.parentNode) {
36
- container.parentNode.removeChild(container)
37
- }
38
- }
39
-
40
- // 返回 JSX 渲染函数
41
- return () => (
42
- <ElDialog
43
- modelValue={visible.value}
44
- onUpdate:modelValue={(v) => { visible.value = v }}
45
- {...props}
46
- {...events}
47
- destroyOnClose={true}
48
- onClosed={cleanup}
49
- >
50
- {handleSlot()}
51
- </ElDialog>
52
- )
53
- }
54
- })
55
- vnode = h(DialogHost)
56
- if (appContext) vnode.appContext = appContext
57
- render(vnode, container)
58
- const close = () => {
59
- visible.value = false
60
- }
61
- return {
62
- close,
63
- }
64
- }
65
-
66
- export default openDialog
@@ -1,72 +0,0 @@
1
- <script lang="jsx">
2
- import { defineComponent, ref, h, Fragment, getCurrentInstance } from "vue";
3
- import PropsView from "./props.vue";
4
- import openDialog from "./dialog.jsx";
5
- import ComView from "./com.vue";
6
- import BtnSelect from "./btnSelect/index.vue";
7
- export default defineComponent({
8
- name: "JsxView",
9
- setup() {
10
- const count = ref(0);
11
- const propsViewRef = ref(null);
12
- const countAdd = () => {
13
- propsViewRef.value.countAdd();
14
- };
15
- const comCount = ref(0);
16
- const open = () => {
17
- const { appContext } = getCurrentInstance() || {};
18
- let dialog = {};
19
- const options = {
20
- props: {
21
- title: "hello dialog",
22
- },
23
- events: {
24
- onClose: () => {
25
- console.log("close11");
26
- },
27
- },
28
- slots: {
29
- default: () => <ComView count={comCount.value} dialog={dialog} />,
30
- title: () => <div>title slot</div>,
31
- footer: () => <div>footer slot</div>,
32
- },
33
- };
34
- dialog.close = openDialog(options, appContext).close;
35
- };
36
- const activeTab = ref("btnSelect");
37
- return () => (
38
- <>
39
- <el-tabs v-model={activeTab.value} type="border-card">
40
- <el-tab-pane label="首页" name="first"> <div>
41
- 123
42
- <span>
43
- <el-button type="primary" onClick={open}>
44
- open dialog
45
- </el-button>
46
- <el-button type="primary" onClick={countAdd}>
47
- props countAdd
48
- </el-button>
49
- <div>count: {count.value}</div>
50
- <PropsView
51
- ref={propsViewRef}
52
- msg="hello props"
53
- onMyEvent={() => {
54
- count.value++;
55
- }}
56
- >
57
- {{
58
- default: () => <div>default slot</div>,
59
- }}
60
- </PropsView>
61
- </span>
62
- </div></el-tab-pane>
63
- <el-tab-pane label="按钮下拉框" name="btnSelect">
64
- <BtnSelect />
65
- </el-tab-pane>
66
- </el-tabs>
67
-
68
- </>
69
- );
70
- },
71
- });
72
- </script>
@@ -1,33 +0,0 @@
1
- <script lang="jsx">
2
- import { defineComponent, ref, h, Fragment } from 'vue'
3
-
4
- export default defineComponent({
5
- name: 'PropsView',
6
- emits: ['myEvent'],
7
- setup(props, { attrs, emit ,slots ,expose }) {
8
- console.log(props, 'props');
9
- console.log(attrs, 'attrs');
10
- console.log(emit, 'emit');
11
- console.log(slots, 'slots');
12
- console.log(expose, 'expose');
13
- const count = ref(0);
14
- const countAdd = () => {
15
- count.value++;
16
- }
17
- expose({
18
- countAdd,
19
- })
20
- return () => <>
21
- <div>
22
- {attrs.msg}
23
- <div>props count: {count.value}</div>
24
- {slots.default()}
25
- <el-button type="primary" onClick={() => {
26
- console.log('myEvent');
27
-
28
- emit('myEvent')
29
- }}>countAdd</el-button>
30
- </div></>
31
- }
32
- })
33
- </script>
@@ -1,225 +0,0 @@
1
- <template>
2
- <div class="parent-to-child">
3
- <h2 class="page-title">消息接收中心</h2>
4
-
5
- <div class="message-container">
6
- <div class="message-section">
7
- <div class="section-header">
8
- <h3>全局广播消息</h3>
9
- <el-button type="primary" size="small" @click="clearGlobalMessages">
10
- 清空消息
11
- </el-button>
12
- </div>
13
- <div class="message-list" v-if="globalMessages.length">
14
- <div v-for="(msg, index) in globalMessages"
15
- :key="index"
16
- class="message-item">
17
- <div class="message-header">
18
- <span class="message-time">{{ msg.time }}</span>
19
- <span class="message-type" :class="msg.type">{{ msg.type }}</span>
20
- </div>
21
- <h4 class="message-title">{{ msg.title }}</h4>
22
- <p class="message-content">{{ msg.message }}</p>
23
- </div>
24
- </div>
25
- <div v-else class="empty-message">
26
- 暂无消息
27
- </div>
28
- </div>
29
-
30
- <div class="message-section">
31
- <div class="section-header">
32
- <h3>定向消息</h3>
33
- <el-button type="primary" size="small" @click="clearDirectMessages">
34
- 清空消息
35
- </el-button>
36
- </div>
37
- <div class="message-list" v-if="directMessages.length">
38
- <div v-for="(msg, index) in directMessages"
39
- :key="index"
40
- class="message-item">
41
- <div class="message-header">
42
- <span class="message-time">{{ msg.time }}</span>
43
- <span class="message-type" :class="msg.type">{{ msg.type }}</span>
44
- </div>
45
- <h4 class="message-title">{{ msg.title }}</h4>
46
- <p class="message-content">{{ msg.message }}</p>
47
- </div>
48
- </div>
49
- <div v-else class="empty-message">
50
- 暂无消息
51
- </div>
52
- </div>
53
- </div>
54
- </div>
55
- </template>
56
-
57
- <script setup>
58
- import { ref, onMounted } from 'vue'
59
-
60
- const globalMessages = ref([])
61
- const directMessages = ref([])
62
-
63
- const formatTime = () => {
64
- const now = new Date()
65
- return `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`
66
- }
67
-
68
- const clearGlobalMessages = () => {
69
- globalMessages.value = []
70
- }
71
-
72
- const clearDirectMessages = () => {
73
- directMessages.value = []
74
- }
75
-
76
- onMounted(() => {
77
- // 监听全局广播消息
78
- window.$wujie?.bus.$on('global-message', (data) => {
79
- globalMessages.value.unshift({
80
- ...data,
81
- time: formatTime()
82
- })
83
- })
84
-
85
- // 监听定向消息
86
- window.$wujie?.bus.$on('vue3-child-message', (data) => {
87
- directMessages.value.unshift({
88
- ...data,
89
- time: formatTime()
90
- })
91
- })
92
- })
93
- </script>
94
-
95
- <style scoped>
96
- .parent-to-child {
97
- padding: 24px;
98
- background-color: #f5f7fa;
99
- min-height: 100vh;
100
- }
101
-
102
- .page-title {
103
- color: #303133;
104
- margin-bottom: 24px;
105
- font-size: 24px;
106
- }
107
-
108
- .message-container {
109
- display: grid;
110
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
111
- gap: 24px;
112
- }
113
-
114
- .message-section {
115
- background: white;
116
- border-radius: 8px;
117
- padding: 20px;
118
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
119
- }
120
-
121
- .section-header {
122
- display: flex;
123
- justify-content: space-between;
124
- align-items: center;
125
- margin-bottom: 16px;
126
- padding-bottom: 16px;
127
- border-bottom: 1px solid #ebeef5;
128
- }
129
-
130
- .section-header h3 {
131
- margin: 0;
132
- color: #303133;
133
- font-size: 18px;
134
- }
135
-
136
- .message-list {
137
- max-height: 500px;
138
- overflow-y: auto;
139
- }
140
-
141
- .message-item {
142
- padding: 12px;
143
- border-bottom: 1px solid #ebeef5;
144
- transition: background-color 0.3s;
145
- }
146
-
147
- .message-item:hover {
148
- background-color: #f5f7fa;
149
- }
150
-
151
- .message-time {
152
- font-size: 12px;
153
- color: #909399;
154
- }
155
-
156
- .message-content {
157
- margin: 8px 0 0;
158
- color: #606266;
159
- line-height: 1.5;
160
- }
161
-
162
- .empty-message {
163
- text-align: center;
164
- color: #909399;
165
- padding: 30px 0;
166
- }
167
-
168
- /* 滚动条样式 */
169
- .message-list::-webkit-scrollbar {
170
- width: 6px;
171
- }
172
-
173
- .message-list::-webkit-scrollbar-thumb {
174
- background: #c0c4cc;
175
- border-radius: 3px;
176
- }
177
-
178
- .message-list::-webkit-scrollbar-track {
179
- background: #f5f7fa;
180
- }
181
-
182
- .message-header {
183
- display: flex;
184
- justify-content: space-between;
185
- align-items: center;
186
- }
187
-
188
- .message-type {
189
- padding: 2px 6px;
190
- border-radius: 4px;
191
- font-size: 12px;
192
- }
193
-
194
- .message-type.info {
195
- background-color: #ecf5ff;
196
- color: #409eff;
197
- }
198
-
199
- .message-type.success {
200
- background-color: #f0f9eb;
201
- color: #67c23a;
202
- }
203
-
204
- .message-type.warning {
205
- background-color: #fdf6ec;
206
- color: #e6a23c;
207
- }
208
-
209
- .message-type.error {
210
- background-color: #fef0f0;
211
- color: #f56c6c;
212
- }
213
-
214
- .message-title {
215
- margin: 8px 0;
216
- font-size: 14px;
217
- color: #303133;
218
- }
219
-
220
- .message-content {
221
- margin: 8px 0 0;
222
- color: #606266;
223
- line-height: 1.5;
224
- }
225
- </style>