File tree Expand file tree Collapse file tree 5 files changed +49
-3
lines changed
packages/anu-vue/src/components Expand file tree Collapse file tree 5 files changed +49
-3
lines changed Original file line number Diff line number Diff line change
1
+ <script lang="ts" setup>
2
+ const items = [
3
+ {
4
+ icon: ' i-bx-send' ,
5
+ text: ' Send' ,
6
+ },
7
+ {
8
+ icon: ' i-bx-edit' ,
9
+ text: ' Edit' ,
10
+ },
11
+ {
12
+ icon: ' i-bx-trash' ,
13
+ text: ' Delete' ,
14
+ color: ' danger' , // [!code hl]
15
+ },
16
+ ]
17
+ </script >
18
+
19
+ <template >
20
+ <div class =" max-w-550px" >
21
+ <ABtn
22
+ icon =" i-bx-file"
23
+ append-icon =" i-bx-chevron-down"
24
+ >
25
+ Invoice
26
+ <AMenu >
27
+ <!-- ℹ️ `model-value="null"` will be all list items clickable -->
28
+ <AList
29
+ :model-value =" null"
30
+ :items =" items"
31
+ />
32
+ </AMenu >
33
+ </ABtn >
34
+ </div >
35
+ </template >
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ const items = [
31
31
class =" cursor-pointer"
32
32
>
33
33
<AMenu >
34
+ <!-- ℹ️ `model-value="null"` will be all list items clickable -->
34
35
<AList
35
36
:model-value =" null"
36
37
:items =" items"
Original file line number Diff line number Diff line change 18
18
:::
19
19
20
20
::::
21
+
22
+ ::::card Colored Actions Menu {bordered}
23
+
24
+ <br >
25
+
26
+ :::code UIMiscColoredActionsMenu
27
+ <<< @/components/ui/misc/UIMiscColoredActionsMenu.vue
28
+ :::
29
+
30
+ ::::
Original file line number Diff line number Diff line change 31
31
32
32
// useLayer
33
33
const { styles, classes } = getLayerClasses (
34
- computed (() => props .isActive ? (props .color || ' primary' ) : undefined ),
34
+ computed (() => ( props .color ?? props . isActive ) ? (props .color || ' primary' ) : undefined ),
35
35
computed (() => props .isActive ? (props .variant || ' light' ) : ' text' ),
36
36
toRef (props , ' states' ),
37
37
{ statesClass: ' states:10' },
@@ -59,7 +59,7 @@ const { styles, classes } = getLayerClasses(
59
59
>
60
60
<i
61
61
v-if =" props.icon && !props.iconAppend"
62
- class =" text-xl "
62
+ class =" text-lg "
63
63
:class =" props.icon"
64
64
@click =" $emit('click:icon')"
65
65
/>
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ function handleListItemClick(item: AListPropItems[number]) {
64
64
v-bind =" typeof item === 'string' ? {} : item"
65
65
:avatar-append =" props.avatarAppend"
66
66
:icon-append =" props.iconAppend"
67
- :color =" props.color"
67
+ :color =" typeof item === 'object' ? item.color : props.color"
68
68
:variant =" props.variant"
69
69
:states =" props.states"
70
70
:is-active =" options[index]?.isSelected as unknown as boolean"
You can’t perform that action at this time.
0 commit comments