u
This commit is contained in:
1 parent
f572dce2f6
commit
e99a9fb274
356 files changed
+28877
-1055
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
// 最常用:items 传数组,点击项通过 click 事件回传 { key, item }
|
||||
import { G3Button, G3Dropdown, G3Message } from '@g3soft/ui'
|
||||
|
||||
const items = [
|
||||
{ key: 'edit', label: '编辑' },
|
||||
{ key: 'copy', label: '复制' },
|
||||
{ divider: true },
|
||||
{ key: 'delete', label: '删除', danger: true },
|
||||
]
|
||||
|
||||
function onClick(payload: { key?: string | number }) {
|
||||
G3Message.info(`点击了 ${String(payload.key)}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<G3Dropdown :items="items" @click="onClick">
|
||||
<G3Button type="outline">操作</G3Button>
|
||||
</G3Dropdown>
|
||||
</template>
|
||||
Reference in new issue
Block a user