improve LinkCard.svelte when click button clean input

pull/17/head
chiba 2024-03-04 23:37:56 +08:00
parent 882d04f50c
commit 79dd56d017
1 changed files with 5 additions and 5 deletions

View File

@ -249,7 +249,7 @@
on:input={inputACChange}
class:error={inputAC && (!inputACRegex.test(inputAC) || errorAC)}>
{#if inputAC.length > 0}
<button transition:slide={{axis: 'x'}} on:click={() => link('AC')}>Link</button>
<button transition:slide={{axis: 'x'}} on:click={() => {link('AC');inputAC=''}}>Link</button>
{/if}
</label>
{#if errorAC}
@ -276,7 +276,7 @@
on:input={inputSNChange}
class:error={inputSN && (!inputSNRegex.test(inputSN) || errorSN)}>
{#if inputSN.length > 0}
<button transition:slide={{axis: 'x'}} on:click={() => link('SN')}>Link</button>
<button transition:slide={{axis: 'x'}} on:click={() => {link('SN'); inputSN = ''}}>Link</button>
{/if}
</label>
{#if errorSN}