新年的第一次提交
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import type { App } from "vue";
|
||||
import Component from "./index.vue";
|
||||
import type { IDefineComponent } from "../../types/index";
|
||||
|
||||
Component.install = (app: App) => {
|
||||
app.component(Component.name || "LayDropdownItem", Component);
|
||||
app.component(Component.name, Component);
|
||||
};
|
||||
|
||||
export default Component as IDefineComponent;
|
||||
export default Component;
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<template>
|
||||
<li>
|
||||
<div class="layui-menu-body-title" @click="click">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "LayDropdownItem"
|
||||
}
|
||||
</script>
|
||||
|
||||
<script setup name="LayDropdownItem" lang="ts">
|
||||
<script setup lang="ts">
|
||||
import { inject, Ref } from "vue";
|
||||
|
||||
const openState: Ref<boolean> = inject("openState") as Ref<boolean>;
|
||||
@@ -15,3 +13,11 @@ const click = function () {
|
||||
openState.value = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<li>
|
||||
<div class="layui-menu-body-title" @click="click">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
Reference in New Issue
Block a user