mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-11 22:54:13 +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:
@@ -323,9 +323,20 @@ async function showRadioOptions(item: MenuRadio, ev: MouseEvent | PointerEvent |
|
||||
type: 'radioOption',
|
||||
text: key,
|
||||
action: () => {
|
||||
item.ref = value;
|
||||
if ('value' in item.ref) {
|
||||
item.ref.value = value;
|
||||
} else {
|
||||
// @ts-expect-error リアクティビティは保たれる
|
||||
item.ref = value;
|
||||
}
|
||||
},
|
||||
active: computed(() => item.ref === value),
|
||||
active: computed(() => {
|
||||
if ('value' in item.ref) {
|
||||
return item.ref.value === value;
|
||||
} else {
|
||||
return item.ref === value;
|
||||
}
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user