[新增] dropdown 下拉菜单

This commit is contained in:
就眠仪式
2021-10-07 02:03:35 +08:00
parent 989aa56af0
commit ef543323c5
9 changed files with 147 additions and 97 deletions

View File

@@ -1,7 +1,23 @@
<template>
<div>下拉菜单</div>
<div class="layui-dropdown" @click="open" :class="[openState?'layui-dropdown-up':'']">
<slot></slot>
<dl class="layui-anim layui-anim-upbit">
<slot name="content"></slot>
</dl>
</div>
</template>
<script setup name="LayDropdown" lang="ts">
<script setup name="LaySelect" lang="ts">
import { defineProps, ref } from 'vue'
const props =
defineProps<{
trigger?: string
}>()
const openState = ref(false)
const open = function() {
openState.value = !openState.value
}
</script>