@robot-admin/naive-ui-components 0.13.2 → 0.13.5
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/CHANGELOG.md +20 -0
- package/dist/C_ActionBar.css +75 -63
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_AntV.css +249 -79
- package/dist/C_AntV2.cjs +3 -3
- package/dist/C_AntV2.js +2 -2
- package/dist/C_AudioPlayer.css +88 -76
- package/dist/C_AudioPlayer2.cjs +1 -1
- package/dist/C_AudioPlayer2.js +1 -1
- package/dist/C_AvatarGroup.css +32 -28
- package/dist/C_AvatarGroup2.cjs +1 -1
- package/dist/C_AvatarGroup2.js +1 -1
- package/dist/C_Breadcrumb.css +35 -17
- package/dist/C_Breadcrumb2.cjs +1 -1
- package/dist/C_Breadcrumb2.js +1 -1
- package/dist/C_Captcha.css +66 -53
- package/dist/C_Captcha2.cjs +1 -1
- package/dist/C_Captcha2.js +1 -1
- package/dist/C_Cascade.css +6 -2
- package/dist/C_Cascade2.cjs +1 -1
- package/dist/C_Cascade2.js +1 -1
- package/dist/C_Chat.css +40 -33
- package/dist/C_City.css +37 -32
- package/dist/C_City2.cjs +1 -1
- package/dist/C_City2.js +1 -1
- package/dist/C_Code.css +53 -40
- package/dist/C_Code2.cjs +1 -1
- package/dist/C_Code2.js +1 -1
- package/dist/C_CollapsePanel.css +68 -55
- package/dist/C_CollapsePanel2.cjs +1 -1
- package/dist/C_CollapsePanel2.js +1 -1
- package/dist/C_ContextMenu.css +68 -26
- package/dist/C_ContextMenu2.cjs +1 -1
- package/dist/C_ContextMenu2.js +1 -1
- package/dist/C_Cron.css +95 -68
- package/dist/C_Cron2.cjs +1 -1
- package/dist/C_Cron2.js +1 -1
- package/dist/C_Date.css +8 -1
- package/dist/C_Date2.cjs +1 -1
- package/dist/C_Date2.js +1 -1
- package/dist/C_Draggable.css +60 -51
- package/dist/C_Draggable2.cjs +1 -1
- package/dist/C_Draggable2.js +1 -1
- package/dist/C_Editor.css +23 -15
- package/dist/C_Editor2.cjs +1 -1
- package/dist/C_Editor2.js +1 -1
- package/dist/C_FilePreview.css +200 -90
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_Form.base.css +284 -224
- package/dist/C_Form.css +307 -239
- package/dist/C_Form2.cjs +1 -1
- package/dist/C_Form2.js +1 -1
- package/dist/C_FormModal.css +18 -8
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_FormSearch.css +58 -45
- package/dist/C_FormSearch2.cjs +1 -1
- package/dist/C_FormSearch2.js +1 -1
- package/dist/C_FormulaEditor.css +62 -37
- package/dist/C_FormulaEditor2.cjs +1 -1
- package/dist/C_FormulaEditor2.js +1 -1
- package/dist/C_FullCalendar.css +16 -3
- package/dist/C_FullCalendar2.cjs +1 -1
- package/dist/C_FullCalendar2.js +1 -1
- package/dist/C_GlobalSearch.css +121 -112
- package/dist/C_GlobalSearch2.cjs +1 -1
- package/dist/C_GlobalSearch2.js +1 -1
- package/dist/C_Guide.css +30 -18
- package/dist/C_Guide2.cjs +1 -1
- package/dist/C_Guide2.js +1 -1
- package/dist/C_Icon.css +24 -17
- package/dist/C_Icon2.cjs +1 -1
- package/dist/C_Icon2.js +1 -1
- package/dist/C_ImageCropper.css +39 -22
- package/dist/C_ImageCropper2.cjs +1 -1
- package/dist/C_ImageCropper2.js +1 -1
- package/dist/C_Language.css +30 -17
- package/dist/C_Language2.cjs +1 -1
- package/dist/C_Language2.js +1 -1
- package/dist/C_Login.css +162 -137
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Map.css +25 -4
- package/dist/C_Map2.cjs +1 -1
- package/dist/C_Map2.js +1 -1
- package/dist/C_Markdown.css +47 -42
- package/dist/C_Markdown2.cjs +1 -1
- package/dist/C_Markdown2.js +1 -1
- package/dist/C_Menu.css +7 -1
- package/dist/C_Menu2.cjs +1 -1
- package/dist/C_Menu2.js +1 -1
- package/dist/C_NotificationCenter.css +134 -90
- package/dist/C_NotificationCenter2.cjs +1 -1
- package/dist/C_NotificationCenter2.js +1 -1
- package/dist/C_OrgChart.css +10 -0
- package/dist/C_OrgChart2.cjs +1 -1
- package/dist/C_OrgChart2.js +1 -1
- package/dist/C_QRCode.css +12 -8
- package/dist/C_QRCode2.cjs +1 -1
- package/dist/C_QRCode2.js +1 -1
- package/dist/C_Signature.css +18 -14
- package/dist/C_Signature2.cjs +1 -1
- package/dist/C_Signature2.js +1 -1
- package/dist/C_Skeleton.css +5 -0
- package/dist/C_Skeleton2.cjs +1 -1
- package/dist/C_Skeleton2.js +1 -1
- package/dist/C_SplitPane.css +61 -39
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/C_Steps.css +42 -38
- package/dist/C_Steps2.cjs +1 -1
- package/dist/C_Steps2.js +1 -1
- package/dist/C_Table.base.css +465 -352
- package/dist/C_Table.css +488 -367
- package/dist/C_TagsView.css +93 -55
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_Theme.css +24 -17
- package/dist/C_Timeline.css +47 -36
- package/dist/C_Transfer.css +86 -67
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.css +48 -33
- package/dist/C_Tree2.cjs +1 -1
- package/dist/C_Tree2.js +1 -1
- package/dist/C_Upload.css +104 -51
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/C_VideoPlayer.css +140 -69
- package/dist/C_VideoPlayer2.cjs +1 -1
- package/dist/C_VideoPlayer2.js +1 -1
- package/dist/C_VtableGantt.css +42 -19
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/C_WaterFall.css +32 -16
- package/dist/C_WaterFall2.cjs +1 -1
- package/dist/C_WaterFall2.js +1 -1
- package/dist/C_WorkFlow.css +332 -221
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/constants.d.cts +5 -5
- package/dist/constants.d.ts +5 -5
- package/dist/constants2.d.cts +5 -5
- package/dist/constants2.d.ts +5 -5
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +6 -6
- package/dist/constants4.d.ts +6 -6
- package/dist/data.d.cts +9 -9
- package/dist/data.d.ts +9 -9
- package/dist/data2.cjs +1 -1
- package/dist/data2.js +1 -1
- package/dist/index.vue.d.cts +5 -5
- package/dist/index.vue.d.ts +5 -5
- package/dist/index10.vue.d.cts +2 -2
- package/dist/index10.vue.d.ts +3 -3
- package/dist/index11.vue.d.cts +3 -3
- package/dist/index11.vue.d.ts +6 -6
- package/dist/index12.vue.d.cts +6 -6
- package/dist/index13.vue.d.ts +3 -3
- package/dist/index14.vue.d.cts +3 -3
- package/dist/index14.vue.d.ts +16 -14
- package/dist/index15.vue.d.cts +16 -14
- package/dist/index15.vue.d.ts +3 -3
- package/dist/index16.vue.d.cts +3 -3
- package/dist/index16.vue.d.ts +1 -1
- package/dist/index17.vue.d.cts +1 -1
- package/dist/index17.vue.d.ts +6 -6
- package/dist/index18.vue.d.cts +6 -6
- package/dist/index19.vue.d.cts +1 -1
- package/dist/index19.vue.d.ts +1 -1
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index22.vue.d.cts +1 -1
- package/dist/index22.vue.d.ts +1 -1
- package/dist/index24.vue.d.cts +4 -4
- package/dist/index24.vue.d.ts +4 -4
- package/dist/index26.vue.d.cts +4 -4
- package/dist/index26.vue.d.ts +4 -4
- package/dist/index27.vue.d.cts +4 -4
- package/dist/index27.vue.d.ts +4 -4
- package/dist/index3.vue.d.cts +5 -5
- package/dist/index3.vue.d.ts +5 -5
- package/dist/index5.vue.d.ts +2 -2
- package/dist/index6.vue.d.cts +2 -2
- package/dist/index6.vue.d.ts +2 -2
- package/dist/index7.vue.d.cts +2 -2
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index8.vue.d.cts +2 -2
- package/dist/index8.vue.d.ts +1 -1
- package/dist/index9.vue.d.cts +1 -1
- package/dist/index9.vue.d.ts +2 -2
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/style.css +3083 -1982
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +2 -2
- package/dist/useCollapsePanel.d.ts +2 -2
- package/dist/useCropperCore.d.cts +5 -5
- package/dist/useCropperCore.d.ts +5 -5
- package/dist/useDraggableLayout.d.cts +5 -5
- package/dist/useDraggableLayout.d.ts +5 -5
- package/dist/useDynamicFormState.d.cts +2 -2
- package/dist/useDynamicFormState.d.ts +2 -2
- package/dist/useEdgeInteraction.d.cts +2 -2
- package/dist/useEdgeInteraction.d.ts +2 -2
- package/dist/useFullscreen.d.cts +2 -2
- package/dist/useFullscreen.d.ts +2 -2
- package/dist/useQRCode.d.cts +5 -5
- package/dist/useQRCode.d.ts +5 -5
- package/dist/useSearchState.d.cts +27 -27
- package/dist/useSearchState.d.ts +27 -27
- package/dist/useSignatureHistory.d.cts +6 -6
- package/dist/useSignatureHistory.d.ts +6 -6
- package/dist/useSplitResize.d.cts +8 -8
- package/dist/useSplitResize.d.ts +8 -8
- package/dist/useTableQuery.cjs +1 -1
- package/dist/useTableQuery.js +1 -1
- package/dist/useTimeSelection.d.cts +5 -5
- package/dist/useTimeSelection.d.ts +5 -5
- package/dist/useTreeOperations.d.cts +5 -5
- package/dist/useTreeOperations.d.ts +5 -5
- package/dist/useWorkflowValidation.d.cts +7 -7
- package/dist/useWorkflowValidation.d.ts +7 -7
- package/dist/verification.d.cts +3 -3
- package/dist/verification.d.ts +3 -3
- package/package.json +8 -1
package/dist/C_TagsView.css
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
/* unplugin-vue-components disabled */.c-icon[data-v-
|
|
1
|
+
/* unplugin-vue-components disabled */.c-icon[data-v-075758a0] {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
vertical-align: middle;
|
|
5
8
|
user-select: none;
|
|
6
9
|
transition: all 0.2s ease-in-out;
|
|
7
10
|
}
|
|
8
|
-
.c-icon--clickable[data-v-
|
|
11
|
+
.c-icon--clickable[data-v-075758a0] {
|
|
9
12
|
cursor: pointer;
|
|
10
13
|
}
|
|
11
|
-
.c-icon--clickable[data-v-
|
|
14
|
+
.c-icon--clickable[data-v-075758a0]:hover {
|
|
12
15
|
opacity: 0.8;
|
|
13
16
|
transform: scale(1.05);
|
|
14
17
|
}
|
|
15
|
-
.c-icon--clickable[data-v-
|
|
18
|
+
.c-icon--clickable[data-v-075758a0]:active {
|
|
16
19
|
transform: scale(0.95);
|
|
17
20
|
}
|
|
18
|
-
.c-icon--clickable[data-v-
|
|
21
|
+
.c-icon--clickable[data-v-075758a0]:focus-visible {
|
|
19
22
|
outline: 2px solid currentColor;
|
|
20
23
|
outline-offset: 2px;
|
|
21
24
|
border-radius: 4px;
|
|
22
25
|
}
|
|
23
|
-
.c-icon--loading[data-v-
|
|
26
|
+
.c-icon--loading[data-v-075758a0] {
|
|
24
27
|
opacity: 0.6;
|
|
25
28
|
cursor: wait;
|
|
26
29
|
}
|
|
27
|
-
.c-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.c-icon__loading[data-v-711aedcd] {
|
|
31
|
-
position: relative;
|
|
30
|
+
.c-icon__loading[data-v-075758a0] {
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset: 0;
|
|
32
33
|
}
|
|
33
|
-
.c-icon__spinner[data-v-
|
|
34
|
+
.c-icon__spinner[data-v-075758a0] {
|
|
34
35
|
width: 100%;
|
|
35
36
|
height: 100%;
|
|
36
37
|
border: 2px solid currentColor;
|
|
37
38
|
border-radius: 50%;
|
|
38
39
|
border-top-color: transparent;
|
|
39
|
-
animation: spin-
|
|
40
|
+
animation: spin-075758a0 1s linear infinite;
|
|
40
41
|
}
|
|
41
|
-
.c-icon__error[data-v-
|
|
42
|
+
.c-icon__error[data-v-075758a0] {
|
|
42
43
|
font-size: 0.8em;
|
|
43
44
|
opacity: 0.5;
|
|
44
45
|
}
|
|
45
|
-
.c-icon__rotatable[data-v-
|
|
46
|
+
.c-icon__rotatable[data-v-075758a0] {
|
|
46
47
|
transition: transform 0.3s ease-in-out;
|
|
47
48
|
}
|
|
48
|
-
.c-icon__flippable[data-v-
|
|
49
|
+
.c-icon__flippable[data-v-075758a0] {
|
|
49
50
|
transition: transform 0.3s ease-in-out;
|
|
50
51
|
}
|
|
51
|
-
@keyframes spin-
|
|
52
|
+
@keyframes spin-075758a0 {
|
|
52
53
|
0% {
|
|
53
54
|
transform: rotate(0deg);
|
|
54
55
|
}
|
|
@@ -56,12 +57,18 @@
|
|
|
56
57
|
transform: rotate(360deg);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
/* unplugin-vue-components disabled */
|
|
61
|
+
/* layer: default */
|
|
62
|
+
.inline-flex[data-v-075758a0]{display:inline-flex;}
|
|
63
|
+
.transform[data-v-075758a0]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
|
|
64
|
+
.px[data-v-075758a0]{padding-left:1rem;padding-right:1rem;}
|
|
65
|
+
|
|
59
66
|
|
|
60
67
|
/* unplugin-vue-components disabled *//* ===========================================
|
|
61
68
|
* 标签组件样式 - 精简版
|
|
62
69
|
* =========================================== */
|
|
63
70
|
/* --------- 标签视图容器 --------- */
|
|
64
|
-
.tags-view-container[data-v-
|
|
71
|
+
.tags-view-container[data-v-5dfc763f] {
|
|
65
72
|
border-bottom: 1px solid var(--color-border);
|
|
66
73
|
padding: 8px 16px 0;
|
|
67
74
|
position: relative;
|
|
@@ -69,14 +76,14 @@
|
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
/* --------- 滚动轨道容器 --------- */
|
|
72
|
-
.tags-track[data-v-
|
|
79
|
+
.tags-track[data-v-5dfc763f] {
|
|
73
80
|
width: 100%;
|
|
74
81
|
overflow: hidden;
|
|
75
82
|
position: relative;
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
/* --------- 滚动容器 --------- */
|
|
79
|
-
.tags-container[data-v-
|
|
86
|
+
.tags-container[data-v-5dfc763f] {
|
|
80
87
|
display: flex;
|
|
81
88
|
overflow-x: auto;
|
|
82
89
|
overflow-y: hidden;
|
|
@@ -86,12 +93,12 @@
|
|
|
86
93
|
align-items: center;
|
|
87
94
|
min-height: 40px;
|
|
88
95
|
}
|
|
89
|
-
.tags-container[data-v-
|
|
96
|
+
.tags-container[data-v-5dfc763f]::-webkit-scrollbar {
|
|
90
97
|
display: none;
|
|
91
98
|
}
|
|
92
99
|
|
|
93
100
|
/* --------- 现代化标签样式 --------- */
|
|
94
|
-
.n-tag[data-v-
|
|
101
|
+
.n-tag[data-v-5dfc763f] {
|
|
95
102
|
position: relative;
|
|
96
103
|
display: inline-flex;
|
|
97
104
|
align-items: center;
|
|
@@ -108,7 +115,7 @@
|
|
|
108
115
|
white-space: nowrap;
|
|
109
116
|
/* 内部高光效果 */
|
|
110
117
|
}
|
|
111
|
-
.n-tag[data-v-
|
|
118
|
+
.n-tag[data-v-5dfc763f]::before {
|
|
112
119
|
content: "";
|
|
113
120
|
position: absolute;
|
|
114
121
|
top: 1px;
|
|
@@ -120,67 +127,67 @@
|
|
|
120
127
|
opacity: 0.5;
|
|
121
128
|
transition: opacity 0.22s ease;
|
|
122
129
|
}
|
|
123
|
-
.n-tag[data-v-
|
|
130
|
+
.n-tag[data-v-5dfc763f] {
|
|
124
131
|
/* --------- 悬停效果 --------- */
|
|
125
132
|
}
|
|
126
|
-
.n-tag[data-v-
|
|
133
|
+
.n-tag[data-v-5dfc763f]:hover:not([type=primary]) {
|
|
127
134
|
color: var(--color-primary) !important;
|
|
128
135
|
border-color: var(--color-primary);
|
|
129
136
|
transform: scale(1.02);
|
|
130
137
|
}
|
|
131
|
-
.n-tag[data-v-
|
|
138
|
+
.n-tag[data-v-5dfc763f]:hover:not([type=primary])::before {
|
|
132
139
|
opacity: 0.8;
|
|
133
140
|
}
|
|
134
|
-
.n-tag[data-v-
|
|
135
|
-
.n-tag[data-v-
|
|
141
|
+
.n-tag[data-v-5dfc763f]:hover:not([type=primary]) .c-icon,
|
|
142
|
+
.n-tag[data-v-5dfc763f]:hover:not([type=primary]) [class*='c-icon'] {
|
|
136
143
|
color: var(--color-primary) !important;
|
|
137
144
|
}
|
|
138
|
-
.n-tag:hover:not([type=primary]) i[data-v-
|
|
139
|
-
.n-tag:hover:not([type=primary]) .icon[data-v-
|
|
145
|
+
.n-tag:hover:not([type=primary]) i[data-v-5dfc763f],
|
|
146
|
+
.n-tag:hover:not([type=primary]) .icon[data-v-5dfc763f] {
|
|
140
147
|
color: var(--color-primary) !important;
|
|
141
148
|
}
|
|
142
|
-
.n-tag[data-v-
|
|
149
|
+
.n-tag[data-v-5dfc763f]:hover:not([type=primary]) .n-tag__close {
|
|
143
150
|
color: var(--color-primary) !important;
|
|
144
151
|
opacity: 0.8;
|
|
145
152
|
transform: scale(1.05);
|
|
146
153
|
}
|
|
147
|
-
.n-tag[data-v-
|
|
154
|
+
.n-tag[data-v-5dfc763f] {
|
|
148
155
|
/* --------- 激活状态 --------- */
|
|
149
156
|
}
|
|
150
|
-
.n-tag[type=primary][data-v-
|
|
157
|
+
.n-tag[type=primary][data-v-5dfc763f] {
|
|
151
158
|
background: var(--tag-active-bg, rgba(32, 128, 240, 0.08)) !important;
|
|
152
159
|
color: var(--color-primary) !important;
|
|
153
160
|
border-color: var(--color-primary) !important;
|
|
154
161
|
font-weight: 600;
|
|
155
162
|
transform: scale(1.02);
|
|
156
163
|
}
|
|
157
|
-
.n-tag[type=primary][data-v-
|
|
164
|
+
.n-tag[type=primary][data-v-5dfc763f]::before {
|
|
158
165
|
opacity: 0.6;
|
|
159
166
|
}
|
|
160
|
-
.n-tag[type=primary][data-v-
|
|
161
|
-
.n-tag[type=primary][data-v-
|
|
167
|
+
.n-tag[type=primary][data-v-5dfc763f] .n-tag__content,
|
|
168
|
+
.n-tag[type=primary][data-v-5dfc763f] *:not(.n-tag__close) {
|
|
162
169
|
color: var(--color-primary) !important;
|
|
163
170
|
}
|
|
164
|
-
.n-tag[type=primary][data-v-
|
|
165
|
-
.n-tag[type=primary][data-v-
|
|
171
|
+
.n-tag[type=primary][data-v-5dfc763f] .c-icon,
|
|
172
|
+
.n-tag[type=primary][data-v-5dfc763f] [class*='c-icon'] {
|
|
166
173
|
color: var(--color-primary) !important;
|
|
167
174
|
}
|
|
168
|
-
.n-tag[type=primary] i[data-v-
|
|
169
|
-
.n-tag[type=primary] .icon[data-v-
|
|
175
|
+
.n-tag[type=primary] i[data-v-5dfc763f],
|
|
176
|
+
.n-tag[type=primary] .icon[data-v-5dfc763f] {
|
|
170
177
|
color: var(--color-primary) !important;
|
|
171
178
|
}
|
|
172
|
-
.n-tag[type=primary][data-v-
|
|
179
|
+
.n-tag[type=primary][data-v-5dfc763f]:hover {
|
|
173
180
|
background: var(--tag-active-hover-bg, rgba(32, 128, 240, 0.12)) !important;
|
|
174
181
|
transform: scale(1.03);
|
|
175
182
|
}
|
|
176
|
-
.n-tag[type=primary][data-v-
|
|
183
|
+
.n-tag[type=primary][data-v-5dfc763f] .n-tag__close {
|
|
177
184
|
color: var(--color-primary) !important;
|
|
178
185
|
opacity: 0.8;
|
|
179
186
|
}
|
|
180
|
-
.n-tag[data-v-
|
|
187
|
+
.n-tag[data-v-5dfc763f] {
|
|
181
188
|
/* --------- 关闭按钮 --------- */
|
|
182
189
|
}
|
|
183
|
-
.n-tag[data-v-
|
|
190
|
+
.n-tag[data-v-5dfc763f] .n-tag__close {
|
|
184
191
|
width: 16px !important;
|
|
185
192
|
height: 16px !important;
|
|
186
193
|
border-radius: 8px !important;
|
|
@@ -195,10 +202,10 @@
|
|
|
195
202
|
background: rgba(0, 0, 0, 0.02) !important;
|
|
196
203
|
border: 1px solid transparent;
|
|
197
204
|
}
|
|
198
|
-
.n-tag[data-v-
|
|
205
|
+
.n-tag[data-v-5dfc763f] .n-tag__close:not(:hover) {
|
|
199
206
|
transform: scale(0.9);
|
|
200
207
|
}
|
|
201
|
-
.n-tag[data-v-
|
|
208
|
+
.n-tag[data-v-5dfc763f] .n-tag__close:hover {
|
|
202
209
|
background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(239, 68, 68, 0.08)) !important;
|
|
203
210
|
border-color: rgba(239, 68, 68, 0.15) !important;
|
|
204
211
|
color: #ef4444 !important;
|
|
@@ -206,13 +213,13 @@
|
|
|
206
213
|
transform: scale(0.6) !important;
|
|
207
214
|
box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2) !important;
|
|
208
215
|
}
|
|
209
|
-
.n-tag[data-v-
|
|
216
|
+
.n-tag[data-v-5dfc763f] .n-tag__close:active {
|
|
210
217
|
transform: scale(0.95) !important;
|
|
211
218
|
transition-duration: 0.1s !important;
|
|
212
219
|
}
|
|
213
220
|
|
|
214
221
|
/* --------- C_Icon --------- */
|
|
215
|
-
[data-v-
|
|
222
|
+
[data-v-5dfc763f] .c-icon {
|
|
216
223
|
margin-right: 4px;
|
|
217
224
|
font-size: 12px;
|
|
218
225
|
transition: color 0.22s ease;
|
|
@@ -222,36 +229,67 @@
|
|
|
222
229
|
|
|
223
230
|
/* --------- 响应式 --------- */
|
|
224
231
|
@media (max-width: 768px) {
|
|
225
|
-
.tags-view-container[data-v-
|
|
232
|
+
.tags-view-container[data-v-5dfc763f] {
|
|
226
233
|
padding: 6px 12px 0;
|
|
227
234
|
}
|
|
228
|
-
.n-tag[data-v-
|
|
235
|
+
.n-tag[data-v-5dfc763f] {
|
|
229
236
|
height: 26px;
|
|
230
237
|
padding: 0 10px;
|
|
231
238
|
font-size: 11px;
|
|
232
239
|
margin-right: 3px;
|
|
233
240
|
border-radius: 13px;
|
|
234
241
|
}
|
|
235
|
-
.n-tag[data-v-
|
|
242
|
+
.n-tag[data-v-5dfc763f] .n-tag__close {
|
|
236
243
|
width: 14px;
|
|
237
244
|
height: 14px;
|
|
238
245
|
font-size: 11px;
|
|
239
246
|
margin-left: 4px;
|
|
240
247
|
}
|
|
241
|
-
.tags-container[data-v-
|
|
248
|
+
.tags-container[data-v-5dfc763f] {
|
|
242
249
|
padding: 0 12px;
|
|
243
250
|
min-height: 36px;
|
|
244
251
|
}
|
|
245
|
-
[data-v-
|
|
252
|
+
[data-v-5dfc763f] .c-icon {
|
|
246
253
|
font-size: 11px;
|
|
247
254
|
margin-right: 3px;
|
|
248
255
|
}
|
|
249
256
|
}
|
|
250
257
|
/* --------- 暗色主题 --------- */
|
|
251
|
-
[data-theme=dark] .n-tag[data-v-
|
|
258
|
+
[data-theme=dark] .n-tag[data-v-5dfc763f] .n-tag__close {
|
|
252
259
|
background: rgba(255, 255, 255, 0.03) !important;
|
|
253
260
|
}
|
|
254
|
-
[data-theme=dark] .n-tag[data-v-
|
|
261
|
+
[data-theme=dark] .n-tag[data-v-5dfc763f] .n-tag__close:hover {
|
|
255
262
|
background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), rgba(239, 68, 68, 0.1)) !important;
|
|
256
263
|
box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
|
|
257
264
|
}
|
|
265
|
+
/* unplugin-vue-components disabled */
|
|
266
|
+
/* layer: icons */
|
|
267
|
+
.i-mdi\:align-horizontal-left[data-v-5dfc763f]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4 22H2V2h2zM22 7H6v3h16zm-6 7H6v3h10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
|
|
268
|
+
.i-mdi\:align-horizontal-right[data-v-5dfc763f]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20 2h2v20h-2zM2 10h16V7H2zm6 7h10v-3H8z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
|
|
269
|
+
.i-mdi\:arrow-left-right-bold[data-v-5dfc763f]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 14v4l-6-6l6-6v4h8V6l6 6l-6 6v-4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
|
|
270
|
+
.i-mdi\:close[data-v-5dfc763f]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
|
|
271
|
+
.i-mdi\:tally-mark-5[data-v-5dfc763f]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 10.73V19h-2v-7.64L15 12v7h-2v-6.38l-2 .64V19H9v-5.11l-2 .61V19H5v-3.85l-2.43.77L2 14l3-.95V5h2v7.42l2-.63V5h2v6.16l2-.63V5h2v4.9l2-.64V5h2v3.63L21 8l.57 1.92z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
|
|
272
|
+
/* layer: shortcuts */
|
|
273
|
+
.container[data-v-5dfc763f]{width:100%;}
|
|
274
|
+
@media (min-width: 640px){
|
|
275
|
+
.container[data-v-5dfc763f]{max-width:640px;}
|
|
276
|
+
}
|
|
277
|
+
@media (min-width: 768px){
|
|
278
|
+
.container[data-v-5dfc763f]{max-width:768px;}
|
|
279
|
+
}
|
|
280
|
+
@media (min-width: 1024px){
|
|
281
|
+
.container[data-v-5dfc763f]{max-width:1024px;}
|
|
282
|
+
}
|
|
283
|
+
@media (min-width: 1280px){
|
|
284
|
+
.container[data-v-5dfc763f]{max-width:1280px;}
|
|
285
|
+
}
|
|
286
|
+
@media (min-width: 1536px){
|
|
287
|
+
.container[data-v-5dfc763f]{max-width:1536px;}
|
|
288
|
+
}
|
|
289
|
+
/* layer: default */
|
|
290
|
+
.inline[data-v-5dfc763f]{display:inline;}
|
|
291
|
+
.block[data-v-5dfc763f]{display:block;}
|
|
292
|
+
.hidden[data-v-5dfc763f]{display:none;}
|
|
293
|
+
.inline-flex[data-v-5dfc763f]{display:inline-flex;}
|
|
294
|
+
.filter[data-v-5dfc763f]{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
|
|
295
|
+
|
package/dist/C_TagsView2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`),i=require(`vue-router`);const a=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.path==`string`&&t.path.startsWith(`/`)&&!t.path.startsWith(`//`)&&typeof t.title==`string`},o=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function s(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>a(e)?[{path:e.path,title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:o(e.meta)}]:[]):[]}catch{return[]}}function c(e={}){let{persistKey:t=`__tags_view_list__`,homePath:r=`/home`}=e,i=()=>{if(!t)return[];try{return s(localStorage.getItem(t))}catch{return[]}},a=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},o=(0,n.ref)(i()),c=(0,n.ref)(``),l=()=>a(o.value),u=e=>{e?o.value=e:o.value=[...new Map(o.value.map(e=>[e.path,e])).values()],l()},d=e=>{c.value=e};return{tagsViewList:o,activeTag:c,homePath:r,initTags:u,setActiveTag:d,addTag:e=>{let t=o.value.findIndex(t=>t.path===e.path);if(t===-1)o.value.push(e);else{let n=o.value[t];(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}d(e.path),l()},removeTag:e=>{if(e>=0&&e<o.value.length){let t=o.value.splice(e,1)[0]?.path??null;return l(),t}return null},removeOtherTags:e=>{e===0?o.value=[o.value[0]].filter(Boolean):o.value=[o.value[0],o.value[e]].filter(Boolean),l()},removeLeftTags:e=>{o.value=[o.value[0],...o.value.slice(e)],l()},removeRightTags:e=>{o.value=o.value.slice(0,e+1),l()},removeAllTags:()=>{o.value=o.value.filter(e=>e.meta?.affix),l()}}}const l={class:`tags-view-container`},u=(0,n.defineComponent)({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:a,emit:o}){let s=t,u=o,d=(0,i.useRoute)(),f=(0,i.useRouter)(),p=c(s.tagsViewOptions??{persistKey:s.persistKey,homePath:s.homePath});if(p.tagsViewList.value.length>0&&s.labelFormatter){let e=f.getRoutes(),t=p.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:s.labelFormatter(r)}});p.initTags(t)}let m=e=>s.labelFormatter?s.labelFormatter(e):e,h=(0,n.ref)(!1),g=(0,n.ref)(0),_=(0,n.ref)(0),v=(0,n.ref)(null),y=(0,n.ref)(-1),b=(0,n.ref)(),x=(0,n.ref)(),S=e=>e.path===d.path,C=e=>e.meta?.affix,w=e=>{let t=x.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},T=e=>{(0,n.nextTick)(()=>{let t=[...x.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},E=e=>{e.path!==d.path&&f.push(e.path).catch(()=>void 0),T(e.path)},D=(e,t)=>{if(C(e))return;let n=S(e),r=p.tagsViewList.value.length;if(p.removeTag(t),n){let e=p.tagsViewList.value,n=t===r-1,i;i=n?e[t-1]?.path||s.homePath:e[e.length-1]?.path||s.homePath,f.push(i).catch(()=>void 0),u(`close`,i)}},O=(e,t,n)=>{e.preventDefault(),v.value=t,y.value=n,h.value=!0,g.value=e.clientX,_.value=e.clientY},k=()=>h.value=!1,A=(0,n.computed)(()=>{let e=s.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:C(v.value),icon:()=>(0,n.h)(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:tally-mark-5`})}]}),j=e=>{if(!(!v.value||y.value===-1)){switch(e){case`close`:D(v.value,y.value);break;case`closeOthers`:p.removeOtherTags(y.value);break;case`closeLeft`:p.removeLeftTags(y.value);break;case`closeRight`:p.removeRightTags(y.value);break;case`closeAll`:p.removeAllTags(),f.push(s.homePath).catch(()=>void 0),u(`closeAll`);break}k()}};return(0,n.watch)(()=>d.path,e=>{let t=e===s.homePath?s.homeTitle:d.meta.title||`Unnamed Page`;p.addTag({path:e,originalTitle:t,title:m(t),icon:e===s.homePath?s.homeIcon:d.meta.icon,meta:{affix:d.meta.affix}}),p.setActiveTag(e),T(e)},{immediate:!0}),a({tags:p,scrollToTag:T}),(t,i)=>{let a=r.NTag,o=r.NDropdown;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,l,[(0,n.createElementVNode)(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:b,onWheel:w},[(0,n.createElementVNode)(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:x},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(p).tagsViewList.value,(t,r)=>((0,n.openBlock)(),(0,n.createBlock)(a,{key:t.path,type:S(t)?`primary`:`default`,closable:!C(t),"data-path":t.path,onClose:(0,n.withModifiers)(e=>D(t,r),[`stop`]),onClick:e=>E(t),onContextmenu:(0,n.withModifiers)(e=>O(e,t,r),[`prevent`])},{icon:(0,n.withCtx)(()=>[t.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(e.t),{key:0,name:t.icon,size:12},null,8,[`name`])):(0,n.createCommentVNode)(`v-if`,!0)]),default:(0,n.withCtx)(()=>[(0,n.createTextVNode)(` `+(0,n.toDisplayString)(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),h.value?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,show:h.value,options:A.value,x:g.value,y:_.value,onClickoutside:k,onSelect:j},null,8,[`show`,`options`,`x`,`y`])):(0,n.createCommentVNode)(`v-if`,!0)])}}});var d=t.t(u,[[`__scopeId`,`data-v-
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`),i=require(`vue-router`);const a=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.path==`string`&&t.path.startsWith(`/`)&&!t.path.startsWith(`//`)&&typeof t.title==`string`},o=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function s(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>a(e)?[{path:e.path,title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:o(e.meta)}]:[]):[]}catch{return[]}}function c(e={}){let{persistKey:t=`__tags_view_list__`,homePath:r=`/home`}=e,i=()=>{if(!t)return[];try{return s(localStorage.getItem(t))}catch{return[]}},a=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},o=(0,n.ref)(i()),c=(0,n.ref)(``),l=()=>a(o.value),u=e=>{e?o.value=e:o.value=[...new Map(o.value.map(e=>[e.path,e])).values()],l()},d=e=>{c.value=e};return{tagsViewList:o,activeTag:c,homePath:r,initTags:u,setActiveTag:d,addTag:e=>{let t=o.value.findIndex(t=>t.path===e.path);if(t===-1)o.value.push(e);else{let n=o.value[t];(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}d(e.path),l()},removeTag:e=>{if(e>=0&&e<o.value.length){let t=o.value.splice(e,1)[0]?.path??null;return l(),t}return null},removeOtherTags:e=>{e===0?o.value=[o.value[0]].filter(Boolean):o.value=[o.value[0],o.value[e]].filter(Boolean),l()},removeLeftTags:e=>{o.value=[o.value[0],...o.value.slice(e)],l()},removeRightTags:e=>{o.value=o.value.slice(0,e+1),l()},removeAllTags:()=>{o.value=o.value.filter(e=>e.meta?.affix),l()}}}const l={class:`tags-view-container`},u=(0,n.defineComponent)({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:a,emit:o}){let s=t,u=o,d=(0,i.useRoute)(),f=(0,i.useRouter)(),p=c(s.tagsViewOptions??{persistKey:s.persistKey,homePath:s.homePath});if(p.tagsViewList.value.length>0&&s.labelFormatter){let e=f.getRoutes(),t=p.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:s.labelFormatter(r)}});p.initTags(t)}let m=e=>s.labelFormatter?s.labelFormatter(e):e,h=(0,n.ref)(!1),g=(0,n.ref)(0),_=(0,n.ref)(0),v=(0,n.ref)(null),y=(0,n.ref)(-1),b=(0,n.ref)(),x=(0,n.ref)(),S=e=>e.path===d.path,C=e=>e.meta?.affix,w=e=>{let t=x.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},T=e=>{(0,n.nextTick)(()=>{let t=[...x.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},E=e=>{e.path!==d.path&&f.push(e.path).catch(()=>void 0),T(e.path)},D=(e,t)=>{if(C(e))return;let n=S(e),r=p.tagsViewList.value.length;if(p.removeTag(t),n){let e=p.tagsViewList.value,n=t===r-1,i;i=n?e[t-1]?.path||s.homePath:e[e.length-1]?.path||s.homePath,f.push(i).catch(()=>void 0),u(`close`,i)}},O=(e,t,n)=>{e.preventDefault(),v.value=t,y.value=n,h.value=!0,g.value=e.clientX,_.value=e.clientY},k=()=>h.value=!1,A=(0,n.computed)(()=>{let e=s.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:C(v.value),icon:()=>(0,n.h)(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:tally-mark-5`})}]}),j=e=>{if(!(!v.value||y.value===-1)){switch(e){case`close`:D(v.value,y.value);break;case`closeOthers`:p.removeOtherTags(y.value);break;case`closeLeft`:p.removeLeftTags(y.value);break;case`closeRight`:p.removeRightTags(y.value);break;case`closeAll`:p.removeAllTags(),f.push(s.homePath).catch(()=>void 0),u(`closeAll`);break}k()}};return(0,n.watch)(()=>d.path,e=>{let t=e===s.homePath?s.homeTitle:d.meta.title||`Unnamed Page`;p.addTag({path:e,originalTitle:t,title:m(t),icon:e===s.homePath?s.homeIcon:d.meta.icon,meta:{affix:d.meta.affix}}),p.setActiveTag(e),T(e)},{immediate:!0}),a({tags:p,scrollToTag:T}),(t,i)=>{let a=r.NTag,o=r.NDropdown;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,l,[(0,n.createElementVNode)(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:b,onWheel:w},[(0,n.createElementVNode)(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:x},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(p).tagsViewList.value,(t,r)=>((0,n.openBlock)(),(0,n.createBlock)(a,{key:t.path,type:S(t)?`primary`:`default`,closable:!C(t),"data-path":t.path,onClose:(0,n.withModifiers)(e=>D(t,r),[`stop`]),onClick:e=>E(t),onContextmenu:(0,n.withModifiers)(e=>O(e,t,r),[`prevent`])},{icon:(0,n.withCtx)(()=>[t.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(e.t),{key:0,name:t.icon,size:12},null,8,[`name`])):(0,n.createCommentVNode)(`v-if`,!0)]),default:(0,n.withCtx)(()=>[(0,n.createTextVNode)(` `+(0,n.toDisplayString)(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),h.value?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,show:h.value,options:A.value,x:g.value,y:_.value,onClickoutside:k,onSelect:j},null,8,[`show`,`options`,`x`,`y`])):(0,n.createCommentVNode)(`v-if`,!0)])}}});var d=t.t(u,[[`__scopeId`,`data-v-5dfc763f`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
package/dist/C_TagsView2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{Fragment as n,computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,createTextVNode as c,defineComponent as l,h as u,nextTick as d,openBlock as f,ref as p,renderList as m,resolveComponent as h,toDisplayString as g,unref as _,watch as v,withCtx as y,withModifiers as b}from"vue";import{NDropdown as x,NTag as S}from"naive-ui";import{useRoute as C,useRouter as w}from"vue-router";const T=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.path==`string`&&t.path.startsWith(`/`)&&!t.path.startsWith(`//`)&&typeof t.title==`string`},E=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function D(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>T(e)?[{path:e.path,title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:E(e.meta)}]:[]):[]}catch{return[]}}function O(e={}){let{persistKey:t=`__tags_view_list__`,homePath:n=`/home`}=e,r=()=>{if(!t)return[];try{return D(localStorage.getItem(t))}catch{return[]}},i=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},a=p(r()),o=p(``),s=()=>i(a.value),c=e=>{e?a.value=e:a.value=[...new Map(a.value.map(e=>[e.path,e])).values()],s()},l=e=>{o.value=e};return{tagsViewList:a,activeTag:o,homePath:n,initTags:c,setActiveTag:l,addTag:e=>{let t=a.value.findIndex(t=>t.path===e.path);if(t===-1)a.value.push(e);else{let n=a.value[t];(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}l(e.path),s()},removeTag:e=>{if(e>=0&&e<a.value.length){let t=a.value.splice(e,1)[0]?.path??null;return s(),t}return null},removeOtherTags:e=>{e===0?a.value=[a.value[0]].filter(Boolean):a.value=[a.value[0],a.value[e]].filter(Boolean),s()},removeLeftTags:e=>{a.value=[a.value[0],...a.value.slice(e)],s()},removeRightTags:e=>{a.value=a.value.slice(0,e+1),s()},removeAllTags:()=>{a.value=a.value.filter(e=>e.meta?.affix),s()}}}const k={class:`tags-view-container`};var A=t(l({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:l,emit:h}){let T=t,E=h,D=C(),A=w(),j=O(T.tagsViewOptions??{persistKey:T.persistKey,homePath:T.homePath});if(j.tagsViewList.value.length>0&&T.labelFormatter){let e=A.getRoutes(),t=j.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:T.labelFormatter(r)}});j.initTags(t)}let M=e=>T.labelFormatter?T.labelFormatter(e):e,N=p(!1),P=p(0),F=p(0),I=p(null),L=p(-1),R=p(),z=p(),B=e=>e.path===D.path,V=e=>e.meta?.affix,H=e=>{let t=z.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},U=e=>{d(()=>{let t=[...z.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},W=e=>{e.path!==D.path&&A.push(e.path).catch(()=>void 0),U(e.path)},G=(e,t)=>{if(V(e))return;let n=B(e),r=j.tagsViewList.value.length;if(j.removeTag(t),n){let e=j.tagsViewList.value,n=t===r-1,i;i=n?e[t-1]?.path||T.homePath:e[e.length-1]?.path||T.homePath,A.push(i).catch(()=>void 0),E(`close`,i)}},K=(e,t,n)=>{e.preventDefault(),I.value=t,L.value=n,N.value=!0,P.value=e.clientX,F.value=e.clientY},q=()=>N.value=!1,J=r(()=>{let e=T.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:V(I.value),icon:()=>u(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>u(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>u(`span`,{class:`i-mdi:tally-mark-5`})}]}),Y=e=>{if(!(!I.value||L.value===-1)){switch(e){case`close`:G(I.value,L.value);break;case`closeOthers`:j.removeOtherTags(L.value);break;case`closeLeft`:j.removeLeftTags(L.value);break;case`closeRight`:j.removeRightTags(L.value);break;case`closeAll`:j.removeAllTags(),A.push(T.homePath).catch(()=>void 0),E(`closeAll`);break}q()}};return v(()=>D.path,e=>{let t=e===T.homePath?T.homeTitle:D.meta.title||`Unnamed Page`;j.addTag({path:e,originalTitle:t,title:M(t),icon:e===T.homePath?T.homeIcon:D.meta.icon,meta:{affix:D.meta.affix}}),j.setActiveTag(e),U(e)},{immediate:!0}),l({tags:j,scrollToTag:U}),(t,r)=>{let l=S,u=x;return f(),o(`div`,k,[s(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:R,onWheel:H},[s(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:z},[(f(!0),o(n,null,m(_(j).tagsViewList.value,(t,n)=>(f(),i(l,{key:t.path,type:B(t)?`primary`:`default`,closable:!V(t),"data-path":t.path,onClose:b(e=>G(t,n),[`stop`]),onClick:e=>W(t),onContextmenu:b(e=>K(e,t,n),[`prevent`])},{icon:y(()=>[t.icon?(f(),i(_(e),{key:0,name:t.icon,size:12},null,8,[`name`])):a(`v-if`,!0)]),default:y(()=>[c(` `+g(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),N.value?(f(),i(u,{key:0,show:N.value,options:J.value,x:P.value,y:F.value,onClickoutside:q,onSelect:Y},null,8,[`show`,`options`,`x`,`y`])):a(`v-if`,!0)])}}}),[[`__scopeId`,`data-v-
|
|
1
|
+
import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{Fragment as n,computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,createTextVNode as c,defineComponent as l,h as u,nextTick as d,openBlock as f,ref as p,renderList as m,resolveComponent as h,toDisplayString as g,unref as _,watch as v,withCtx as y,withModifiers as b}from"vue";import{NDropdown as x,NTag as S}from"naive-ui";import{useRoute as C,useRouter as w}from"vue-router";const T=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.path==`string`&&t.path.startsWith(`/`)&&!t.path.startsWith(`//`)&&typeof t.title==`string`},E=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function D(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>T(e)?[{path:e.path,title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:E(e.meta)}]:[]):[]}catch{return[]}}function O(e={}){let{persistKey:t=`__tags_view_list__`,homePath:n=`/home`}=e,r=()=>{if(!t)return[];try{return D(localStorage.getItem(t))}catch{return[]}},i=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},a=p(r()),o=p(``),s=()=>i(a.value),c=e=>{e?a.value=e:a.value=[...new Map(a.value.map(e=>[e.path,e])).values()],s()},l=e=>{o.value=e};return{tagsViewList:a,activeTag:o,homePath:n,initTags:c,setActiveTag:l,addTag:e=>{let t=a.value.findIndex(t=>t.path===e.path);if(t===-1)a.value.push(e);else{let n=a.value[t];(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}l(e.path),s()},removeTag:e=>{if(e>=0&&e<a.value.length){let t=a.value.splice(e,1)[0]?.path??null;return s(),t}return null},removeOtherTags:e=>{e===0?a.value=[a.value[0]].filter(Boolean):a.value=[a.value[0],a.value[e]].filter(Boolean),s()},removeLeftTags:e=>{a.value=[a.value[0],...a.value.slice(e)],s()},removeRightTags:e=>{a.value=a.value.slice(0,e+1),s()},removeAllTags:()=>{a.value=a.value.filter(e=>e.meta?.affix),s()}}}const k={class:`tags-view-container`};var A=t(l({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:l,emit:h}){let T=t,E=h,D=C(),A=w(),j=O(T.tagsViewOptions??{persistKey:T.persistKey,homePath:T.homePath});if(j.tagsViewList.value.length>0&&T.labelFormatter){let e=A.getRoutes(),t=j.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:T.labelFormatter(r)}});j.initTags(t)}let M=e=>T.labelFormatter?T.labelFormatter(e):e,N=p(!1),P=p(0),F=p(0),I=p(null),L=p(-1),R=p(),z=p(),B=e=>e.path===D.path,V=e=>e.meta?.affix,H=e=>{let t=z.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},U=e=>{d(()=>{let t=[...z.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},W=e=>{e.path!==D.path&&A.push(e.path).catch(()=>void 0),U(e.path)},G=(e,t)=>{if(V(e))return;let n=B(e),r=j.tagsViewList.value.length;if(j.removeTag(t),n){let e=j.tagsViewList.value,n=t===r-1,i;i=n?e[t-1]?.path||T.homePath:e[e.length-1]?.path||T.homePath,A.push(i).catch(()=>void 0),E(`close`,i)}},K=(e,t,n)=>{e.preventDefault(),I.value=t,L.value=n,N.value=!0,P.value=e.clientX,F.value=e.clientY},q=()=>N.value=!1,J=r(()=>{let e=T.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:V(I.value),icon:()=>u(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>u(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>u(`span`,{class:`i-mdi:tally-mark-5`})}]}),Y=e=>{if(!(!I.value||L.value===-1)){switch(e){case`close`:G(I.value,L.value);break;case`closeOthers`:j.removeOtherTags(L.value);break;case`closeLeft`:j.removeLeftTags(L.value);break;case`closeRight`:j.removeRightTags(L.value);break;case`closeAll`:j.removeAllTags(),A.push(T.homePath).catch(()=>void 0),E(`closeAll`);break}q()}};return v(()=>D.path,e=>{let t=e===T.homePath?T.homeTitle:D.meta.title||`Unnamed Page`;j.addTag({path:e,originalTitle:t,title:M(t),icon:e===T.homePath?T.homeIcon:D.meta.icon,meta:{affix:D.meta.affix}}),j.setActiveTag(e),U(e)},{immediate:!0}),l({tags:j,scrollToTag:U}),(t,r)=>{let l=S,u=x;return f(),o(`div`,k,[s(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:R,onWheel:H},[s(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:z},[(f(!0),o(n,null,m(_(j).tagsViewList.value,(t,n)=>(f(),i(l,{key:t.path,type:B(t)?`primary`:`default`,closable:!V(t),"data-path":t.path,onClose:b(e=>G(t,n),[`stop`]),onClick:e=>W(t),onContextmenu:b(e=>K(e,t,n),[`prevent`])},{icon:y(()=>[t.icon?(f(),i(_(e),{key:0,name:t.icon,size:12},null,8,[`name`])):a(`v-if`,!0)]),default:y(()=>[c(` `+g(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),N.value?(f(),i(u,{key:0,show:N.value,options:J.value,x:P.value,y:F.value,onClickoutside:q,onSelect:Y},null,8,[`show`,`options`,`x`,`y`])):a(`v-if`,!0)])}}}),[[`__scopeId`,`data-v-5dfc763f`]]);export{O as n,A as t};
|
package/dist/C_Theme.css
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
/* unplugin-vue-components disabled */.c-icon[data-v-
|
|
1
|
+
/* unplugin-vue-components disabled */.c-icon[data-v-075758a0] {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
vertical-align: middle;
|
|
5
8
|
user-select: none;
|
|
6
9
|
transition: all 0.2s ease-in-out;
|
|
7
10
|
}
|
|
8
|
-
.c-icon--clickable[data-v-
|
|
11
|
+
.c-icon--clickable[data-v-075758a0] {
|
|
9
12
|
cursor: pointer;
|
|
10
13
|
}
|
|
11
|
-
.c-icon--clickable[data-v-
|
|
14
|
+
.c-icon--clickable[data-v-075758a0]:hover {
|
|
12
15
|
opacity: 0.8;
|
|
13
16
|
transform: scale(1.05);
|
|
14
17
|
}
|
|
15
|
-
.c-icon--clickable[data-v-
|
|
18
|
+
.c-icon--clickable[data-v-075758a0]:active {
|
|
16
19
|
transform: scale(0.95);
|
|
17
20
|
}
|
|
18
|
-
.c-icon--clickable[data-v-
|
|
21
|
+
.c-icon--clickable[data-v-075758a0]:focus-visible {
|
|
19
22
|
outline: 2px solid currentColor;
|
|
20
23
|
outline-offset: 2px;
|
|
21
24
|
border-radius: 4px;
|
|
22
25
|
}
|
|
23
|
-
.c-icon--loading[data-v-
|
|
26
|
+
.c-icon--loading[data-v-075758a0] {
|
|
24
27
|
opacity: 0.6;
|
|
25
28
|
cursor: wait;
|
|
26
29
|
}
|
|
27
|
-
.c-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.c-icon__loading[data-v-711aedcd] {
|
|
31
|
-
position: relative;
|
|
30
|
+
.c-icon__loading[data-v-075758a0] {
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset: 0;
|
|
32
33
|
}
|
|
33
|
-
.c-icon__spinner[data-v-
|
|
34
|
+
.c-icon__spinner[data-v-075758a0] {
|
|
34
35
|
width: 100%;
|
|
35
36
|
height: 100%;
|
|
36
37
|
border: 2px solid currentColor;
|
|
37
38
|
border-radius: 50%;
|
|
38
39
|
border-top-color: transparent;
|
|
39
|
-
animation: spin-
|
|
40
|
+
animation: spin-075758a0 1s linear infinite;
|
|
40
41
|
}
|
|
41
|
-
.c-icon__error[data-v-
|
|
42
|
+
.c-icon__error[data-v-075758a0] {
|
|
42
43
|
font-size: 0.8em;
|
|
43
44
|
opacity: 0.5;
|
|
44
45
|
}
|
|
45
|
-
.c-icon__rotatable[data-v-
|
|
46
|
+
.c-icon__rotatable[data-v-075758a0] {
|
|
46
47
|
transition: transform 0.3s ease-in-out;
|
|
47
48
|
}
|
|
48
|
-
.c-icon__flippable[data-v-
|
|
49
|
+
.c-icon__flippable[data-v-075758a0] {
|
|
49
50
|
transition: transform 0.3s ease-in-out;
|
|
50
51
|
}
|
|
51
|
-
@keyframes spin-
|
|
52
|
+
@keyframes spin-075758a0 {
|
|
52
53
|
0% {
|
|
53
54
|
transform: rotate(0deg);
|
|
54
55
|
}
|
|
@@ -56,3 +57,9 @@
|
|
|
56
57
|
transform: rotate(360deg);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
/* unplugin-vue-components disabled */
|
|
61
|
+
/* layer: default */
|
|
62
|
+
.inline-flex[data-v-075758a0]{display:inline-flex;}
|
|
63
|
+
.transform[data-v-075758a0]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
|
|
64
|
+
.px[data-v-075758a0]{padding-left:1rem;padding-right:1rem;}
|
|
65
|
+
|