npmapps 1.0.25 → 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/SmartAnchorTabs/index.jsx +0 -224
- package/app/wujie-vue3-child/src/components/SmartAnchorTabs/style.css +0 -154
- 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 -375
- 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,193 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tags-container">
|
|
3
|
-
<draggable
|
|
4
|
-
:list="tagsViewList.list"
|
|
5
|
-
ghost-class="ghost"
|
|
6
|
-
chosen-class="chosenClass"
|
|
7
|
-
animation="300"
|
|
8
|
-
@start="onStart"
|
|
9
|
-
@end="onEnd"
|
|
10
|
-
>
|
|
11
|
-
<template #item="{ element }">
|
|
12
|
-
<div
|
|
13
|
-
:key="element.path"
|
|
14
|
-
class="tag"
|
|
15
|
-
@contextmenu.prevent="openContextMenu($event, element)"
|
|
16
|
-
@drag="dragging($event,element)"
|
|
17
|
-
>
|
|
18
|
-
{{ element.meta.title }}
|
|
19
|
-
<span class="close-btn" @click="closeTag(element)">✖</span>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
</draggable>
|
|
23
|
-
<div
|
|
24
|
-
v-if="contextMenuVisible"
|
|
25
|
-
class="context-menu"
|
|
26
|
-
:style="{ top: contextMenuPosition.y + 'px', left: contextMenuPosition.x + 'px' }"
|
|
27
|
-
>
|
|
28
|
-
<ul>
|
|
29
|
-
<li @click="closeTag(contextMenuItem)">关闭标签</li>
|
|
30
|
-
<li @click="closeOtherTag(contextMenuItem)">关闭其他标签</li>
|
|
31
|
-
<li @click="closeAllTag()">关闭所有标签</li>
|
|
32
|
-
</ul>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="dragging-info" v-if="isDragging" :style="{top: clientY + 'px', left: clientX + 'px'}" >
|
|
35
|
-
<p>screenX: {{ clientX }}</p>
|
|
36
|
-
<p>screenY: {{ clientY }}</p>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script setup>
|
|
42
|
-
import { useTagsViewStore } from "../store/tagsViewStroe";
|
|
43
|
-
import { useRouter } from "vue-router";
|
|
44
|
-
import { ref, watch, reactive ,onMounted} from "vue";
|
|
45
|
-
import draggable from "vuedraggable";
|
|
46
|
-
import { throttle } from 'lodash';
|
|
47
|
-
const tagsViewStore = useTagsViewStore();
|
|
48
|
-
const router = useRouter();
|
|
49
|
-
|
|
50
|
-
const isDragging = ref(false);
|
|
51
|
-
|
|
52
|
-
const tagsViewList = reactive({
|
|
53
|
-
list: tagsViewStore.tagsViewList,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
watch(tagsViewList, (newVal) => {
|
|
57
|
-
console.log(newVal);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// 监听路由变化
|
|
61
|
-
router.afterEach((to, from) => {
|
|
62
|
-
tagsViewStore.addTagsView(to);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const closeTag = (tag) => {
|
|
66
|
-
tagsViewStore.removeTagsView(tag);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const closeOtherTag = (tag) => {
|
|
70
|
-
tagsViewStore.removeOtherTagsView(tag);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const closeAllTag = () => {
|
|
74
|
-
tagsViewStore.clearTagsView();
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const contextMenuVisible = ref(false);
|
|
78
|
-
const contextMenuPosition = ref({ x: 0, y: 0 });
|
|
79
|
-
const contextMenuItem = ref(null);
|
|
80
|
-
|
|
81
|
-
const openContextMenu = (event, item) => {
|
|
82
|
-
contextMenuPosition.value = { x: event.clientX, y: event.clientY };
|
|
83
|
-
contextMenuItem.value = item;
|
|
84
|
-
contextMenuVisible.value = true;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
// 添加点击页面其他位置隐藏菜单的逻辑
|
|
88
|
-
window.addEventListener("click", () => {
|
|
89
|
-
contextMenuVisible.value = false;
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
const onStart = () => {
|
|
93
|
-
console.log("onStart");
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
onMounted(() => {
|
|
97
|
-
// window.addEventListener("mousemove", dragging);
|
|
98
|
-
})
|
|
99
|
-
|
|
100
|
-
const clientX = ref(0);
|
|
101
|
-
const clientY = ref(0);
|
|
102
|
-
|
|
103
|
-
const dragging = throttle((e) => {
|
|
104
|
-
|
|
105
|
-
// 鼠标往下移动100px再显示
|
|
106
|
-
if(e.clientY > 120){
|
|
107
|
-
isDragging.value = true;
|
|
108
|
-
console.log("dragging", e);
|
|
109
|
-
clientX.value = e.clientX;
|
|
110
|
-
clientY.value = e.clientY;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}, 1); // 更新频率设置为每100毫秒触发一次
|
|
115
|
-
|
|
116
|
-
const onEnd = () => {
|
|
117
|
-
console.log("onEnd");
|
|
118
|
-
isDragging.value = false;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
</script>
|
|
122
|
-
|
|
123
|
-
<style scoped lang="scss">
|
|
124
|
-
.dragging-info{
|
|
125
|
-
position: absolute;
|
|
126
|
-
z-index: 1000;
|
|
127
|
-
background-color: #fff;
|
|
128
|
-
padding: 10px;
|
|
129
|
-
border: 1px solid #000;
|
|
130
|
-
}
|
|
131
|
-
.tags-container {
|
|
132
|
-
display: flex;
|
|
133
|
-
flex-wrap: wrap;
|
|
134
|
-
padding: 10px;
|
|
135
|
-
background-color: #f5f5f5;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.tag {
|
|
139
|
-
margin: 5px;
|
|
140
|
-
padding: 5px 10px;
|
|
141
|
-
background-color: #e0e0e0;
|
|
142
|
-
border-radius: 5px;
|
|
143
|
-
cursor: pointer;
|
|
144
|
-
transition: background-color 0.3s;
|
|
145
|
-
user-select: none;
|
|
146
|
-
display: inline-block;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.tag:hover {
|
|
150
|
-
background-color: #d0d0d0;
|
|
151
|
-
.close-btn {
|
|
152
|
-
display: inline-block;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.close-btn {
|
|
157
|
-
margin-left: 5px;
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
display: none;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.context-menu {
|
|
163
|
-
position: absolute;
|
|
164
|
-
top: 0;
|
|
165
|
-
left: 0;
|
|
166
|
-
background-color: #fff;
|
|
167
|
-
z-index: 1000;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.context-menu ul {
|
|
171
|
-
list-style: none;
|
|
172
|
-
padding: 10px;
|
|
173
|
-
margin: 0;
|
|
174
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.context-menu li {
|
|
178
|
-
padding: 8px 12px;
|
|
179
|
-
cursor: pointer;
|
|
180
|
-
&:hover {
|
|
181
|
-
background-color: #f0f0f0;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.ghost {
|
|
186
|
-
opacity: 0;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.chosenClass {
|
|
190
|
-
background-color: #3FB37F !important;
|
|
191
|
-
border: 1px solid #3FB37F !important;
|
|
192
|
-
}
|
|
193
|
-
</style>
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tags-container">
|
|
3
|
-
<span v-for="item in tagsViewStore.getTagsViewList()" :key="item.path" draggable="true"
|
|
4
|
-
@dragstart="onDragStart($event,item)"
|
|
5
|
-
@dragend="onDragEnd($event,item)"
|
|
6
|
-
|
|
7
|
-
@drag="onDrop($event,item)"
|
|
8
|
-
class="tag" @contextmenu.prevent="openContextMenu($event, item)">
|
|
9
|
-
{{ item.meta.title }}
|
|
10
|
-
<span class="close-btn" @click="closeTag(item)">✖</span>
|
|
11
|
-
</span>
|
|
12
|
-
<div v-if="contextMenuVisible" class="context-menu" :style="{top: contextMenuPosition.y + 'px', left: contextMenuPosition.x + 'px'}">
|
|
13
|
-
<ul>
|
|
14
|
-
<li @click="closeTag(contextMenuItem)">关闭标签</li>
|
|
15
|
-
<li @click="closeOtherTag(contextMenuItem)">关闭其他标签</li>
|
|
16
|
-
<li @click="closeAllTag()">关闭所有标签</li>
|
|
17
|
-
</ul>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script setup>
|
|
24
|
-
import { useTagsViewStore } from '../store/tagsViewStroe'
|
|
25
|
-
import { useRouter } from 'vue-router'
|
|
26
|
-
import { ref } from 'vue'
|
|
27
|
-
|
|
28
|
-
const tagsViewStore = useTagsViewStore()
|
|
29
|
-
const router = useRouter()
|
|
30
|
-
|
|
31
|
-
// 监听路由变化
|
|
32
|
-
router.afterEach((to, from) => {
|
|
33
|
-
tagsViewStore.addTagsView(to)
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
const closeTag = (tag) => {
|
|
37
|
-
tagsViewStore.removeTagsView(tag)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const closeOtherTag = (tag) => {
|
|
41
|
-
tagsViewStore.removeOtherTagsView(tag)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const closeAllTag = () => {
|
|
45
|
-
tagsViewStore.clearTagsView()
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const contextMenuVisible = ref(false)
|
|
49
|
-
const contextMenuPosition = ref({ x: 0, y: 0 })
|
|
50
|
-
const contextMenuItem = ref(null)
|
|
51
|
-
|
|
52
|
-
const openContextMenu = (event, item) => {
|
|
53
|
-
contextMenuPosition.value = { x: event.clientX, y: event.clientY }
|
|
54
|
-
contextMenuItem.value = item
|
|
55
|
-
contextMenuVisible.value = true
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// 添加点击页面其他位置隐藏菜单的逻辑
|
|
59
|
-
window.addEventListener('click', () => {
|
|
60
|
-
contextMenuVisible.value = false
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
const onDragStart = (event,item) => {
|
|
64
|
-
console.log('onDragStart', event,item)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const onDragEnd = (event,item) => {
|
|
68
|
-
console.log('onDragEnd', event,item)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const onDrop = (event,item) => {
|
|
72
|
-
console.log('onDrop', event,item)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<style scoped lang="scss">
|
|
78
|
-
.tags-container {
|
|
79
|
-
display: flex;
|
|
80
|
-
flex-wrap: wrap;
|
|
81
|
-
padding: 10px;
|
|
82
|
-
background-color: #f5f5f5;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.tag {
|
|
86
|
-
margin: 5px;
|
|
87
|
-
padding: 5px 10px;
|
|
88
|
-
background-color: #e0e0e0;
|
|
89
|
-
border-radius: 5px;
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
transition: background-color 0.3s;
|
|
92
|
-
user-select: none;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.tag:hover {
|
|
96
|
-
background-color: #d0d0d0;
|
|
97
|
-
.close-btn {
|
|
98
|
-
display: inline-block;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.close-btn {
|
|
103
|
-
margin-left: 5px;
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
display: none;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.context-menu {
|
|
109
|
-
position: absolute;
|
|
110
|
-
top: 0;
|
|
111
|
-
left: 0;
|
|
112
|
-
background-color: #fff;
|
|
113
|
-
z-index: 1000;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.context-menu ul {
|
|
117
|
-
list-style: none;
|
|
118
|
-
padding: 10px;
|
|
119
|
-
margin: 0;
|
|
120
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.context-menu li {
|
|
124
|
-
padding: 8px 12px;
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
&:hover {
|
|
127
|
-
background-color: #f0f0f0;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
</style>
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* v-aiLoading 全局自定义指令
|
|
3
|
-
*
|
|
4
|
-
* 支持两种使用方式:
|
|
5
|
-
* 1) 基础用法(布尔或变量):
|
|
6
|
-
* v-aiLoading="loading"
|
|
7
|
-
* - loading 为 true 时显示遮罩
|
|
8
|
-
* - loading 为 false 时移除遮罩
|
|
9
|
-
*
|
|
10
|
-
* 2) 对象用法(可配置文案和自定义样式类):
|
|
11
|
-
* v-aiLoading="{ loading: loading, text: 'AI生成中...', class: 'custom-class' }"
|
|
12
|
-
* - loading:必填,布尔值,控制显示/隐藏
|
|
13
|
-
* - text:选填,提示文案,默认 'AI生成中'
|
|
14
|
-
* - class:选填,附加到遮罩元素上的 class 名,用于自定义样式
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
export const createAiLoadingOptions = (binding) => {
|
|
18
|
-
const value = binding.value
|
|
19
|
-
if (value && typeof value === 'object') {
|
|
20
|
-
return {
|
|
21
|
-
loading: !!value.loading,
|
|
22
|
-
text: value.text || 'AI生成中',
|
|
23
|
-
className: value.class || '',
|
|
24
|
-
loaderType: value.loaderType || 'bars',
|
|
25
|
-
gradient: value.gradient ?? true,
|
|
26
|
-
borderColor: value.borderColor || '#409eff'
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
loading: !!value,
|
|
31
|
-
text: 'AI生成中',
|
|
32
|
-
className: '',
|
|
33
|
-
loaderType: 'bars',
|
|
34
|
-
gradient: true,
|
|
35
|
-
borderColor: '#409eff'
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 根据配置在元素上挂载 / 更新 / 移除遮罩层
|
|
41
|
-
* @param {HTMLElement} el 指令绑定的 DOM 元素
|
|
42
|
-
* @param {import('vue').DirectiveBinding} binding 指令绑定对象
|
|
43
|
-
*/
|
|
44
|
-
export const toggleAiLoading = (el, binding) => {
|
|
45
|
-
const options = createAiLoadingOptions(binding)
|
|
46
|
-
let mask = el.__aiLoadingMask__
|
|
47
|
-
|
|
48
|
-
// loading 为 false 时移除遮罩
|
|
49
|
-
if (!options.loading) {
|
|
50
|
-
if (mask && mask.parentNode) {
|
|
51
|
-
mask.parentNode.removeChild(mask)
|
|
52
|
-
}
|
|
53
|
-
el.__aiLoadingMask__ = null
|
|
54
|
-
el.classList.remove('ai-loading-parent')
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (!mask) {
|
|
59
|
-
mask = document.createElement('div')
|
|
60
|
-
mask.className = 'ai-loading-mask'
|
|
61
|
-
if (options.className) {
|
|
62
|
-
mask.classList.add(options.className)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const content = document.createElement('div')
|
|
66
|
-
content.className = 'ai-loading-content'
|
|
67
|
-
|
|
68
|
-
const spinner = document.createElement('div')
|
|
69
|
-
spinner.className = options.loaderType === 'ring' ? 'ai-loading-spinner' : 'ai-loading-bars'
|
|
70
|
-
|
|
71
|
-
const textNode = document.createElement('div')
|
|
72
|
-
textNode.className = 'ai-loading-text'
|
|
73
|
-
textNode.textContent = options.text
|
|
74
|
-
|
|
75
|
-
content.appendChild(spinner)
|
|
76
|
-
content.appendChild(textNode)
|
|
77
|
-
mask.appendChild(content)
|
|
78
|
-
|
|
79
|
-
el.__aiLoadingMask__ = mask
|
|
80
|
-
} else {
|
|
81
|
-
const textNode = mask.querySelector('.ai-loading-text')
|
|
82
|
-
if (textNode) {
|
|
83
|
-
textNode.textContent = options.text
|
|
84
|
-
}
|
|
85
|
-
mask.className = 'ai-loading-mask'
|
|
86
|
-
if (options.className) {
|
|
87
|
-
mask.classList.add(options.className)
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const spinnerEl = el.__aiLoadingMask__ && el.__aiLoadingMask__.querySelector('.ai-loading-spinner, .ai-loading-bars')
|
|
92
|
-
if (spinnerEl) {
|
|
93
|
-
if (options.loaderType === 'ring') {
|
|
94
|
-
spinnerEl.className = 'ai-loading-spinner'
|
|
95
|
-
spinnerEl.style.borderTopColor = options.borderColor || '#409eff'
|
|
96
|
-
} else {
|
|
97
|
-
spinnerEl.className = 'ai-loading-bars'
|
|
98
|
-
spinnerEl.style.borderTopColor = ''
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (options.gradient === true) {
|
|
103
|
-
mask.classList.add('ai-loading-mask-gradient')
|
|
104
|
-
mask.style.background = ''
|
|
105
|
-
} else if (typeof options.gradient === 'string') {
|
|
106
|
-
mask.classList.remove('ai-loading-mask-gradient')
|
|
107
|
-
mask.style.background = options.gradient
|
|
108
|
-
} else {
|
|
109
|
-
mask.classList.remove('ai-loading-mask-gradient')
|
|
110
|
-
mask.style.background = 'rgba(255, 255, 255, 0.7)'
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// 保证宿主元素为定位容器
|
|
114
|
-
const computedStyle = window.getComputedStyle(el)
|
|
115
|
-
if (computedStyle.position === 'static' || !computedStyle.position) {
|
|
116
|
-
el.style.position = 'relative'
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// 挂载遮罩
|
|
120
|
-
if (!mask.parentNode) {
|
|
121
|
-
el.appendChild(mask)
|
|
122
|
-
}
|
|
123
|
-
el.classList.add('ai-loading-parent')
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const resolveAiLoadingTargetElement = (target) => {
|
|
127
|
-
if (!target) return null
|
|
128
|
-
if (typeof target === 'string') {
|
|
129
|
-
return document.querySelector(target)
|
|
130
|
-
}
|
|
131
|
-
if (target instanceof HTMLElement) {
|
|
132
|
-
return target
|
|
133
|
-
}
|
|
134
|
-
if (typeof target === 'object') {
|
|
135
|
-
if (target.value instanceof HTMLElement) {
|
|
136
|
-
return target.value
|
|
137
|
-
}
|
|
138
|
-
if (target.$el instanceof HTMLElement) {
|
|
139
|
-
return target.$el
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return null
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export const aiLoading = (target, options = {}) => {
|
|
146
|
-
const el = resolveAiLoadingTargetElement(target)
|
|
147
|
-
if (!el) {
|
|
148
|
-
return {
|
|
149
|
-
stop() {}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
const binding = { value: { ...options, loading: true } }
|
|
153
|
-
toggleAiLoading(el, binding)
|
|
154
|
-
return {
|
|
155
|
-
stop() {
|
|
156
|
-
const stopBinding = { value: { ...options, loading: false } }
|
|
157
|
-
toggleAiLoading(el, stopBinding)
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* v-aiLoading 指令实现
|
|
164
|
-
* - 在组件全局注册后即可在任意模板中直接使用
|
|
165
|
-
*/
|
|
166
|
-
export const aiLoadingDirective = {
|
|
167
|
-
mounted(el, binding) {
|
|
168
|
-
toggleAiLoading(el, binding)
|
|
169
|
-
},
|
|
170
|
-
updated(el, binding) {
|
|
171
|
-
toggleAiLoading(el, binding)
|
|
172
|
-
},
|
|
173
|
-
unmounted(el) {
|
|
174
|
-
const mask = el.__aiLoadingMask__
|
|
175
|
-
if (mask && mask.parentNode) {
|
|
176
|
-
mask.parentNode.removeChild(mask)
|
|
177
|
-
}
|
|
178
|
-
el.__aiLoadingMask__ = null
|
|
179
|
-
el.classList.remove('ai-loading-parent')
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
|
2
|
-
|
|
3
|
-
export function useClickOutside(elRef, handler) {
|
|
4
|
-
const listener = (e) => {
|
|
5
|
-
if (!elRef.value || elRef.value.contains(e.target)) return
|
|
6
|
-
handler(e)
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
onMounted (() => document.addEventListener('click', listener))
|
|
10
|
-
onBeforeUnmount(() => document.removeEventListener('click', listener))
|
|
11
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// hooks/useTableDragSort.js
|
|
2
|
-
import Sortable from 'sortablejs'
|
|
3
|
-
import { nextTick, watch, onUnmounted } from 'vue'
|
|
4
|
-
|
|
5
|
-
export function useTableDragSort(tableRef, list, options = {}) {
|
|
6
|
-
let sortable = null
|
|
7
|
-
|
|
8
|
-
const init = async () => {
|
|
9
|
-
await nextTick()
|
|
10
|
-
const tbody = tableRef.value?.$el.querySelector('.el-table__body-wrapper tbody')
|
|
11
|
-
if (!tbody) return
|
|
12
|
-
sortable?.destroy()
|
|
13
|
-
sortable = Sortable.create(tbody, {
|
|
14
|
-
animation: 150,
|
|
15
|
-
handle: '.drag-cell', // 只有手柄能拖
|
|
16
|
-
onEnd: evt => {
|
|
17
|
-
const { oldIndex, newIndex } = evt
|
|
18
|
-
if (oldIndex === undefined || newIndex === undefined) return
|
|
19
|
-
const [removed] = list.value.splice(oldIndex, 1)
|
|
20
|
-
list.value.splice(newIndex, 0, removed)
|
|
21
|
-
},
|
|
22
|
-
...options
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
watch(list, init, { deep: true, immediate: true })
|
|
27
|
-
onUnmounted(() => sortable?.destroy())
|
|
28
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import router from './router'
|
|
3
|
-
import './style.css'
|
|
4
|
-
import App from './App.vue'
|
|
5
|
-
import ElementPlus from 'element-plus'
|
|
6
|
-
import 'element-plus/dist/index.css'
|
|
7
|
-
import { createPinia } from 'pinia'
|
|
8
|
-
import { aiLoadingDirective } from './directives/aiLoading'
|
|
9
|
-
|
|
10
|
-
const app = createApp(App)
|
|
11
|
-
const pinia = createPinia()
|
|
12
|
-
|
|
13
|
-
app.directive('aiLoading', aiLoadingDirective)
|
|
14
|
-
|
|
15
|
-
app.use(ElementPlus)
|
|
16
|
-
app.use(router)
|
|
17
|
-
app.use(pinia)
|
|
18
|
-
app.mount('#app')
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
-
import Home from '../views/home.vue'
|
|
3
|
-
import Test from '../views/test.vue'
|
|
4
|
-
import PhoneCode from '../views/phone-code.vue'
|
|
5
|
-
import ChildToParent from '../views/child-to-parent.vue'
|
|
6
|
-
import ParentToChild from '../views/parent-to-child.vue'
|
|
7
|
-
import RouterJump from '../views/router-jump.vue'
|
|
8
|
-
// 定义路由配置
|
|
9
|
-
const router = createRouter({
|
|
10
|
-
history: createWebHistory(),
|
|
11
|
-
routes: [
|
|
12
|
-
{
|
|
13
|
-
path: '/',
|
|
14
|
-
name: 'home',
|
|
15
|
-
component: Home,
|
|
16
|
-
meta: {
|
|
17
|
-
title: '首页'
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// 通讯
|
|
23
|
-
{
|
|
24
|
-
path: '/contact',
|
|
25
|
-
name: 'contact',
|
|
26
|
-
meta: {
|
|
27
|
-
title: '通讯'
|
|
28
|
-
},
|
|
29
|
-
children: [
|
|
30
|
-
// 子通知父
|
|
31
|
-
{
|
|
32
|
-
path: '/contact/child-to-parent',
|
|
33
|
-
name: 'child-to-parent',
|
|
34
|
-
component: ChildToParent,
|
|
35
|
-
meta: {
|
|
36
|
-
title: '子通知父'
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
// 父通知子
|
|
40
|
-
{
|
|
41
|
-
path: '/contact/parent-to-child',
|
|
42
|
-
name: 'parent-to-child',
|
|
43
|
-
component: ParentToChild,
|
|
44
|
-
meta: {
|
|
45
|
-
title: '父通知子'
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
// 手机验证码
|
|
52
|
-
{
|
|
53
|
-
path: '/phone-code',
|
|
54
|
-
name: 'phone-code',
|
|
55
|
-
component: PhoneCode,
|
|
56
|
-
meta: {
|
|
57
|
-
title: '手机验证码'
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// 路由跳转
|
|
63
|
-
{
|
|
64
|
-
path: '/router-jump',
|
|
65
|
-
name: 'router-jump',
|
|
66
|
-
component: RouterJump,
|
|
67
|
-
meta: {
|
|
68
|
-
title: '路由跳转'
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
// jsx
|
|
72
|
-
{
|
|
73
|
-
path: '/jsx',
|
|
74
|
-
name: 'jsx',
|
|
75
|
-
component: () => import('../views/jsx/index.vue'),
|
|
76
|
-
meta: {
|
|
77
|
-
title: 'jsx'
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// 智能教练
|
|
83
|
-
{
|
|
84
|
-
path: '/ai-coach',
|
|
85
|
-
name: 'ai-coach',
|
|
86
|
-
component: () => import('../views/aiCoach/index.jsx'),
|
|
87
|
-
meta: {
|
|
88
|
-
title: '智能教练'
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
// 测试
|
|
93
|
-
{
|
|
94
|
-
path: '/test',
|
|
95
|
-
name: 'test',
|
|
96
|
-
component: Test,
|
|
97
|
-
meta: {
|
|
98
|
-
title: '测试'
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
]
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
export default router
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { defineStore } from 'pinia'
|
|
2
|
-
|
|
3
|
-
export const useTagsViewStore = defineStore('tagsView', {
|
|
4
|
-
state: () => ({
|
|
5
|
-
tagsViewList: [],
|
|
6
|
-
}),
|
|
7
|
-
actions: {
|
|
8
|
-
addTagsView(tag) {
|
|
9
|
-
|
|
10
|
-
// 判断是否已经存在
|
|
11
|
-
const isExist = this.tagsViewList.some(item => item.path === tag.path)
|
|
12
|
-
if(isExist){
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
this.tagsViewList.push(tag)
|
|
17
|
-
},
|
|
18
|
-
removeTagsView(tag) {
|
|
19
|
-
this.tagsViewList = this.tagsViewList.filter(item => item.path !== tag.path)
|
|
20
|
-
},
|
|
21
|
-
removeOtherTagsView(tag) {
|
|
22
|
-
this.tagsViewList = this.tagsViewList.filter(item => item.path === tag.path)
|
|
23
|
-
},
|
|
24
|
-
clearTagsView() {
|
|
25
|
-
this.tagsViewList = []
|
|
26
|
-
},
|
|
27
|
-
getTagsViewList() {
|
|
28
|
-
return this.tagsViewList
|
|
29
|
-
},
|
|
30
|
-
setTagsViewList(tagsList) {
|
|
31
|
-
this.tagsViewList = tagsList
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
})
|