@robot-admin/naive-ui-components 0.11.8 → 0.13.0
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 +26 -0
- package/README.md +172 -29
- package/README_EN.md +171 -28
- package/SECURITY.md +1 -0
- package/dist/C_ActionBar.cjs +1 -1
- package/dist/C_ActionBar.css +67 -67
- package/dist/C_ActionBar.d.cts +2 -2
- package/dist/C_ActionBar.d.ts +2 -2
- package/dist/C_ActionBar.js +1 -1
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_AntV.css +70 -70
- package/dist/C_AntV2.cjs +3 -3
- package/dist/C_AntV2.js +3 -3
- package/dist/C_AudioPlayer.css +81 -66
- package/dist/C_AudioPlayer.d.cts +1 -1
- package/dist/C_AudioPlayer.d.ts +1 -1
- package/dist/C_AudioPlayer2.cjs +1 -1
- package/dist/C_AudioPlayer2.js +1 -1
- package/dist/C_AvatarGroup.css +40 -25
- package/dist/C_AvatarGroup.d.cts +1 -1
- package/dist/C_AvatarGroup.d.ts +1 -1
- package/dist/C_AvatarGroup2.cjs +1 -1
- package/dist/C_AvatarGroup2.js +1 -1
- package/dist/C_Barcode.css +6 -6
- package/dist/C_Barcode.d.cts +1 -1
- package/dist/C_Barcode.d.ts +1 -1
- package/dist/C_Barcode2.cjs +1 -1
- package/dist/C_Barcode2.js +1 -1
- package/dist/C_Breadcrumb.css +14 -14
- package/dist/C_Breadcrumb.d.cts +1 -1
- package/dist/C_Breadcrumb.d.ts +1 -1
- package/dist/C_Breadcrumb2.cjs +1 -1
- package/dist/C_Breadcrumb2.js +1 -1
- package/dist/C_Captcha.cjs +1 -1
- package/dist/C_Captcha.css +193 -51
- package/dist/C_Captcha.d.cts +2 -3
- package/dist/C_Captcha.d.ts +2 -3
- package/dist/C_Captcha.js +1 -1
- package/dist/C_Captcha2.cjs +1 -1
- package/dist/C_Captcha2.js +1 -1
- package/dist/C_Cascade.css +2 -2
- package/dist/C_Cascade.d.cts +1 -1
- package/dist/C_Cascade.d.ts +1 -1
- package/dist/C_Cascade2.cjs +1 -1
- package/dist/C_Cascade2.js +1 -1
- package/dist/C_Chat.css +96 -78
- package/dist/C_Chat.d.cts +1 -1
- package/dist/C_Chat.d.ts +1 -1
- package/dist/C_Chat2.cjs +1 -1
- package/dist/C_Chat2.js +1 -1
- package/dist/C_City.css +52 -28
- package/dist/C_City.d.cts +1 -1
- package/dist/C_City.d.ts +1 -1
- package/dist/C_City2.cjs +1 -1
- package/dist/C_City2.js +1 -1
- package/dist/C_Code.css +48 -42
- package/dist/C_Code.d.cts +1 -1
- package/dist/C_Code.d.ts +1 -1
- package/dist/C_Code2.cjs +1 -1
- package/dist/C_Code2.js +1 -1
- package/dist/C_CollapsePanel.css +14 -14
- package/dist/C_CollapsePanel2.cjs +1 -1
- package/dist/C_CollapsePanel2.js +1 -1
- package/dist/C_ContextMenu.css +14 -14
- package/dist/C_ContextMenu.d.cts +1 -1
- package/dist/C_ContextMenu.d.ts +1 -1
- package/dist/C_ContextMenu2.cjs +1 -1
- package/dist/C_ContextMenu2.js +1 -1
- package/dist/C_Cron.css +94 -55
- package/dist/C_Cron2.cjs +1 -1
- package/dist/C_Cron2.js +1 -1
- package/dist/C_Date.d.cts +1 -1
- package/dist/C_Date.d.ts +1 -1
- package/dist/C_Date2.cjs +1 -1
- package/dist/C_Date2.js +1 -1
- package/dist/C_Draggable.css +48 -48
- package/dist/C_Draggable2.cjs +1 -1
- package/dist/C_Draggable2.js +1 -1
- package/dist/C_Editor.css +13 -14
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_Editor2.cjs +1 -1
- package/dist/C_Editor2.js +1 -1
- package/dist/C_FilePreview.css +18 -18
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_Form.base.css +36 -36
- package/dist/C_Form.css +49 -50
- package/dist/C_Form2.cjs +1 -1
- package/dist/C_Form2.js +1 -1
- package/dist/C_FormModal.cjs +1 -0
- package/dist/C_FormModal.css +41 -0
- package/dist/C_FormModal.d.cts +2 -0
- package/dist/C_FormModal.d.ts +3 -0
- package/dist/C_FormModal.js +1 -0
- package/dist/C_FormModal2.cjs +1 -0
- package/dist/C_FormModal2.js +1 -0
- package/dist/C_FormSearch.css +45 -45
- package/dist/C_FormSearch2.cjs +1 -1
- package/dist/C_FormSearch2.js +1 -1
- package/dist/C_FormulaEditor.css +94 -55
- package/dist/C_FormulaEditor2.cjs +2 -2
- package/dist/C_FormulaEditor2.js +2 -2
- package/dist/C_FullCalendar.css +8 -1
- package/dist/C_FullCalendar2.cjs +1 -1
- package/dist/C_FullCalendar2.js +1 -1
- package/dist/C_GlobalSearch2.cjs +1 -1
- package/dist/C_GlobalSearch2.js +1 -1
- package/dist/C_Guide.css +14 -14
- package/dist/C_Guide2.cjs +1 -1
- package/dist/C_Guide2.js +1 -1
- package/dist/C_Icon.css +14 -14
- package/dist/C_Icon2.cjs +1 -1
- package/dist/C_Icon2.js +1 -1
- package/dist/C_ImageCropper.css +22 -22
- package/dist/C_ImageCropper2.cjs +1 -1
- package/dist/C_ImageCropper2.js +1 -1
- package/dist/C_Language.css +14 -14
- package/dist/C_Language2.cjs +1 -1
- package/dist/C_Language2.js +1 -1
- package/dist/C_Login.css +232 -149
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Map.css +3 -3
- package/dist/C_Map2.cjs +1 -1
- package/dist/C_Map2.js +1 -1
- package/dist/C_Markdown.css +35 -35
- package/dist/C_Markdown2.cjs +1 -1
- package/dist/C_Markdown2.js +1 -1
- package/dist/C_Menu.d.cts +1 -1
- package/dist/C_Menu2.cjs +1 -1
- package/dist/C_Menu2.js +1 -1
- package/dist/C_NotificationCenter.css +30 -30
- package/dist/C_NotificationCenter2.cjs +1 -1
- package/dist/C_NotificationCenter2.js +1 -1
- package/dist/C_OrgChart.css +4 -0
- package/dist/C_OrgChart2.cjs +1 -1
- package/dist/C_OrgChart2.js +1 -1
- package/dist/C_Progress2.cjs +1 -1
- package/dist/C_Progress2.js +1 -1
- package/dist/C_QRCode.css +8 -8
- package/dist/C_QRCode2.cjs +1 -1
- package/dist/C_QRCode2.js +1 -1
- package/dist/C_Signature.css +14 -14
- package/dist/C_Signature2.cjs +1 -1
- package/dist/C_Signature2.js +1 -1
- package/dist/C_Skeleton2.cjs +1 -1
- package/dist/C_Skeleton2.js +1 -1
- package/dist/C_SplitPane.css +39 -39
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/C_Steps.css +48 -38
- package/dist/C_Steps2.cjs +1 -1
- package/dist/C_Steps2.js +1 -1
- package/dist/C_Table.base.css +160 -160
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +173 -174
- package/dist/C_Table.d.ts +4 -3
- package/dist/C_Table.js +1 -1
- package/dist/C_Tabs.cjs +1 -0
- package/dist/C_Tabs.css +1 -0
- package/dist/C_Tabs.d.cts +2 -0
- package/dist/C_Tabs.d.ts +2 -0
- package/dist/C_Tabs.js +1 -0
- package/dist/C_TagsView.css +52 -52
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_Theme.css +14 -14
- package/dist/C_Theme2.cjs +1 -1
- package/dist/C_Theme2.js +1 -1
- package/dist/C_Time.css +4 -4
- package/dist/C_Time2.cjs +1 -1
- package/dist/C_Time2.js +1 -1
- package/dist/C_Timeline.css +76 -58
- package/dist/C_Timeline2.cjs +1 -1
- package/dist/C_Timeline2.js +1 -1
- package/dist/C_Transfer.css +51 -51
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.css +35 -32
- package/dist/C_Tree2.cjs +1 -1
- package/dist/C_Tree2.js +1 -1
- package/dist/C_Upload.css +53 -50
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/C_VideoPlayer.css +17 -13
- package/dist/C_VideoPlayer2.cjs +2 -2
- package/dist/C_VideoPlayer2.js +2 -2
- package/dist/C_VtableGantt.css +19 -19
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/C_WaterFall.css +19 -15
- package/dist/C_WaterFall2.cjs +1 -1
- package/dist/C_WaterFall2.js +1 -1
- package/dist/C_WorkFlow.css +123 -123
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/constants.d.cts +2 -2
- package/dist/constants.d.ts +2 -2
- package/dist/constants2.d.cts +3 -3
- package/dist/constants2.d.ts +3 -3
- package/dist/constants3.d.cts +8 -4
- package/dist/constants3.d.ts +8 -4
- package/dist/constants4.d.cts +6 -6
- package/dist/constants4.d.ts +6 -6
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data.d.cts +108 -0
- package/dist/data.d.ts +108 -0
- package/dist/data2.cjs +1 -0
- package/dist/data2.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +49 -49
- package/dist/index.d.ts +51 -49
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +74 -69
- package/dist/index.vue.d.ts +74 -69
- package/dist/index10.vue.d.cts +80 -39
- package/dist/index10.vue.d.ts +68 -77
- package/dist/index11.vue.d.cts +68 -77
- package/dist/index11.vue.d.ts +54 -69
- package/dist/index12.vue.d.cts +54 -69
- package/dist/index12.vue.d.ts +52 -58
- package/dist/index13.vue.d.cts +52 -58
- package/dist/index13.vue.d.ts +1 -1
- package/dist/index14.vue.d.cts +1 -1
- package/dist/index14.vue.d.ts +14 -47
- package/dist/index15.vue.d.cts +14 -47
- package/dist/index16.vue.d.ts +15 -12
- package/dist/index17.vue.d.cts +15 -12
- package/dist/index17.vue.d.ts +4 -4
- package/dist/index18.vue.d.cts +4 -4
- package/dist/index18.vue.d.ts +2 -2
- package/dist/index19.vue.d.cts +1 -1
- package/dist/index19.vue.d.ts +1 -1
- package/dist/index2.vue.d.cts +70 -65
- package/dist/index2.vue.d.ts +70 -65
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index24.vue.d.cts +3 -3
- package/dist/index24.vue.d.ts +3 -3
- package/dist/index25.vue.d.cts +1 -1
- package/dist/index25.vue.d.ts +1 -1
- package/dist/index26.vue.d.cts +5 -5
- package/dist/index26.vue.d.ts +5 -5
- package/dist/index27.vue.d.cts +1 -1
- package/dist/index27.vue.d.ts +1 -1
- package/dist/index3.vue.d.cts +30 -80
- package/dist/index3.vue.d.ts +30 -80
- package/dist/index4.vue.d.cts +130 -30
- package/dist/index4.vue.d.ts +22 -30
- package/dist/index5.vue.d.cts +18 -126
- package/dist/index5.vue.d.ts +22 -19
- package/dist/index6.vue.d.cts +22 -19
- package/dist/index6.vue.d.ts +117 -22
- package/dist/index7.vue.d.cts +117 -22
- package/dist/index7.vue.d.ts +17 -110
- package/dist/index8.vue.d.cts +17 -110
- package/dist/index8.vue.d.ts +37 -24
- package/dist/index9.vue.d.cts +37 -24
- package/dist/index9.vue.d.ts +80 -39
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/presets.d.cts +96 -0
- package/dist/presets.d.ts +96 -0
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.js +1 -1
- package/dist/style.css +1735 -1400
- package/dist/useCalendarEvents.d.cts +23 -18
- package/dist/useCalendarEvents.d.ts +23 -18
- package/dist/useCollapsePanel.d.cts +4 -3
- package/dist/useCollapsePanel.d.ts +4 -3
- package/dist/useCropperCore.d.cts +32 -17
- package/dist/useCropperCore.d.ts +32 -17
- package/dist/useDraggableLayout.d.cts +2 -2
- package/dist/useDraggableLayout.d.ts +2 -2
- package/dist/useDynamicFormState.d.cts +7 -2
- package/dist/useDynamicFormState.d.ts +7 -2
- package/dist/useEdgeInteraction.d.cts +20 -19
- package/dist/useEdgeInteraction.d.ts +20 -19
- package/dist/useFullscreen.d.cts +6 -6
- package/dist/useFullscreen.d.ts +6 -6
- package/dist/useInfiniteScroll.d.cts +1 -1
- package/dist/useInfiniteScroll.d.ts +1 -1
- package/dist/useQRCode.d.cts +5 -4
- package/dist/useQRCode.d.ts +5 -4
- package/dist/useSearchState.d.cts +9 -9
- package/dist/useSearchState.d.ts +9 -9
- package/dist/useSignatureHistory.d.cts +18 -10
- package/dist/useSignatureHistory.d.ts +18 -10
- package/dist/useSplitResize.d.cts +7 -7
- package/dist/useSplitResize.d.ts +7 -7
- package/dist/useTableQuery.cjs +3 -3
- package/dist/useTableQuery.d.cts +12 -5
- package/dist/useTableQuery.d.ts +12 -5
- package/dist/useTableQuery.js +3 -3
- package/dist/useTimeSelection.d.cts +6 -3
- package/dist/useTimeSelection.d.ts +6 -3
- package/dist/useTreeOperations.d.cts +8 -8
- package/dist/useTreeOperations.d.ts +8 -8
- package/dist/useWorkflowValidation.d.cts +6 -4
- package/dist/useWorkflowValidation.d.ts +6 -4
- package/dist/verification.d.cts +71 -6
- package/dist/verification.d.ts +71 -6
- package/package.json +5 -3
- package/dist/types.d.ts +0 -58
- package/dist/types2.d.cts +0 -58
package/dist/C_ActionBar.css
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
/* unplugin-vue-components disabled */.c-icon[data-v-
|
|
1
|
+
/* unplugin-vue-components disabled */.c-icon[data-v-711aedcd] {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
user-select: none;
|
|
6
6
|
transition: all 0.2s ease-in-out;
|
|
7
7
|
}
|
|
8
|
-
.c-icon--clickable[data-v-
|
|
8
|
+
.c-icon--clickable[data-v-711aedcd] {
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
}
|
|
11
|
-
.c-icon--clickable[data-v-
|
|
11
|
+
.c-icon--clickable[data-v-711aedcd]:hover {
|
|
12
12
|
opacity: 0.8;
|
|
13
13
|
transform: scale(1.05);
|
|
14
14
|
}
|
|
15
|
-
.c-icon--clickable[data-v-
|
|
15
|
+
.c-icon--clickable[data-v-711aedcd]:active {
|
|
16
16
|
transform: scale(0.95);
|
|
17
17
|
}
|
|
18
|
-
.c-icon--clickable[data-v-
|
|
18
|
+
.c-icon--clickable[data-v-711aedcd]:focus-visible {
|
|
19
19
|
outline: 2px solid currentColor;
|
|
20
20
|
outline-offset: 2px;
|
|
21
21
|
border-radius: 4px;
|
|
22
22
|
}
|
|
23
|
-
.c-icon--loading[data-v-
|
|
23
|
+
.c-icon--loading[data-v-711aedcd] {
|
|
24
24
|
opacity: 0.6;
|
|
25
25
|
cursor: wait;
|
|
26
26
|
}
|
|
27
|
-
.c-icon--error[data-v-
|
|
27
|
+
.c-icon--error[data-v-711aedcd] {
|
|
28
28
|
opacity: 0.5;
|
|
29
29
|
}
|
|
30
|
-
.c-icon__loading[data-v-
|
|
30
|
+
.c-icon__loading[data-v-711aedcd] {
|
|
31
31
|
position: relative;
|
|
32
32
|
}
|
|
33
|
-
.c-icon__spinner[data-v-
|
|
33
|
+
.c-icon__spinner[data-v-711aedcd] {
|
|
34
34
|
width: 100%;
|
|
35
35
|
height: 100%;
|
|
36
36
|
border: 2px solid currentColor;
|
|
37
37
|
border-radius: 50%;
|
|
38
38
|
border-top-color: transparent;
|
|
39
|
-
animation: spin-
|
|
39
|
+
animation: spin-711aedcd 1s linear infinite;
|
|
40
40
|
}
|
|
41
|
-
.c-icon__error[data-v-
|
|
41
|
+
.c-icon__error[data-v-711aedcd] {
|
|
42
42
|
font-size: 0.8em;
|
|
43
43
|
opacity: 0.5;
|
|
44
44
|
}
|
|
45
|
-
.c-icon__rotatable[data-v-
|
|
45
|
+
.c-icon__rotatable[data-v-711aedcd] {
|
|
46
46
|
transition: transform 0.3s ease-in-out;
|
|
47
47
|
}
|
|
48
|
-
.c-icon__flippable[data-v-
|
|
48
|
+
.c-icon__flippable[data-v-711aedcd] {
|
|
49
49
|
transition: transform 0.3s ease-in-out;
|
|
50
50
|
}
|
|
51
|
-
@keyframes spin-
|
|
51
|
+
@keyframes spin-711aedcd {
|
|
52
52
|
0% {
|
|
53
53
|
transform: rotate(0deg);
|
|
54
54
|
}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
|
|
60
60
|
/* unplugin-vue-components disabled *//* 通用操作按钮组件样式 */
|
|
61
61
|
/* ================= 主容器 ================= */
|
|
62
|
-
.c-action-bar[data-v-
|
|
62
|
+
.c-action-bar[data-v-3f0311cc] {
|
|
63
63
|
display: flex;
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: space-between;
|
|
@@ -68,28 +68,28 @@
|
|
|
68
68
|
background: var(--c-bg-card);
|
|
69
69
|
border-radius: var(--c-radius);
|
|
70
70
|
border: 1px solid var(--c-border);
|
|
71
|
-
transition:
|
|
71
|
+
transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
|
|
72
72
|
}
|
|
73
|
-
.c-action-bar.is-align-left[data-v-
|
|
73
|
+
.c-action-bar.is-align-left[data-v-3f0311cc] {
|
|
74
74
|
justify-content: flex-start;
|
|
75
75
|
}
|
|
76
|
-
.c-action-bar.is-align-center[data-v-
|
|
76
|
+
.c-action-bar.is-align-center[data-v-3f0311cc] {
|
|
77
77
|
justify-content: center;
|
|
78
78
|
}
|
|
79
|
-
.c-action-bar.is-align-right[data-v-
|
|
79
|
+
.c-action-bar.is-align-right[data-v-3f0311cc] {
|
|
80
80
|
justify-content: flex-end;
|
|
81
81
|
}
|
|
82
|
-
.c-action-bar.is-align-space-between[data-v-
|
|
82
|
+
.c-action-bar.is-align-space-between[data-v-3f0311cc] {
|
|
83
83
|
justify-content: space-between;
|
|
84
84
|
}
|
|
85
|
-
.c-action-bar.is-align-space-around[data-v-
|
|
85
|
+
.c-action-bar.is-align-space-around[data-v-3f0311cc] {
|
|
86
86
|
justify-content: space-around;
|
|
87
87
|
}
|
|
88
|
-
.c-action-bar.is-compact[data-v-
|
|
89
|
-
padding:
|
|
90
|
-
margin-bottom:
|
|
88
|
+
.c-action-bar.is-compact[data-v-3f0311cc] {
|
|
89
|
+
padding: 8px;
|
|
90
|
+
margin-bottom: 8px;
|
|
91
91
|
}
|
|
92
|
-
.c-action-bar.is-inline[data-v-
|
|
92
|
+
.c-action-bar.is-inline[data-v-3f0311cc] {
|
|
93
93
|
padding: 0;
|
|
94
94
|
margin-bottom: 0;
|
|
95
95
|
background: transparent;
|
|
@@ -97,97 +97,97 @@
|
|
|
97
97
|
border-radius: 0;
|
|
98
98
|
box-shadow: none;
|
|
99
99
|
}
|
|
100
|
-
.c-action-bar.is-wrap[data-v-
|
|
100
|
+
.c-action-bar.is-wrap[data-v-3f0311cc] {
|
|
101
101
|
flex-wrap: wrap;
|
|
102
|
-
gap:
|
|
102
|
+
gap: 8px;
|
|
103
103
|
}
|
|
104
104
|
@media (max-width: 768px) {
|
|
105
|
-
.c-action-bar[data-v-
|
|
105
|
+
.c-action-bar[data-v-3f0311cc] {
|
|
106
106
|
flex-direction: column;
|
|
107
107
|
gap: 12px;
|
|
108
108
|
}
|
|
109
|
-
.c-action-bar .actions-group[data-v-
|
|
109
|
+
.c-action-bar .actions-group[data-v-3f0311cc] {
|
|
110
110
|
width: 100%;
|
|
111
111
|
justify-content: center;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/* ================= 按钮组 ================= */
|
|
116
|
-
.actions-group[data-v-
|
|
116
|
+
.actions-group[data-v-3f0311cc] {
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
119
119
|
gap: 12px;
|
|
120
120
|
flex-wrap: nowrap;
|
|
121
121
|
}
|
|
122
|
-
.actions-group.actions-left[data-v-
|
|
122
|
+
.actions-group.actions-left[data-v-3f0311cc] {
|
|
123
123
|
justify-content: flex-start;
|
|
124
124
|
}
|
|
125
|
-
.actions-group.actions-right[data-v-
|
|
125
|
+
.actions-group.actions-right[data-v-3f0311cc] {
|
|
126
126
|
justify-content: flex-end;
|
|
127
127
|
}
|
|
128
|
-
.c-action-bar.has-only-left.is-align-center .actions-group.actions-left[data-v-
|
|
128
|
+
.c-action-bar.has-only-left.is-align-center .actions-group.actions-left[data-v-3f0311cc], .c-action-bar.has-only-right.is-align-center .actions-group.actions-right[data-v-3f0311cc] {
|
|
129
129
|
width: 100%;
|
|
130
130
|
justify-content: center;
|
|
131
131
|
}
|
|
132
|
-
.c-action-bar.has-only-left.is-align-space-between .actions-group.actions-left[data-v-
|
|
132
|
+
.c-action-bar.has-only-left.is-align-space-between .actions-group.actions-left[data-v-3f0311cc], .c-action-bar.has-only-right.is-align-space-between .actions-group.actions-right[data-v-3f0311cc] {
|
|
133
133
|
width: 100%;
|
|
134
134
|
justify-content: space-between;
|
|
135
135
|
}
|
|
136
|
-
.c-action-bar.has-only-left.is-align-space-around .actions-group.actions-left[data-v-
|
|
136
|
+
.c-action-bar.has-only-left.is-align-space-around .actions-group.actions-left[data-v-3f0311cc], .c-action-bar.has-only-right.is-align-space-around .actions-group.actions-right[data-v-3f0311cc] {
|
|
137
137
|
width: 100%;
|
|
138
138
|
justify-content: space-around;
|
|
139
139
|
}
|
|
140
|
-
.c-action-bar.has-only-left.is-align-right .actions-group.actions-left[data-v-
|
|
140
|
+
.c-action-bar.has-only-left.is-align-right .actions-group.actions-left[data-v-3f0311cc] {
|
|
141
141
|
width: 100%;
|
|
142
142
|
justify-content: flex-end;
|
|
143
143
|
}
|
|
144
|
-
.c-action-bar.has-only-right.is-align-left .actions-group.actions-right[data-v-
|
|
144
|
+
.c-action-bar.has-only-right.is-align-left .actions-group.actions-right[data-v-3f0311cc] {
|
|
145
145
|
width: 100%;
|
|
146
146
|
justify-content: flex-start;
|
|
147
147
|
}
|
|
148
|
-
.actions-group[data-v-
|
|
149
|
-
transition:
|
|
148
|
+
.actions-group[data-v-3f0311cc] .n-button {
|
|
149
|
+
transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
|
|
150
150
|
font-weight: 500;
|
|
151
151
|
}
|
|
152
|
-
.actions-group[data-v-
|
|
152
|
+
.actions-group[data-v-3f0311cc] .n-button .n-icon {
|
|
153
153
|
transition: transform 0.3s ease;
|
|
154
154
|
}
|
|
155
|
-
.actions-group[data-v-
|
|
156
|
-
transform: translateY(-
|
|
157
|
-
box-shadow: 0
|
|
155
|
+
.actions-group[data-v-3f0311cc] .n-button:hover:not(:disabled) {
|
|
156
|
+
transform: translateY(-1px);
|
|
157
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
|
|
158
158
|
}
|
|
159
|
-
.actions-group[data-v-
|
|
159
|
+
.actions-group[data-v-3f0311cc] .n-button:hover:not(:disabled) .n-icon {
|
|
160
160
|
transform: scale(1.1);
|
|
161
161
|
}
|
|
162
|
-
.actions-group[data-v-
|
|
162
|
+
.actions-group[data-v-3f0311cc] .n-button:active:not(:disabled) {
|
|
163
163
|
transform: translateY(0);
|
|
164
164
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
165
165
|
}
|
|
166
|
-
.actions-group[data-v-
|
|
166
|
+
.actions-group[data-v-3f0311cc] .n-button:disabled {
|
|
167
167
|
cursor: not-allowed;
|
|
168
168
|
opacity: 0.5;
|
|
169
169
|
}
|
|
170
|
-
.actions-group[data-v-
|
|
170
|
+
.actions-group[data-v-3f0311cc] .n-button.n-button--loading {
|
|
171
171
|
pointer-events: none;
|
|
172
172
|
}
|
|
173
|
-
.actions-group[data-v-
|
|
173
|
+
.actions-group[data-v-3f0311cc] .n-button--primary-type:hover:not(:disabled) {
|
|
174
174
|
box-shadow: 0 4px 12px rgba(24, 160, 88, 0.3);
|
|
175
175
|
}
|
|
176
|
-
.actions-group[data-v-
|
|
176
|
+
.actions-group[data-v-3f0311cc] .n-button--info-type:hover:not(:disabled) {
|
|
177
177
|
box-shadow: 0 4px 12px rgba(42, 148, 125, 0.3);
|
|
178
178
|
}
|
|
179
|
-
.actions-group[data-v-
|
|
179
|
+
.actions-group[data-v-3f0311cc] .n-button--success-type:hover:not(:disabled) {
|
|
180
180
|
box-shadow: 0 4px 12px rgba(99, 226, 183, 0.3);
|
|
181
181
|
}
|
|
182
|
-
.actions-group[data-v-
|
|
182
|
+
.actions-group[data-v-3f0311cc] .n-button--warning-type:hover:not(:disabled) {
|
|
183
183
|
box-shadow: 0 4px 12px rgba(240, 138, 0, 0.3);
|
|
184
184
|
}
|
|
185
|
-
.actions-group[data-v-
|
|
185
|
+
.actions-group[data-v-3f0311cc] .n-button--error-type:hover:not(:disabled) {
|
|
186
186
|
box-shadow: 0 4px 12px rgba(208, 48, 80, 0.3);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/* ================= 中间插槽区域 ================= */
|
|
190
|
-
.actions-center[data-v-
|
|
190
|
+
.actions-center[data-v-3f0311cc] {
|
|
191
191
|
display: flex;
|
|
192
192
|
align-items: center;
|
|
193
193
|
justify-content: center;
|
|
@@ -197,32 +197,32 @@
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
/* ================= 分隔线 ================= */
|
|
200
|
-
.action-divider[data-v-
|
|
200
|
+
.action-divider[data-v-3f0311cc] {
|
|
201
201
|
margin: 0 8px !important;
|
|
202
202
|
height: 20px;
|
|
203
203
|
opacity: 0.3;
|
|
204
204
|
transition: opacity 0.3s ease;
|
|
205
205
|
}
|
|
206
|
-
.action-divider[data-v-
|
|
206
|
+
.action-divider[data-v-3f0311cc]:hover {
|
|
207
207
|
opacity: 0.6;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/* ================= 下拉菜单优化 ================= */
|
|
211
|
-
[data-v-
|
|
211
|
+
[data-v-3f0311cc] .n-dropdown-option {
|
|
212
212
|
transition: all 0.2s ease;
|
|
213
213
|
}
|
|
214
|
-
[data-v-
|
|
214
|
+
[data-v-3f0311cc] .n-dropdown-option:hover {
|
|
215
215
|
transform: translateX(4px);
|
|
216
216
|
}
|
|
217
|
-
[data-v-
|
|
217
|
+
[data-v-3f0311cc] .n-dropdown-option .n-icon {
|
|
218
218
|
transition: transform 0.2s ease;
|
|
219
219
|
}
|
|
220
|
-
[data-v-
|
|
220
|
+
[data-v-3f0311cc] .n-dropdown-option:hover .n-icon {
|
|
221
221
|
transform: scale(1.15);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
/* ================= 加载动画 ================= */
|
|
225
|
-
@keyframes button-loading-
|
|
225
|
+
@keyframes button-loading-3f0311cc {
|
|
226
226
|
0% {
|
|
227
227
|
opacity: 0.6;
|
|
228
228
|
}
|
|
@@ -233,12 +233,12 @@
|
|
|
233
233
|
opacity: 0.6;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
[data-v-
|
|
237
|
-
animation: button-loading-
|
|
236
|
+
[data-v-3f0311cc] .n-button--loading {
|
|
237
|
+
animation: button-loading-3f0311cc 1.5s ease-in-out infinite;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
/* ================= Tooltip 样式 ================= */
|
|
241
|
-
[data-v-
|
|
241
|
+
[data-v-3f0311cc] .n-tooltip .n-tooltip__content {
|
|
242
242
|
font-size: 12px;
|
|
243
243
|
padding: 6px 10px;
|
|
244
244
|
border-radius: 4px;
|
|
@@ -247,16 +247,16 @@
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
/* ================= 暗黑模式适配 ================= */
|
|
250
|
-
html.dark .c-action-bar[data-v-
|
|
250
|
+
html.dark .c-action-bar[data-v-3f0311cc] {
|
|
251
251
|
border-color: rgba(255, 255, 255, 0.09);
|
|
252
252
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
253
253
|
}
|
|
254
|
-
html.dark .actions-group[data-v-
|
|
254
|
+
html.dark .actions-group[data-v-3f0311cc] .n-button:hover:not(:disabled) {
|
|
255
255
|
box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
|
|
256
256
|
}
|
|
257
|
-
html.dark .action-divider[data-v-
|
|
257
|
+
html.dark .action-divider[data-v-3f0311cc] {
|
|
258
258
|
opacity: 0.15;
|
|
259
259
|
}
|
|
260
|
-
html.dark .action-divider[data-v-
|
|
260
|
+
html.dark .action-divider[data-v-3f0311cc]:hover {
|
|
261
261
|
opacity: 0.4;
|
|
262
262
|
}
|
package/dist/C_ActionBar.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { type ActionBarConfig, type ActionButtonSize, type ActionButtonType, type ActionDropdownItem, type ActionGroupAlign, type ActionItem, _default as C_ActionBar, type TableActionsEmits, type TableActionsProps };
|
|
1
|
+
import { a as resolveActionPreset, c as ActionButtonSize, d as ActionGroupAlign, f as ActionItem, h as TableActionsProps, i as defineActions, l as ActionButtonType, m as TableActionsEmits, n as ACTION_PRESETS, o as _default, p as ActionState, r as DEFAULT_ACTION_ICON, s as ActionBarConfig, t as ACTION_BAR_DEFAULT_CONFIG, u as ActionDropdownItem } from "./presets.cjs";
|
|
2
|
+
export { ACTION_BAR_DEFAULT_CONFIG, ACTION_PRESETS, type ActionBarConfig, type ActionButtonSize, type ActionButtonType, type ActionDropdownItem, type ActionGroupAlign, type ActionItem, type ActionState, _default as C_ActionBar, DEFAULT_ACTION_ICON, type TableActionsEmits, type TableActionsProps, defineActions, resolveActionPreset };
|
package/dist/C_ActionBar.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { type ActionBarConfig, type ActionButtonSize, type ActionButtonType, type ActionDropdownItem, type ActionGroupAlign, type ActionItem, _default as C_ActionBar, type TableActionsEmits, type TableActionsProps };
|
|
1
|
+
import { a as resolveActionPreset, c as ActionButtonSize, d as ActionGroupAlign, f as ActionItem, h as TableActionsProps, i as defineActions, l as ActionButtonType, m as TableActionsEmits, n as ACTION_PRESETS, o as _default, p as ActionState, r as DEFAULT_ACTION_ICON, s as ActionBarConfig, t as ACTION_BAR_DEFAULT_CONFIG, u as ActionDropdownItem } from "./presets.js";
|
|
2
|
+
export { ACTION_BAR_DEFAULT_CONFIG, ACTION_PRESETS, type ActionBarConfig, type ActionButtonSize, type ActionButtonType, type ActionDropdownItem, type ActionGroupAlign, type ActionItem, type ActionState, _default as C_ActionBar, DEFAULT_ACTION_ICON, type TableActionsEmits, type TableActionsProps, defineActions, resolveActionPreset };
|
package/dist/C_ActionBar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./C_Icon2.js";import{t as
|
|
1
|
+
import"./C_Icon2.js";import{a as e,i as t,n,o as r,r as i,t as a}from"./C_ActionBar2.js";export{n as ACTION_BAR_DEFAULT_CONFIG,i as ACTION_PRESETS,a as C_ActionBar,t as DEFAULT_ACTION_ICON,e as defineActions,r as resolveActionPreset};
|
package/dist/C_ActionBar2.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`);const i={key:1,class:`actions-center`},
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`);const i=`mdi:gesture-tap-button`,a={align:`left`,size:`tiny`,gap:6,wrap:!1,showDivider:!1,dividerType:`vertical`,compact:!0,inline:!0},o={add:{label:`新增`,icon:`mdi:plus`,type:`primary`},create:{label:`新增`,icon:`mdi:plus`,type:`primary`},save:{label:`保存`,icon:`mdi:content-save-outline`,type:`primary`},confirm:{label:`确认`,icon:`mdi:check`,type:`primary`},cancel:{label:`取消`,icon:`mdi:close`},close:{label:`关闭`,icon:`mdi:close`},view:{label:`查看`,icon:`mdi:eye-outline`},edit:{label:`编辑`,icon:`mdi:pencil-outline`},delete:{label:`删除`,icon:`mdi:delete-outline`,type:`error`},remove:{label:`删除`,icon:`mdi:delete-outline`,type:`error`},refresh:{label:`刷新`,icon:`mdi:refresh`},import:{label:`导入`,icon:`mdi:file-import-outline`},export:{label:`导出`,icon:`mdi:file-export-outline`},print:{label:`打印`,icon:`mdi:printer-outline`},reset:{label:`重置`,icon:`mdi:restore`},columns:{label:`列设置`,icon:`mdi:view-column-outline`},fullscreen:{label:`全屏`,icon:`mdi:fullscreen`},settings:{label:`功能配置`,icon:`mdi:tune-variant`},more:{label:`更多`,icon:`mdi:dots-horizontal`}},s=e=>{let t=e.key?o[e.key]:void 0;return{...t,...e,label:e.label||t?.label||e.key||`操作`,icon:e.icon||t?.icon||i}},c=e=>typeof e==`function`?e():(0,n.unref)(e),l=e=>e,u={key:1,class:`actions-center`},d=(0,n.defineComponent)({name:`C_ActionBar`,__name:`index`,props:{actions:{default:()=>[]},leftActions:{default:()=>[]},rightActions:{default:()=>[]},config:{default:()=>({})}},emits:[`action-click`,`dropdown-click`],setup(t,{emit:i}){let o=t,l=i,d=(0,n.computed)(()=>({...a,...o.config})),f=(0,n.computed)(()=>{if(o.leftActions&&o.leftActions.length>0)return o.leftActions.filter(e=>m(e));if(o.actions.length>0){let e=o.rightActions&&o.rightActions.length>0,t=o.actions.some(e=>e.group===`right`);return!e&&!t?o.actions.filter(e=>m(e)):o.actions.filter(e=>e.group!==`right`&&m(e))}return[]}),p=(0,n.computed)(()=>o.rightActions&&o.rightActions.length>0?o.rightActions.filter(e=>m(e)):o.actions.filter(e=>e.group===`right`&&m(e))),m=e=>e.show===void 0?!0:c(e.show)??!0,h=(0,n.shallowReactive)(new Set),g=e=>c(e.disabled)||h.has(e),_=e=>c(e.loading)||h.has(e),v=async e=>{if(!(e.dropdown&&e.dropdown.length>0)&&!(g(e)||_(e))&&(l(`action-click`,e),e.onClick)){e.autoLoading!==!1&&h.add(e);try{await e.onClick()}finally{h.delete(e)}}},y=async(e,t)=>{l(`dropdown-click`,e,t),e.onClick&&await e.onClick()},b=(0,n.defineComponent)({name:`ActionButton`,props:{action:{type:Object,required:!0}},emits:[`click`,`dropdown-select`],setup(t,{emit:i}){let a=(0,n.computed)(()=>t.action),o=(0,n.computed)(()=>s(a.value)),l=(0,n.computed)(()=>o.value.size||d.value.size),u=(0,n.computed)(()=>({tiny:14,small:15,medium:16,large:18})[l.value]),f=(0,n.computed)(()=>o.value.dropdown?o.value.dropdown.filter(e=>e.show===void 0?!0:c(e.show)).map(t=>{let{icon:r}=t;return{key:t.key,label:t.label,icon:r?()=>(0,n.h)(e.t,{name:r,size:14,"aria-hidden":!0}):void 0,disabled:c(t.disabled)}}):[]),p=e=>{let t=o.value.dropdown?.find(t=>t.key===e);t&&i(`dropdown-select`,t)},m=t=>{let{icon:i}=o.value,s=(0,n.h)(r.NButton,{type:o.value.type||`default`,size:l.value,loading:_(a.value),disabled:g(a.value),...t,...o.value.buttonProps},{default:()=>o.value.label,icon:i?()=>(0,n.h)(e.t,{name:i,size:u.value,"aria-hidden":!0}):void 0});return o.value.directives&&o.value.directives.length>0?(0,n.withDirectives)(s,o.value.directives):s},h=()=>{let e=m({onClick:()=>i(`click`)});return o.value.tooltip?(0,n.h)(r.NTooltip,{placement:`top`},{trigger:()=>e,default:()=>o.value.tooltip}):e},v=()=>{let e=m();return(0,n.h)(r.NDropdown,{options:f.value,onSelect:p},{default:()=>e})};return()=>o.value.dropdown&&o.value.dropdown.length>0?v():h()}});return(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`c-action-bar`,{"is-compact":d.value.compact,"is-inline":d.value.inline,"is-wrap":d.value.wrap,[`is-align-${d.value.align}`]:!0,"has-only-left":f.value.length>0&&p.value.length===0&&!e.$slots.center,"has-only-right":p.value.length>0&&f.value.length===0&&!e.$slots.center}])},[f.value.length>0?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,class:`actions-group actions-left`,style:(0,n.normalizeStyle)({gap:`${d.value.gap}px`})},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(f.value,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:e.key||`left-${t}`},[(0,n.createVNode)((0,n.unref)(b),{action:e,onClick:t=>v(e),onDropdownSelect:t=>y(t,e)},null,8,[`action`,`onClick`,`onDropdownSelect`]),d.value.showDivider&&t<f.value.length-1&&d.value.dividerType===`vertical`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.NDivider),{key:0,vertical:``,class:`action-divider`})):(0,n.createCommentVNode)(`v-if`,!0)],64))),128))],4)):(0,n.createCommentVNode)(`v-if`,!0),e.$slots.center?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,u,[(0,n.renderSlot)(e.$slots,`center`,{},void 0,!0)])):(0,n.createCommentVNode)(`v-if`,!0),p.value.length>0?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:2,class:`actions-group actions-right`,style:(0,n.normalizeStyle)({gap:`${d.value.gap}px`})},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(p.value,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:e.key||`right-${t}`},[(0,n.createVNode)((0,n.unref)(b),{action:e,onClick:t=>v(e),onDropdownSelect:t=>y(t,e)},null,8,[`action`,`onClick`,`onDropdownSelect`]),d.value.showDivider&&t<p.value.length-1&&d.value.dividerType===`vertical`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.NDivider),{key:0,vertical:``,class:`action-divider`})):(0,n.createCommentVNode)(`v-if`,!0)],64))),128))],4)):(0,n.createCommentVNode)(`v-if`,!0)],2))}});var f=t.t(d,[[`__scopeId`,`data-v-3f0311cc`]]);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
package/dist/C_ActionBar2.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,createVNode as s,defineComponent as c,h as l,normalizeClass as u,normalizeStyle as d,openBlock as f,renderList as p,renderSlot as m,
|
|
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,createVNode as s,defineComponent as c,h as l,normalizeClass as u,normalizeStyle as d,openBlock as f,renderList as p,renderSlot as m,shallowReactive as h,unref as g,withDirectives as _}from"vue";import{NButton as v,NDivider as y,NDropdown as b,NTooltip as x}from"naive-ui";const S=`mdi:gesture-tap-button`,C={align:`left`,size:`tiny`,gap:6,wrap:!1,showDivider:!1,dividerType:`vertical`,compact:!0,inline:!0},w={add:{label:`新增`,icon:`mdi:plus`,type:`primary`},create:{label:`新增`,icon:`mdi:plus`,type:`primary`},save:{label:`保存`,icon:`mdi:content-save-outline`,type:`primary`},confirm:{label:`确认`,icon:`mdi:check`,type:`primary`},cancel:{label:`取消`,icon:`mdi:close`},close:{label:`关闭`,icon:`mdi:close`},view:{label:`查看`,icon:`mdi:eye-outline`},edit:{label:`编辑`,icon:`mdi:pencil-outline`},delete:{label:`删除`,icon:`mdi:delete-outline`,type:`error`},remove:{label:`删除`,icon:`mdi:delete-outline`,type:`error`},refresh:{label:`刷新`,icon:`mdi:refresh`},import:{label:`导入`,icon:`mdi:file-import-outline`},export:{label:`导出`,icon:`mdi:file-export-outline`},print:{label:`打印`,icon:`mdi:printer-outline`},reset:{label:`重置`,icon:`mdi:restore`},columns:{label:`列设置`,icon:`mdi:view-column-outline`},fullscreen:{label:`全屏`,icon:`mdi:fullscreen`},settings:{label:`功能配置`,icon:`mdi:tune-variant`},more:{label:`更多`,icon:`mdi:dots-horizontal`}},T=e=>{let t=e.key?w[e.key]:void 0;return{...t,...e,label:e.label||t?.label||e.key||`操作`,icon:e.icon||t?.icon||S}},E=e=>typeof e==`function`?e():g(e),D=e=>e,O={key:1,class:`actions-center`};var k=t(c({name:`C_ActionBar`,__name:`index`,props:{actions:{default:()=>[]},leftActions:{default:()=>[]},rightActions:{default:()=>[]},config:{default:()=>({})}},emits:[`action-click`,`dropdown-click`],setup(t,{emit:S}){let w=t,D=S,k=r(()=>({...C,...w.config})),A=r(()=>{if(w.leftActions&&w.leftActions.length>0)return w.leftActions.filter(e=>M(e));if(w.actions.length>0){let e=w.rightActions&&w.rightActions.length>0,t=w.actions.some(e=>e.group===`right`);return!e&&!t?w.actions.filter(e=>M(e)):w.actions.filter(e=>e.group!==`right`&&M(e))}return[]}),j=r(()=>w.rightActions&&w.rightActions.length>0?w.rightActions.filter(e=>M(e)):w.actions.filter(e=>e.group===`right`&&M(e))),M=e=>e.show===void 0?!0:E(e.show)??!0,N=h(new Set),P=e=>E(e.disabled)||N.has(e),F=e=>E(e.loading)||N.has(e),I=async e=>{if(!(e.dropdown&&e.dropdown.length>0)&&!(P(e)||F(e))&&(D(`action-click`,e),e.onClick)){e.autoLoading!==!1&&N.add(e);try{await e.onClick()}finally{N.delete(e)}}},L=async(e,t)=>{D(`dropdown-click`,e,t),e.onClick&&await e.onClick()},R=c({name:`ActionButton`,props:{action:{type:Object,required:!0}},emits:[`click`,`dropdown-select`],setup(t,{emit:n}){let i=r(()=>t.action),a=r(()=>T(i.value)),o=r(()=>a.value.size||k.value.size),s=r(()=>({tiny:14,small:15,medium:16,large:18})[o.value]),c=r(()=>a.value.dropdown?a.value.dropdown.filter(e=>e.show===void 0?!0:E(e.show)).map(t=>{let{icon:n}=t;return{key:t.key,label:t.label,icon:n?()=>l(e,{name:n,size:14,"aria-hidden":!0}):void 0,disabled:E(t.disabled)}}):[]),u=e=>{let t=a.value.dropdown?.find(t=>t.key===e);t&&n(`dropdown-select`,t)},d=t=>{let{icon:n}=a.value,r=l(v,{type:a.value.type||`default`,size:o.value,loading:F(i.value),disabled:P(i.value),...t,...a.value.buttonProps},{default:()=>a.value.label,icon:n?()=>l(e,{name:n,size:s.value,"aria-hidden":!0}):void 0});return a.value.directives&&a.value.directives.length>0?_(r,a.value.directives):r},f=()=>{let e=d({onClick:()=>n(`click`)});return a.value.tooltip?l(x,{placement:`top`},{trigger:()=>e,default:()=>a.value.tooltip}):e},p=()=>{let e=d();return l(b,{options:c.value,onSelect:u},{default:()=>e})};return()=>a.value.dropdown&&a.value.dropdown.length>0?p():f()}});return(e,t)=>(f(),o(`div`,{class:u([`c-action-bar`,{"is-compact":k.value.compact,"is-inline":k.value.inline,"is-wrap":k.value.wrap,[`is-align-${k.value.align}`]:!0,"has-only-left":A.value.length>0&&j.value.length===0&&!e.$slots.center,"has-only-right":j.value.length>0&&A.value.length===0&&!e.$slots.center}])},[A.value.length>0?(f(),o(`div`,{key:0,class:`actions-group actions-left`,style:d({gap:`${k.value.gap}px`})},[(f(!0),o(n,null,p(A.value,(e,t)=>(f(),o(n,{key:e.key||`left-${t}`},[s(g(R),{action:e,onClick:t=>I(e),onDropdownSelect:t=>L(t,e)},null,8,[`action`,`onClick`,`onDropdownSelect`]),k.value.showDivider&&t<A.value.length-1&&k.value.dividerType===`vertical`?(f(),i(g(y),{key:0,vertical:``,class:`action-divider`})):a(`v-if`,!0)],64))),128))],4)):a(`v-if`,!0),e.$slots.center?(f(),o(`div`,O,[m(e.$slots,`center`,{},void 0,!0)])):a(`v-if`,!0),j.value.length>0?(f(),o(`div`,{key:2,class:`actions-group actions-right`,style:d({gap:`${k.value.gap}px`})},[(f(!0),o(n,null,p(j.value,(e,t)=>(f(),o(n,{key:e.key||`right-${t}`},[s(g(R),{action:e,onClick:t=>I(e),onDropdownSelect:t=>L(t,e)},null,8,[`action`,`onClick`,`onDropdownSelect`]),k.value.showDivider&&t<j.value.length-1&&k.value.dividerType===`vertical`?(f(),i(g(y),{key:0,vertical:``,class:`action-divider`})):a(`v-if`,!0)],64))),128))],4)):a(`v-if`,!0)],2))}}),[[`__scopeId`,`data-v-3f0311cc`]]);export{D as a,S as i,C as n,T as o,w as r,k as t};
|