mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 21:36:00 +00:00
fix
This commit is contained in:
@@ -1,18 +1,22 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { openWebLink } from '../utility/simpleTools';
|
||||||
|
|
||||||
export let text: string;
|
export let text: string;
|
||||||
export let colorClass: string = 'premium-gradient';
|
export let colorClass: string = 'premium-gradient';
|
||||||
export let link: string;
|
export let link: string;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if link}
|
<div
|
||||||
<a class="highlight {colorClass}" href={link}>
|
class="highlight {colorClass}"
|
||||||
{text}
|
class:isLink={!!link}
|
||||||
</a>
|
on:click={() => {
|
||||||
{:else}
|
if (link) {
|
||||||
<div class="highlight {colorClass}">
|
openWebLink(link);
|
||||||
{text}
|
}
|
||||||
</div>
|
}}
|
||||||
{/if}
|
>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.highlight {
|
.highlight {
|
||||||
@@ -23,6 +27,9 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
text-decoration: none;
|
}
|
||||||
|
|
||||||
|
.highlight.isLink {
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user