mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Sub-Store 1.0版本
1. 移除了所有基于关键词的节点操作,统一使用基于正则表达式的节点操作。 2. UI的大量改进。
This commit is contained in:
70
web/src/components/base/MaterialDropdown.vue
Normal file
70
web/src/components/base/MaterialDropdown.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<v-menu
|
||||
v-model="value"
|
||||
:transition="transition"
|
||||
offset-y
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<template v-slot:activator="{ attrs, on }">
|
||||
<v-btn
|
||||
:color="color"
|
||||
default
|
||||
min-width="200"
|
||||
rounded
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<slot />
|
||||
|
||||
<v-icon>
|
||||
mdi-{{ value ? 'menu-up' : 'menu-down' }}
|
||||
</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-sheet>
|
||||
<v-list dense>
|
||||
<v-list-item
|
||||
v-for="(item, i) in items"
|
||||
:key="i"
|
||||
@click="$(`click:action-${item.id}`)"
|
||||
>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title v-text="item.text" />
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-sheet>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// Mixins
|
||||
import Proxyable from 'vuetify/lib/mixins/proxyable'
|
||||
|
||||
export default {
|
||||
name: 'MaterialDropdown',
|
||||
|
||||
mixins: [Proxyable],
|
||||
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
default: 'primary'
|
||||
},
|
||||
items: {
|
||||
type: Array,
|
||||
default: () => ([
|
||||
{
|
||||
id: undefined,
|
||||
text: undefined
|
||||
}
|
||||
])
|
||||
},
|
||||
transition: {
|
||||
type: String,
|
||||
default: 'scale-transition'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user