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.
- package/app/.codegraph/daemon.pid +6 -0
- package/app/.eslintrc.js +19 -0
- package/app/README.md +24 -0
- package/app/babel.config.js +5 -0
- package/app/devtool-windows-amd64.zip +0 -0
- package/app/docs/superpowers/plans/2026-05-29-quill-editor.md +836 -0
- package/app/docs/superpowers/specs/2026-05-29-quill-editor-design.md +210 -0
- package/app/docs/superpowers/specs/2026-06-06-lazy-cascader-design.md +400 -0
- package/app/jsconfig.json +19 -0
- package/app/package-lock.json +21347 -0
- package/app/package.json +63 -0
- package/app/postcss.config.js +10 -0
- package/app/public/favicon.ico +0 -0
- package/app/public/index.html +17 -0
- package/app/public//344/270/200/351/224/256/351/273/221/346/232/227.html +136 -0
- package/app/src/App.vue +110 -0
- package/app/src/assets/bpmn-camunda.jpg +0 -0
- package/app/src/assets/css/diagram.less +17 -0
- package/app/src/assets/icon/Icon.less +31 -0
- package/app/src/assets/icon/font/app-codes.css +26 -0
- package/app/src/assets/icon/font/app.eot +0 -0
- package/app/src/assets/icon/font/app.svg +60 -0
- package/app/src/assets/icon/font/app.ttf +0 -0
- package/app/src/assets/icon/font/app.woff +0 -0
- package/app/src/assets/icon/font/app.woff2 +0 -0
- package/app/src/assets/icon/font/config.json +248 -0
- package/app/src/assets/icon/font/source/raw/align-bottom-tool.svg +30 -0
- package/app/src/assets/icon/font/source/raw/align-horizontal-center-tool.svg +85 -0
- package/app/src/assets/icon/font/source/raw/align-left-tool.svg +84 -0
- package/app/src/assets/icon/font/source/raw/align-right-tool.svg +80 -0
- package/app/src/assets/icon/font/source/raw/align-top-tool.svg +84 -0
- package/app/src/assets/icon/font/source/raw/align-vertical-center-tool.svg +89 -0
- package/app/src/assets/icon/font/source/raw/distribute-horizontally-tool.svg +95 -0
- package/app/src/assets/icon/font/source/raw/distribute-vertically-tool.svg +99 -0
- package/app/src/assets/icon/font/source/raw/set-color-tool.svg +111 -0
- package/app/src/assets/icon/font/source/symbols/align-bottom-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-horizontal-center-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-left-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-right-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-top-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-vertical-center-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/distribute-horizontally-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/distribute-vertically-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/set-color-tool.svg +63 -0
- package/app/src/assets/logo.png +0 -0
- package/app/src/components/EllTable/README.md +70 -0
- package/app/src/components/EllTable/article.md +184 -0
- package/app/src/components/EllTable/index.js +213 -0
- package/app/src/components/FormulaEditor/FunctionSelector.vue +123 -0
- package/app/src/components/FormulaEditor/OperatorSelector.vue +184 -0
- package/app/src/components/FormulaEditor/ParameterSelector.vue +123 -0
- package/app/src/components/FormulaEditor/api.js +69 -0
- package/app/src/components/FormulaEditor/index.vue +435 -0
- package/app/src/components/HelloWorld.vue +58 -0
- package/app/src/components/PageHeader/index.vue +158 -0
- package/app/src/components/Splitter/README.md +144 -0
- package/app/src/components/Splitter/example.vue +88 -0
- package/app/src/components/Splitter/index.vue +203 -0
- package/app/src/components/diagram/ToolBar.vue +357 -0
- package/app/src/components/diagram/customTranslate/customTranslate.js +12 -0
- package/app/src/components/diagram/customTranslate/translationsGerman.js +241 -0
- package/app/src/components/diagram/index.vue +261 -0
- package/app/src/components/diagram/xmlData.js +29 -0
- package/app/src/directives/filldown.js +155 -0
- package/app/src/directives/filldownTable.js +291 -0
- package/app/src/main.js +40 -0
- package/app/src/router/index.js +63 -0
- package/app/src/store/index.js +23 -0
- package/app/src/utils/winBox.js +23 -0
- package/app/src/views/Extend/A.vue +12 -0
- package/app/src/views/Extend/B.vue +10 -0
- package/app/src/views/Extend/MagicalComponentsForELFormItem.vue +87 -0
- package/app/src/views/Extend/index.vue +59 -0
- package/app/src/views/Extend/tableMouseHorizontalWheel.vue +193 -0
- package/app/src/views/Home.vue +37 -0
- package/app/src/views/RouterJump.vue +155 -0
- package/app/src/views/css.vue +57 -0
- package/app/src/views/cssComponents/EllipsisText.vue +83 -0
- package/app/src/views/cssComponents/HoverCard.vue +79 -0
- package/app/src/views/cssComponents/TableHover.vue +140 -0
- package/app/src/views/cssComponents/inputSlo.vue +52 -0
- package/app/src/views/cssComponents/tableFixed.vue +158 -0
- package/app/src/views/echarts/echart-dome.vue +82 -0
- package/app/src/views/echarts/index.vue +118 -0
- package/app/src/views/echarts/pei3d.vue +667 -0
- package/app/src/views/element/bpmn/index.vue +18 -0
- package/app/src/views/element/components/attendanceCycle/index.vue +131 -0
- package/app/src/views/element/components/attendanceGroup/index.vue +147 -0
- package/app/src/views/element/components/attendancePersonnel/index.vue +158 -0
- package/app/src/views/element/components/companyCalendar/index.vue +147 -0
- package/app/src/views/element/components/shift/index.vue +147 -0
- package/app/src/views/element/components/shiftRotationSystem/index.vue +147 -0
- package/app/src/views/element/elTableJsx/columnManagement.vue +340 -0
- package/app/src/views/element/elTableJsx/dialogInput.vue +71 -0
- package/app/src/views/element/elTableJsx/elTableJsx.vue +1826 -0
- package/app/src/views/element/elTableJsx/formTable.vue +598 -0
- package/app/src/views/element/elTableJsx/index.vue +29 -0
- package/app/src/views/element/elTableJsx/simpleTable.vue +192 -0
- package/app/src/views/element/elTableJsx.zip +0 -0
- package/app/src/views/element/index.vue +44 -0
- package/app/src/views/element/lazyCascader/LazyCascader.vue +302 -0
- package/app/src/views/element/lazyCascader/data.js +205 -0
- package/app/src/views/element/lazyCascader/index.vue +315 -0
- package/app/src/views/element/quillEditor/README.md +163 -0
- package/app/src/views/element/quillEditor/example.vue +314 -0
- package/app/src/views/element/quillEditor/index.vue +409 -0
- package/app/src/views/element/quillEditor/toolbar.js +122 -0
- package/app/vue.config.js +15 -0
- package/package.json +1 -1
- package/app/wujie-vue3-child/.claude/settings.local.json +0 -8
- package/app/wujie-vue3-child/.vscode/extensions.json +0 -3
- package/app/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
- package/app/wujie-vue3-child/README.md +0 -5
- package/app/wujie-vue3-child/index.html +0 -13
- package/app/wujie-vue3-child/package-lock.json +0 -5744
- package/app/wujie-vue3-child/package.json +0 -28
- package/app/wujie-vue3-child/public/vite.svg +0 -1
- package/app/wujie-vue3-child/src/App.vue +0 -130
- package/app/wujie-vue3-child/src/assets/vue.svg +0 -1
- package/app/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
- package/app/wujie-vue3-child/src/components/tags-view.vue +0 -193
- package/app/wujie-vue3-child/src/components/tags-view1.vue +0 -131
- package/app/wujie-vue3-child/src/directives/aiLoading.js +0 -182
- package/app/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
- package/app/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
- package/app/wujie-vue3-child/src/main.js +0 -18
- package/app/wujie-vue3-child/src/router/index.js +0 -104
- package/app/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
- package/app/wujie-vue3-child/src/style.css +0 -171
- package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
- package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
- package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
- package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
- package/app/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -293
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
- package/app/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
- package/app/wujie-vue3-child/src/views/home.vue +0 -53
- package/app/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
- package/app/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
- package/app/wujie-vue3-child/src/views/jsx/com.vue +0 -44
- package/app/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
- package/app/wujie-vue3-child/src/views/jsx/index.vue +0 -72
- package/app/wujie-vue3-child/src/views/jsx/props.vue +0 -33
- package/app/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
- package/app/wujie-vue3-child/src/views/phone-code.vue +0 -318
- package/app/wujie-vue3-child/src/views/router-jump.vue +0 -123
- package/app/wujie-vue3-child/src/views/test.vue +0 -192
- package/app/wujie-vue3-child/vite.config.js +0 -15
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// 通用悬浮窗选择器样式
|
|
2
|
-
.popoverSelector {
|
|
3
|
-
position: relative;
|
|
4
|
-
display: inline-block;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// 触发器容器
|
|
8
|
-
.trigger {
|
|
9
|
-
display: inline-block;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// 悬浮窗容器
|
|
13
|
-
.dropdown {
|
|
14
|
-
position: fixed;
|
|
15
|
-
background: #fff;
|
|
16
|
-
border: 1px solid #e4e7ed;
|
|
17
|
-
border-radius: 4px;
|
|
18
|
-
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
19
|
-
z-index: 2000;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// 带动画的悬浮窗
|
|
24
|
-
.dropdown.animated {
|
|
25
|
-
animation: dropdownSlideIn 0.2s ease-out;
|
|
26
|
-
transform-origin: top;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// 下拉框淡入动画
|
|
30
|
-
@keyframes dropdownSlideIn {
|
|
31
|
-
from {
|
|
32
|
-
opacity: 0;
|
|
33
|
-
transform: scaleY(0.8);
|
|
34
|
-
}
|
|
35
|
-
to {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
transform: scaleY(1);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
# 部门选择器组件
|
|
2
|
-
|
|
3
|
-
本目录包含一个核心组件:`DepartmentSelector`(部门选择器)。
|
|
4
|
-
|
|
5
|
-
## 组件说明
|
|
6
|
-
|
|
7
|
-
### DepartmentSelector(部门选择器)
|
|
8
|
-
|
|
9
|
-
下拉树形结构的部门选择器,支持单选或多选,聚焦时悬浮显示。
|
|
10
|
-
|
|
11
|
-
**功能特性:**
|
|
12
|
-
- 使用 Element Plus 的 el-tree 组件
|
|
13
|
-
- 输入框聚焦时才显示树形结构
|
|
14
|
-
- 智能悬浮定位(根据可用空间自动显示在输入框上方或下方)
|
|
15
|
-
- 支持单选和多选模式
|
|
16
|
-
- 单选时显示文本,右侧带下拉箭头图标
|
|
17
|
-
- 多选时以 Tag 组件形式展示选中值,每个 Tag 可单独删除
|
|
18
|
-
- 支持 `collapse-tags` 属性折叠标签(显示第一个 + 剩余数量)
|
|
19
|
-
- 支持 `collapse-tags-tooltip` 属性,鼠标悬停显示所有选中值
|
|
20
|
-
- 支持 `max-collapse-tags` 属性限制显示的标签数量
|
|
21
|
-
- 支持清空按钮(通过 `clearable` 属性控制,默认关闭)
|
|
22
|
-
- 支持搜索过滤
|
|
23
|
-
- 异步加载数据(模拟接口)
|
|
24
|
-
- 响应式定位(窗口大小改变或滚动时自动调整)
|
|
25
|
-
|
|
26
|
-
**Props:**
|
|
27
|
-
- `modelValue: number|string|Array` - 选中的部门ID(单选时为 number/string,多选时为 Array)
|
|
28
|
-
- `multiple: boolean` - 是否多选,默认 `false`
|
|
29
|
-
- `placeholder: string` - 输入框占位文本,默认 `"请选择部门"`
|
|
30
|
-
- `disabled: boolean` - 是否禁用,默认 `false`
|
|
31
|
-
- `clearable: boolean` - 是否可清空,默认 `false`
|
|
32
|
-
- `collapseTags: boolean` - 多选时是否将选中值折叠显示(显示第一个+剩余数量),默认 `false`
|
|
33
|
-
- `collapseTagsTooltip: boolean` - 当鼠标悬停于折叠标签时是否显示所有选中的标签,需要配合 `collapseTags` 使用,默认 `false`
|
|
34
|
-
- `maxCollapseTags: number` - 多选时最多显示的标签数量,超出部分折叠显示,为 0 则不限制,默认 `0`
|
|
35
|
-
|
|
36
|
-
**Events:**
|
|
37
|
-
- `update:modelValue` - 选择变化时触发
|
|
38
|
-
- `change` - 选择变化时触发,参数为选中的部门ID(单选)或ID数组(多选)
|
|
39
|
-
|
|
40
|
-
**使用示例:**
|
|
41
|
-
|
|
42
|
-
```jsx
|
|
43
|
-
import DepartmentSelector from './components/DepartmentSelector'
|
|
44
|
-
|
|
45
|
-
// 单选模式
|
|
46
|
-
const selectedDept = ref(null)
|
|
47
|
-
<DepartmentSelector
|
|
48
|
-
v-model={selectedDept.value}
|
|
49
|
-
placeholder="请选择部门"
|
|
50
|
-
clearable={true}
|
|
51
|
-
onChange={(id) => console.log('选中部门ID:', id)}
|
|
52
|
-
/>
|
|
53
|
-
|
|
54
|
-
// 多选模式 - 默认(显示所有标签)
|
|
55
|
-
const selectedDepts = ref([])
|
|
56
|
-
<DepartmentSelector
|
|
57
|
-
v-model={selectedDepts.value}
|
|
58
|
-
multiple={true}
|
|
59
|
-
placeholder="请选择部门(可多选)"
|
|
60
|
-
clearable={true}
|
|
61
|
-
onChange={(ids) => console.log('选中部门ID列表:', ids)}
|
|
62
|
-
/>
|
|
63
|
-
|
|
64
|
-
// 多选模式 - collapse-tags(折叠标签)
|
|
65
|
-
<DepartmentSelector
|
|
66
|
-
v-model={selectedDepts.value}
|
|
67
|
-
multiple={true}
|
|
68
|
-
collapseTags={true}
|
|
69
|
-
clearable={true}
|
|
70
|
-
/>
|
|
71
|
-
|
|
72
|
-
// 多选模式 - collapse-tags-tooltip(悬停显示详情)
|
|
73
|
-
<DepartmentSelector
|
|
74
|
-
v-model={selectedDepts.value}
|
|
75
|
-
multiple={true}
|
|
76
|
-
collapseTags={true}
|
|
77
|
-
collapseTagsTooltip={true}
|
|
78
|
-
clearable={true}
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
// 多选模式 - max-collapse-tags(限制显示标签数量)
|
|
82
|
-
<DepartmentSelector
|
|
83
|
-
v-model={selectedDepts.value}
|
|
84
|
-
multiple={true}
|
|
85
|
-
maxCollapseTags={2}
|
|
86
|
-
clearable={true}
|
|
87
|
-
/>
|
|
88
|
-
|
|
89
|
-
// 禁用状态
|
|
90
|
-
<DepartmentSelector
|
|
91
|
-
v-model={selectedDept.value}
|
|
92
|
-
disabled={true}
|
|
93
|
-
/>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## 多选标签展示模式
|
|
99
|
-
|
|
100
|
-
组件支持多种标签展示模式:
|
|
101
|
-
|
|
102
|
-
### 1. 默认模式
|
|
103
|
-
显示所有选中的标签,每个标签都可以单独删除。
|
|
104
|
-
|
|
105
|
-
```jsx
|
|
106
|
-
<DepartmentSelector
|
|
107
|
-
v-model={selectedDepts.value}
|
|
108
|
-
multiple={true}
|
|
109
|
-
/>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### 2. collapse-tags 模式
|
|
113
|
-
只显示第一个标签 + 剩余数量(如:`部门A × +3`)
|
|
114
|
-
|
|
115
|
-
```jsx
|
|
116
|
-
<DepartmentSelector
|
|
117
|
-
v-model={selectedDepts.value}
|
|
118
|
-
multiple={true}
|
|
119
|
-
collapseTags={true}
|
|
120
|
-
/>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### 3. collapse-tags-tooltip 模式
|
|
124
|
-
在 collapse-tags 基础上,鼠标悬停在剩余数量上时显示所有选中值的提示
|
|
125
|
-
|
|
126
|
-
```jsx
|
|
127
|
-
<DepartmentSelector
|
|
128
|
-
v-model={selectedDepts.value}
|
|
129
|
-
multiple={true}
|
|
130
|
-
collapseTags={true}
|
|
131
|
-
collapseTagsTooltip={true}
|
|
132
|
-
/>
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### 4. max-collapse-tags 模式
|
|
136
|
-
限制显示的标签数量,超出部分显示为 `+N`(如:`部门A × 部门B × +3`)
|
|
137
|
-
|
|
138
|
-
```jsx
|
|
139
|
-
<DepartmentSelector
|
|
140
|
-
v-model={selectedDepts.value}
|
|
141
|
-
multiple={true}
|
|
142
|
-
maxCollapseTags={2}
|
|
143
|
-
/>
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 数据格式说明
|
|
149
|
-
|
|
150
|
-
### 部门数据格式
|
|
151
|
-
```javascript
|
|
152
|
-
{
|
|
153
|
-
id: number | string, // 部门ID
|
|
154
|
-
label: string, // 部门名称
|
|
155
|
-
children?: Array // 子部门列表(可选)
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### 模拟数据和接口
|
|
160
|
-
|
|
161
|
-
部门数据存储在 `mockData.js` 文件中,提供以下方法:
|
|
162
|
-
|
|
163
|
-
**1. fetchDepartments(delay)**
|
|
164
|
-
- 模拟异步获取部门树数据
|
|
165
|
-
- 参数:`delay` - 延迟时间(毫秒),默认 500ms
|
|
166
|
-
- 返回:Promise<Array>
|
|
167
|
-
|
|
168
|
-
```javascript
|
|
169
|
-
import { fetchDepartments } from './mockData.js'
|
|
170
|
-
|
|
171
|
-
const departments = await fetchDepartments(300)
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**2. searchDepartments(keyword, departments)**
|
|
175
|
-
- 根据关键词搜索部门
|
|
176
|
-
- 参数:
|
|
177
|
-
- `keyword` - 搜索关键词
|
|
178
|
-
- `departments` - 部门树数据(可选,默认使用 mockDepartments)
|
|
179
|
-
- 返回:过滤后的部门树数组
|
|
180
|
-
|
|
181
|
-
```javascript
|
|
182
|
-
import { searchDepartments } from './mockData.js'
|
|
183
|
-
|
|
184
|
-
const filteredDepts = searchDepartments('人力资源', departments)
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## 悬浮定位逻辑
|
|
190
|
-
|
|
191
|
-
组件实现了智能的悬浮定位:
|
|
192
|
-
|
|
193
|
-
1. **空间检测**:计算输入框下方和上方的可用空间
|
|
194
|
-
2. **自动定位**:
|
|
195
|
-
- 如果下方空间足够(≥400px),显示在输入框下方
|
|
196
|
-
- 如果下方空间不足且上方空间更大,显示在输入框上方
|
|
197
|
-
3. **动态调整**:
|
|
198
|
-
- 监听窗口大小改变(resize)
|
|
199
|
-
- 监听页面滚动(scroll)
|
|
200
|
-
- 自动重新计算位置
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## 文件结构
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
departmentPersonnel/
|
|
208
|
-
├── components/
|
|
209
|
-
│ ├── DepartmentSelector.jsx # 部门选择器组件
|
|
210
|
-
│ ├── DepartmentSelector.module.scss # 部门选择器样式
|
|
211
|
-
│ └── README.md # 组件说明文档
|
|
212
|
-
├── mockData.js # 模拟数据和接口
|
|
213
|
-
└── index.jsx # 演示页面
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## 技术实现
|
|
219
|
-
|
|
220
|
-
1. **使用的技术**:
|
|
221
|
-
- Vue 3 Composition API
|
|
222
|
-
- JSX 语法
|
|
223
|
-
- Element Plus(el-tree, el-input)
|
|
224
|
-
- CSS Modules
|
|
225
|
-
|
|
226
|
-
2. **核心功能实现**:
|
|
227
|
-
- 使用 `getBoundingClientRect()` 获取元素位置
|
|
228
|
-
- 使用 `position: fixed` 实现悬浮定位
|
|
229
|
-
- 使用 `el-tree` 的 `filter-node-method` 实现搜索
|
|
230
|
-
- 使用事件监听实现点击外部关闭
|
|
231
|
-
|
|
232
|
-
3. **性能优化**:
|
|
233
|
-
- 懒加载:首次聚焦时才加载数据
|
|
234
|
-
- 事件节流:滚动和 resize 事件自动重新计算位置
|
|
235
|
-
- 组件卸载时清理事件监听器
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## 注意事项
|
|
240
|
-
|
|
241
|
-
1. 确保项目已安装并正确配置 Element Plus
|
|
242
|
-
2. 组件使用 Vue 3 Composition API 和 JSX 语法
|
|
243
|
-
3. 样式使用 CSS Modules,确保样式隔离
|
|
244
|
-
4. 下拉框使用 `position: fixed` 定位,不受父容器 overflow 限制
|
|
245
|
-
5. 组件会自动处理窗口滚动和大小改变事件
|
|
246
|
-
6. `clearable` 属性默认为 `false`,需要显示清除按钮时需要手动设置为 `true`
|
|
247
|
-
7. 多选模式下,单击 Tag 的关闭按钮可以删除单个选项,点击清除按钮可以清空所有选项
|
|
248
|
-
8. `collapse-tags-tooltip` 需要配合 `collapse-tags` 一起使用才有效果
|
package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref } from 'vue'
|
|
2
|
-
import { ArrowDown, CircleClose } from '@element-plus/icons-vue'
|
|
3
|
-
import styles from './DepartmentSelector.module.scss'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 选择器触发器组件
|
|
7
|
-
* @component SelectorTrigger
|
|
8
|
-
* @description 提供统一的触发器UI,支持输入框和按钮两种模式
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* // 输入框模式
|
|
12
|
-
* <SelectorTrigger
|
|
13
|
-
* displayType="input"
|
|
14
|
-
* visible={visible}
|
|
15
|
-
* disabled={false}
|
|
16
|
-
* clearable={true}
|
|
17
|
-
* hasValue={true}
|
|
18
|
-
* onClick={handleOpen}
|
|
19
|
-
* onClear={handleClear}
|
|
20
|
-
* >
|
|
21
|
-
* <span>选择的内容</span>
|
|
22
|
-
* </SelectorTrigger>
|
|
23
|
-
*
|
|
24
|
-
* // 按钮模式
|
|
25
|
-
* <SelectorTrigger
|
|
26
|
-
* displayType="button"
|
|
27
|
-
* visible={visible}
|
|
28
|
-
* disabled={false}
|
|
29
|
-
* clearable={true}
|
|
30
|
-
* hasValue={true}
|
|
31
|
-
* onClick={handleOpen}
|
|
32
|
-
* onClear={handleClear}
|
|
33
|
-
* >
|
|
34
|
-
* <span>选择的内容</span>
|
|
35
|
-
* </SelectorTrigger>
|
|
36
|
-
*/
|
|
37
|
-
export default defineComponent({
|
|
38
|
-
name: 'SelectorTrigger',
|
|
39
|
-
|
|
40
|
-
props: {
|
|
41
|
-
/**
|
|
42
|
-
* 显示类型:input 输入框模式 | button 按钮模式
|
|
43
|
-
* @type {string}
|
|
44
|
-
*/
|
|
45
|
-
displayType: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: 'input',
|
|
48
|
-
validator: (value) => ['input', 'button'].includes(value),
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* 悬浮窗是否可见
|
|
52
|
-
* @type {boolean}
|
|
53
|
-
*/
|
|
54
|
-
visible: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false,
|
|
57
|
-
},
|
|
58
|
-
/**
|
|
59
|
-
* 是否禁用
|
|
60
|
-
* @type {boolean}
|
|
61
|
-
*/
|
|
62
|
-
disabled: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: false,
|
|
65
|
-
},
|
|
66
|
-
/**
|
|
67
|
-
* 是否可清空
|
|
68
|
-
* @type {boolean}
|
|
69
|
-
*/
|
|
70
|
-
clearable: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: false,
|
|
73
|
-
},
|
|
74
|
-
/**
|
|
75
|
-
* 是否有选中值
|
|
76
|
-
* @type {boolean}
|
|
77
|
-
*/
|
|
78
|
-
hasValue: {
|
|
79
|
-
type: Boolean,
|
|
80
|
-
default: false,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
emits: ['click', 'clear'],
|
|
85
|
-
|
|
86
|
-
setup(props, { emit, slots }) {
|
|
87
|
-
// 输入框/按钮是否被hover
|
|
88
|
-
const isHovering = ref(false)
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* 点击处理
|
|
92
|
-
*/
|
|
93
|
-
const handleClick = () => {
|
|
94
|
-
if (!props.disabled) {
|
|
95
|
-
emit('click')
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* 清空处理
|
|
101
|
-
* @param {Event} e - 事件对象
|
|
102
|
-
*/
|
|
103
|
-
const handleClear = (e) => {
|
|
104
|
-
e.stopPropagation()
|
|
105
|
-
emit('clear', e)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* 渲染图标区域
|
|
110
|
-
*/
|
|
111
|
-
const renderIcons = () => {
|
|
112
|
-
// 是否显示清除图标(有值 + hover + clearable)
|
|
113
|
-
const showClearIcon = props.clearable && props.hasValue && isHovering.value
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<div class={styles.suffixIcons}>
|
|
117
|
-
{/* 清除按钮(hover时显示) */}
|
|
118
|
-
{showClearIcon && (
|
|
119
|
-
<el-icon
|
|
120
|
-
class={styles.clearIcon}
|
|
121
|
-
onClick={handleClear}
|
|
122
|
-
>
|
|
123
|
-
<CircleClose />
|
|
124
|
-
</el-icon>
|
|
125
|
-
)}
|
|
126
|
-
|
|
127
|
-
{/* 下拉箭头(未hover或无值时显示) */}
|
|
128
|
-
{!showClearIcon && (
|
|
129
|
-
<el-icon
|
|
130
|
-
class={[
|
|
131
|
-
styles.arrowIcon,
|
|
132
|
-
props.visible && styles.reverse,
|
|
133
|
-
]}
|
|
134
|
-
>
|
|
135
|
-
<ArrowDown />
|
|
136
|
-
</el-icon>
|
|
137
|
-
)}
|
|
138
|
-
</div>
|
|
139
|
-
)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return () => {
|
|
143
|
-
// 获取插槽内容
|
|
144
|
-
const content = slots.default?.()
|
|
145
|
-
|
|
146
|
-
if (props.displayType === 'button') {
|
|
147
|
-
return (
|
|
148
|
-
<el-button
|
|
149
|
-
disabled={props.disabled}
|
|
150
|
-
onClick={handleClick}
|
|
151
|
-
onMouseenter={() => (isHovering.value = true)}
|
|
152
|
-
onMouseleave={() => (isHovering.value = false)}
|
|
153
|
-
class={styles.buttonWrapper}
|
|
154
|
-
>
|
|
155
|
-
{{
|
|
156
|
-
default: () => (
|
|
157
|
-
<div class={styles.buttonInner}>
|
|
158
|
-
{/* 内容区域 */}
|
|
159
|
-
<div class={styles.buttonContent}>
|
|
160
|
-
{content}
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
{/* 右侧图标区域 */}
|
|
164
|
-
{renderIcons()}
|
|
165
|
-
</div>
|
|
166
|
-
),
|
|
167
|
-
}}
|
|
168
|
-
</el-button>
|
|
169
|
-
)
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
return (
|
|
173
|
-
<div
|
|
174
|
-
class={[
|
|
175
|
-
styles.customInput,
|
|
176
|
-
props.disabled && styles.disabled,
|
|
177
|
-
props.visible && styles.focused,
|
|
178
|
-
]}
|
|
179
|
-
onClick={handleClick}
|
|
180
|
-
onMouseenter={() => (isHovering.value = true)}
|
|
181
|
-
onMouseleave={() => (isHovering.value = false)}
|
|
182
|
-
>
|
|
183
|
-
{/* 内容区域 */}
|
|
184
|
-
<div class={styles.inputContent}>
|
|
185
|
-
{content}
|
|
186
|
-
</div>
|
|
187
|
-
|
|
188
|
-
{/* 右侧图标区域 */}
|
|
189
|
-
{renderIcons()}
|
|
190
|
-
</div>
|
|
191
|
-
)
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
})
|