Skip to content

基本使用

vue

<template>
  <zeroDropDown :options="opt">
    <zero-button>点击展示下拉菜单</zero-button>
  </zeroDropDown>
</template>
<script setup>
  import {ref} from 'vue';

  const opt = ref([
    {
      label: '菜单1',
      disabled: false,
      value: 1
    },
    {
      label: '菜单2',
      disabled: false,
      value: 2
    },
    {
      label: '菜单3',
      disabled: true,
      value: 3
    }
  ]);
</script>
属性名说明可选值默认值类型
options菜单选项-[]Array
placement位置'top' , 'top-start' , 'top-end' , 'bottom' , 'bottom-start' , 'bottom-end' , 'left' , 'left-start' , 'left-end' , 'right' , 'right-start' , 'right-end'bottomString