review:【antd】【mp】菜单优化

This commit is contained in:
YunaiV
2025-11-09 15:31:20 +08:00
parent 15215b4f4c
commit f8abee2b63
5 changed files with 56 additions and 51 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts" setup>
// TODO @hw名字可以缩写成 previewer.vue文件名
import type { Menu } from './types';
import { computed } from 'vue';
@@ -43,7 +44,8 @@ function addMenu() {
/** 添加横向二级菜单parent 表示要操作的父菜单 */
function addSubMenu(i: number, parent: any) {
const subMenuKeyLength = parent.children.length; // 获取二级菜单key长度
const subMenuKeyLength = parent.children.length; // 获取二级菜单 key 长度
// TODO @hw可以 inline 掉。idea 或者 vscode 的一些告警,处理掉会更干净一些。
const addButton = {
name: '子菜单名称',
reply: {
@@ -183,6 +185,7 @@ function onChildDragEnd({ newIndex }: { newIndex: number }) {
</template>
<style lang="scss" scoped>
/** TODO @hw尽量使用 tindwind 替代。ps如果多个组件复用那就不用调整 */
.menu-bottom {
position: relative;
float: left;