pref: place the tooltip of switch bottom place at the bottom by default
This commit is contained in:
parent
ccb4bb85ae
commit
b601ba255b
|
@ -12,6 +12,10 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
icons: Array,
|
icons: Array,
|
||||||
tTooltips: Array,
|
tTooltips: Array,
|
||||||
|
tTooltipPlacement: {
|
||||||
|
type: String,
|
||||||
|
default: 'bottom',
|
||||||
|
},
|
||||||
iconSize: {
|
iconSize: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: 20,
|
default: 20,
|
||||||
|
@ -45,6 +49,7 @@ const handleSwitch = (idx) => {
|
||||||
v-for="(icon, i) in props.icons"
|
v-for="(icon, i) in props.icons"
|
||||||
:key="i"
|
:key="i"
|
||||||
:disabled="!(props.tTooltips && props.tTooltips[i])"
|
:disabled="!(props.tTooltips && props.tTooltips[i])"
|
||||||
|
:placement="props.tTooltipPlacement"
|
||||||
:show-arrow="false">
|
:show-arrow="false">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-button :focusable="false" :size="props.size" :tertiary="i !== props.value" @click="handleSwitch(i)">
|
<n-button :focusable="false" :size="props.size" :tertiary="i !== props.value" @click="handleSwitch(i)">
|
||||||
|
|
Loading…
Reference in New Issue