perf: ♻️ Optimize mirror group

This commit is contained in:
viarotel 2023-11-11 16:18:12 +08:00
parent 92f57eca6a
commit 5793c246fa

View File

@ -1,15 +1,16 @@
<template> <template>
<el-dropdown :disabled="loading" @command="handleCommand"> <el-dropdown @command="handleCommand">
<div class=""> <div class="">
<slot :loading="loading" /> <slot :loading="loading" />
</div> </div>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item v-for="item of 4" :key="item" :command="item"> <template v-if="!loading">
{{ $t("device.control.mirror-group.open", { num: item }) }} <el-dropdown-item v-for="item of 4" :key="item" :command="item">
</el-dropdown-item> {{ $t("device.control.mirror-group.open", { num: item }) }}
</el-dropdown-item>
<el-dropdown-item command="close"> </template>
<el-dropdown-item v-else command="close">
<span class="" :title="$t('device.control.mirror-group.close.tips')"> <span class="" :title="$t('device.control.mirror-group.close.tips')">
{{ $t("device.control.mirror-group.close") }} {{ $t("device.control.mirror-group.close") }}
</span> </span>