dakeliu/Dkl-vue3-ui-DP/src/views/largeScreen/components/dropdownItem.vue

47 lines
1.0 KiB
Vue
Raw Normal View History

2025-10-17 23:11:55 +08:00
<template>
<el-dropdown class="dropdown" popper-class="largeScreen__dropdown" trigger="click" @command="dropDownHandle">
<span class="el-dropdown-link">
<img src="@/assets/images/largeScreenImage/more@2x.png" alt="">
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="v in options" :command="v.value">
{{ v.label }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
<script setup>
import { ref, reactive, onMounted, computed, getCurrentInstance} from "vue";
const props = defineProps({
options: {
required: true,
default: () => []
},
})
const emit = defineEmits(["command"]);
function dropDownHandle(e) {
emit("command",e)
}
onMounted(() => {});
</script>
<style lang="scss" scoped>
@use "@/assets/styles/computed.scss" as calculate;
.dropdown {
.el-dropdown-link {
img {
width: calculate.vw(15px);
height: calculate.vw(15px);
cursor: pointer;
}
}
}
</style>