Skip to content

Commit

Permalink
fix: sign icon hover
Browse files Browse the repository at this point in the history
  • Loading branch information
tzuyi0817 committed Jun 6, 2024
1 parent 15039fb commit 1ceebef
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
3 changes: 1 addition & 2 deletions src/components/SignIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface Props {
}
const props = withDefaults(defineProps<Props>(), {
hoverColor: 'primary',
hoverColor: 'hover:text-primary',
prefix: 'icon',
color: '#4D4D4D',
hoverChangeSvg: false,
Expand All @@ -23,7 +23,6 @@ const symbolId = computed(() => {
if (props.hoverChangeSvg && isHover.value && !props.name.includes('_h')) return `${symbol}_h`;
return symbol;
});
const hoverColor = computed(() => `hover:text-${props.hoverColor}`);
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/signature/SignatureImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function close() {
v-show="currentSelect === image"
name="close_s"
class="absolute top-1 right-1 w-8 h-8 text-gray-80 drop-shadow-md"
hover-color="gray-60"
hover-color="hover:text-danger"
@click="toggleWarnPopup(true)"
/>
</li>
Expand Down
23 changes: 11 additions & 12 deletions src/components/signature/SignatureLiteral.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,21 @@ function close() {
@dragstart="dragLiteral"
>
{{ literal }}
</p>

<template v-if="currentSelect === literal">
<sign-icon
name="close_s"
class="absolute top-1 right-1 w-8 h-8 text-gray-80"
hover-color="gray-60"
@click="toggleWarnPopup(true)"
/>
<sign-icon
v-show="currentSelect === literal"
name="edit"
class="absolute top-6 right-1 w-8 h-8 text-gray-80"
hover-color="gray-60"
class="w-5 h-5 text-gray-80 inline relative scale-150 -top-[2px]"
hover-color="hover:text-pen-blue"
@click="toggleLiteralPopup(true, true)"
/>
</template>
</p>
<sign-icon
v-show="currentSelect === literal"
name="close_s"
class="absolute top-1 right-1 w-8 h-8 text-gray-80"
hover-color="hover:text-danger"
@click="toggleWarnPopup(true)"
/>
</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion src/components/signature/SignatureSign.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function close() {
v-show="currentSelect === signature"
name="close_s"
class="absolute top-1 right-1 w-8 h-8 text-gray-80"
hover-color="gray-60"
hover-color="hover:text-danger"
@click="toggleWarnPopup(true)"
/>
</li>
Expand Down

0 comments on commit 1ceebef

Please sign in to comment.