[修复] dropdown 组件 触发逻辑

This commit is contained in:
就眠仪式 2021-10-07 18:21:28 +08:00
parent 8f90b73fd0
commit 3ed5a411f4
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@layui/layui-vue",
"version": "0.0.10",
"version": "0.0.11",
"description": "a component library for Vue 3 base on layui-vue",
"main": "lib/layui-vue.umd.js",
"module": "lib/layui-vue.es.js",
@ -24,7 +24,7 @@
},
"repository": {
"type": "git",
"url": "https://gitee.com/Jmysy/layui-vue"
"url": "https://gitee.com/layui-vue/layui-vue"
},
"keywords": [
"layui-vue",
@ -34,9 +34,9 @@
"author": "就眠儀式",
"license": "MIT",
"bugs": {
"url": "https://gitee.com/Jmysy/layui-vue/issues"
"url": "https://gitee.com/layui-vue/layui-vue/issues"
},
"homepage": "https://gitee.com/Jmysy/layui-vue/blob/master/README.md",
"homepage": "https://gitee.com/layui-vue/layui-vue/blob/master/README.md",
"peerDependencies": {
"vue": "^3.2.19",
"vue-router": "^4.0.10"

View File

@ -2,10 +2,11 @@
<div
v-if="trigger === 'click'"
class="layui-dropdown"
@click="open"
:class="[openState ? 'layui-dropdown-up' : '']"
>
<div @click="open">
<slot></slot>
</div>
<dl class="layui-anim layui-anim-upbit">
<ul class="layui-menu layui-dropdown-menu">
<slot name="content"></slot>