mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-27 07:14:39 +02:00
refactor(frontend): MkRadiosの指定をpropsから行うように (#16597)
* refactor(frontend): MkRadiosの指定をpropsから行うように * spdx * fix lint * fix: mkradiosを動的slotsに対応させる * fix: remove comment [ci skip] * fix lint * fix lint * migrate * rename * fix * fix * fix types * remove unused imports * fix * wip --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
@@ -11,9 +11,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter="search">
|
||||
<template #prefix><i class="ti ti-search"></i></template>
|
||||
</MkInput>
|
||||
<MkRadios v-model="searchType" @update:modelValue="search()">
|
||||
<option value="nameAndDescription">{{ i18n.ts._channel.nameAndDescription }}</option>
|
||||
<option value="nameOnly">{{ i18n.ts._channel.nameOnly }}</option>
|
||||
<MkRadios
|
||||
v-model="searchType"
|
||||
:options="[
|
||||
{ value: 'nameAndDescription', label: i18n.ts._channel.nameAndDescription },
|
||||
{ value: 'nameOnly', label: i18n.ts._channel.nameOnly },
|
||||
]"
|
||||
@update:modelValue="search()"
|
||||
>
|
||||
</MkRadios>
|
||||
<MkButton large primary gradate rounded @click="search">{{ i18n.ts.search }}</MkButton>
|
||||
</div>
|
||||
@@ -72,15 +77,17 @@ import { Paginator } from '@/utility/paginator.js';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
type SearchType = 'nameAndDescription' | 'nameOnly';
|
||||
|
||||
const props = defineProps<{
|
||||
query: string;
|
||||
type?: string;
|
||||
type?: SearchType;
|
||||
}>();
|
||||
|
||||
const key = ref('');
|
||||
const tab = ref('featured');
|
||||
const searchQuery = ref('');
|
||||
const searchType = ref('nameAndDescription');
|
||||
const searchType = ref<SearchType>('nameAndDescription');
|
||||
const channelPaginator = shallowRef();
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user