<template>
  <div>
    <el-button
      type="primary"
      v-for="(v, i) in pathList"
      :key="i"
      @click="goPage(v)"
    >
      {{ v.name }}
    </el-button>
  </div>
</template>
<script>
export default {
  name: "MenuList",
  data() {
    return {
      pathList: [
        {
          name: "输入框",
          path: "/input",
        },
        {
          name: "按钮",
          path: "/button",
        },
        {
          name: "选择器",
          path: "/select",
        },
        {
          name: "图标",
          path: "/icon",
        },
        {
          name: "表格",
          path: "/table",
        },

        {
          name: "导航栏",
          path: "/navMenu",
        },
        {
          name: "弹出框",
          path: "/modal",
        },
      
      ],
    };
  },
  methods: {
    goPage(v) {
      this.$router.push({
        path: v.path,
      });
    },
  },
};
</script>
