mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-06 20:16:57 +00:00
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/976 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
d84509b7c3
1 changed files with 7 additions and 0 deletions
|
@ -19,12 +19,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
@input="onInput"
|
||||
>
|
||||
</div>
|
||||
<MkButton @click="removeColor">{{ i18n.ts.reset }}</MkButton>
|
||||
<div :class="$style.caption"><slot name="caption"></slot></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, useTemplateRef, toRefs } from 'vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: string | null;
|
||||
|
@ -44,6 +47,10 @@ const inputEl = useTemplateRef('inputEl');
|
|||
const onInput = () => {
|
||||
emit('update:modelValue', v.value ?? '');
|
||||
};
|
||||
const removeColor = () => {
|
||||
v.value = null;
|
||||
onInput();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
Loading…
Add table
Reference in a new issue