x-php-Admin/src/components/xMenu/index.vue
2023-07-11 11:11:38 +08:00

49 lines
748 B
Vue

<template>
<div>
<x-menu-item
v-for="(item, index) in list"
:key="index"
:label="item.label"
:name="item.name"
:icon-color="item.iconColor"
:icon-class="item.iconClass"
@click="menuClick(index)"/>
</div>
</template>
<script>
import xMenuItem from './item'
export default {
// 菜单
name: 'xMenu',
components: {
xMenuItem
},
props: {
value: {
type: [String, Number],
default: 0
},
list: Array
},
data() {
return {}
},
computed: {},
watch: {},
mounted() {},
beforeDestroy() {},
methods: {
menuClick(index) {
this.$emit('input', index)
this.$emit('select', index)
}
}
}
</script>
<style lang="scss" scoped>
</style>