feat(menu): 新增 title 插槽, 调整 子菜单 height 为 46px
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
<template>
|
||||
<dd :class="[selectKey === id ? 'layui-this' : '']" @click="selectHandle()">
|
||||
<a href="javascript:void(0)">{{ title }}</a>
|
||||
<a href="javascript:void(0)">
|
||||
<slot v-if="slots.title" name="title"></slot>
|
||||
<span v-else> {{ title }} </span>
|
||||
</a>
|
||||
</dd>
|
||||
</template>
|
||||
|
||||
<script setup name="LayMenuChildItem" lang="ts">
|
||||
import { defineProps, inject, Ref } from 'vue'
|
||||
import { defineProps, inject, Ref, useSlots } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
id: string
|
||||
title: string
|
||||
}>()
|
||||
const slots = useSlots()
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
id: string
|
||||
title: string
|
||||
}>()
|
||||
|
||||
const selectKey: Ref<string> = inject('selectKey') as Ref<string>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user