mp-menu
v1.0.10
Published
一个微信自定义菜单编辑组件
Downloads
34
Readme
微信自定义菜单组件
Install
npm install mp-menu
yarn add mp-menu
pnpm add mp-menu
Advanced
<template>
<MpMenu ref="mpMenuRef">
<button @click="onsubmit">发布菜单</button>
</MpMenu>
</template>
<script setup lang="ts">
import {MpMenu} from "mp-menu"
import 'mp-menu/dist/style.css'
import {ref} from "vue";
const mpMenuRef = ref();
const onsubmit = () => {
console.log(mpMenuRef.value.getButtons())
}
// 更新菜单
mpMenuRef.value.update([
{
name: '子菜单名称',
type: 'view',
url: "",
appId: "",
pagePath: ""
}
])
</script>