diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-07-30 13:11:06 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-30 13:11:06 +0900 |
| commit | 738b3ea43b059b103deca0b1a33071ae256ef79f (patch) | |
| tree | b47248996be4aa737cedcb62bdc04aa7aa63fcd2 /packages/frontend/src/components/MkDialog.vue | |
| parent | enhance: 管理画面でアーカイブにしたお知らせを表示・編... (diff) | |
| download | misskey-738b3ea43b059b103deca0b1a33071ae256ef79f.tar.gz misskey-738b3ea43b059b103deca0b1a33071ae256ef79f.tar.bz2 misskey-738b3ea43b059b103deca0b1a33071ae256ef79f.zip | |
enhance(frontend): デッキのアンテナ・リスト選択画面からそれぞれを新規作成できるように (#14104)
* enhance(frontend): デッキのアンテナ・リスト選択画面からそれぞれを新規作成できるように
* Update Changelog
* fix
* fix
* lint
* add story
* typo
ねぼけていた
* Update antenna-column.vue
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkDialog.vue')
| -rw-r--r-- | packages/frontend/src/components/MkDialog.vue | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue index 5c3c6aa51d..16cf5b1b75 100644 --- a/packages/frontend/src/components/MkDialog.vue +++ b/packages/frontend/src/components/MkDialog.vue @@ -36,7 +36,12 @@ SPDX-License-Identifier: AGPL-3.0-only </MkInput> <MkSelect v-if="select" v-model="selectedValue" autofocus> <template v-if="select.items"> - <option v-for="item in select.items" :value="item.value">{{ item.text }}</option> + <template v-for="item in select.items"> + <optgroup v-if="'sectionTitle' in item" :label="item.sectionTitle"> + <option v-for="subItem in item.items" :value="subItem.value">{{ subItem.text }}</option> + </optgroup> + <option v-else :value="item.value">{{ item.text }}</option> + </template> </template> </MkSelect> <div v-if="(showOkButton || showCancelButton) && !actions" :class="$style.buttons"> @@ -67,11 +72,16 @@ type Input = { maxLength?: number; }; +type SelectItem = { + value: any; + text: string; +}; + type Select = { - items: { - value: any; - text: string; - }[]; + items: (SelectItem | { + sectionTitle: string; + items: SelectItem[]; + })[]; default: string | null; }; |