mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-10-15 18:26:45 +08:00
style(form): radio-group选项中icon大小根据size变化
This commit is contained in:
parent
2888004c17
commit
83bf36d980
@ -9,12 +9,12 @@
|
|||||||
>
|
>
|
||||||
<TMagicTooltip v-if="option.tooltip" placement="top-start" :content="option.tooltip">
|
<TMagicTooltip v-if="option.tooltip" placement="top-start" :content="option.tooltip">
|
||||||
<div>
|
<div>
|
||||||
<TMagicIcon v-if="option.icon" :size="'16'"><component :is="option.icon"></component></TMagicIcon>
|
<TMagicIcon v-if="option.icon" :size="iconSize"><component :is="option.icon"></component></TMagicIcon>
|
||||||
<span>{{ option.text }}</span>
|
<span>{{ option.text }}</span>
|
||||||
</div>
|
</div>
|
||||||
</TMagicTooltip>
|
</TMagicTooltip>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<TMagicIcon v-if="option.icon" :size="'16'"><component :is="option.icon"></component></TMagicIcon>
|
<TMagicIcon v-if="option.icon" :size="iconSize"><component :is="option.icon"></component></TMagicIcon>
|
||||||
<span>{{ option.text }}</span>
|
<span>{{ option.text }}</span>
|
||||||
</div>
|
</div>
|
||||||
</component>
|
</component>
|
||||||
@ -49,4 +49,14 @@ const clickHandler = (item: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useAddField(props.prop);
|
useAddField(props.prop);
|
||||||
|
|
||||||
|
const iconSize = computed(() => {
|
||||||
|
if (props.size === 'small') {
|
||||||
|
return '12';
|
||||||
|
}
|
||||||
|
if (props.size === 'large') {
|
||||||
|
return '16';
|
||||||
|
}
|
||||||
|
return '14';
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user