Skip to content

Commit

Permalink
perf: ♻️ Optimize mirror group
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 11, 2023
1 parent 92f57ec commit 5793c24
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<template>
<el-dropdown :disabled="loading" @command="handleCommand">
<el-dropdown @command="handleCommand">
<div class="">
<slot :loading="loading" />
</div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="item of 4" :key="item" :command="item">
{{ $t("device.control.mirror-group.open", { num: item }) }}
</el-dropdown-item>

<el-dropdown-item command="close">
<template v-if="!loading">
<el-dropdown-item v-for="item of 4" :key="item" :command="item">
{{ $t("device.control.mirror-group.open", { num: item }) }}
</el-dropdown-item>
</template>
<el-dropdown-item v-else command="close">
<span class="" :title="$t('device.control.mirror-group.close.tips')">
{{ $t("device.control.mirror-group.close") }}
</span>
Expand Down

0 comments on commit 5793c24

Please sign in to comment.