File tree Expand file tree Collapse file tree
MaiChartManager/Front/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default defineComponent({
2626 </ NFlex >
2727 < NScrollbar class = "h-80vh" >
2828 < NList >
29- { assetDirs . value . map ( it => < NListItem >
29+ { assetDirs . value . map ( it => < NListItem key = { it . dirName ! } >
3030 < AssetDirDisplay dir = { it } />
3131 </ NListItem > ) }
3232 </ NList >
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ export default defineComponent({
4242 preset = "card"
4343 class = "w-[min(70vw,80em)]"
4444 title = { `${ text . value } 管理` }
45- v-model :show = { show . value }
45+ show = { show . value !== EDIT_TYPE . None }
46+ onUpdateShow = { ( ) => show . value = EDIT_TYPE . None }
4647 >
4748 < NFlex vertical >
4849 < NFlex align = "center" >
@@ -51,7 +52,7 @@ export default defineComponent({
5152 </ NFlex >
5253 < NScrollbar class = "h-80vh" >
5354 < NList >
54- { list . value . map ( it => < NListItem >
55+ { list . value . map ( it => < NListItem key = { it . id } >
5556 < GenreDisplay genre = { it } type = { show . value } class = { `${ editingId . value >= 0 && editingId . value !== it . id && 'op-30' } ` } disabled = { editingId . value >= 0 && editingId . value !== it . id }
5657 style = { { transition : 'opacity 0.3s' } }
5758 editing = { editingId . value === it . id } setEdit = { isEdit => editingId . value = isEdit ? it . id ! : - 1 } />
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ export default defineComponent({
9797 { props . badgeType && < NCheckbox v-model :checked = { disableBadge . value } > 隐藏按钮上的角标</ NCheckbox > }
9898 { config . value && < NScrollbar class = "max-h-60vh p-2" >
9999 { Object . entries ( config . value ) . map ( ( [ key , section ] ) => ! ! section && < >
100- < NDivider titlePlacement = "left" > { comments . sections [ key ] } </ NDivider >
101- { Object . keys ( section ) . map ( ( k ) => < NFormItem label = { capitalCase ( k ) } labelPlacement = "left" labelWidth = "10em" >
100+ < NDivider titlePlacement = "left" key = { key } > { comments . sections [ key ] } </ NDivider >
101+ { Object . keys ( section ) . map ( ( k ) => < NFormItem key = { k } label = { capitalCase ( k ) } labelPlacement = "left" labelWidth = "10em" >
102102 < NFlex vertical class = "w-full ws-pre-line" >
103103 < NFlex class = "h-34px" align = "center" >
104104 { typeof section [ k ] === 'boolean' ? < NSwitch v-model :value = { section [ k ] } /> : < NInput v-model :value = { section [ k ] } placeholder = "" /> }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export default defineComponent({
2828 < NFlex class = "pt-1 text-sm" size = "small" >
2929 {
3030 ( props . music . chartsAvailable || [ ] ) . map ( chart =>
31- < div class = "c-white rounded-full px-2" style = { { backgroundColor : LEVEL_COLOR [ chart . index ! ] } } > { LEVELS [ chart . levelId ! ] } </ div > )
31+ < div key = { chart . index } class = "c-white rounded-full px-2" style = { { backgroundColor : LEVEL_COLOR [ chart . index ! ] } } > { LEVELS [ chart . levelId ! ] } </ div > )
3232 }
3333 </ NFlex >
3434 </ div >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export default defineComponent({
1111 // 它又不居中
1212 trigger : ( ) => < div class = "text-#f0a020 i-material-symbols-warning-outline-rounded text-2em translate-y-.3" /> ,
1313 default : ( ) => < NFlex vertical >
14- { props . problems ! . map ( p => < div > { p } </ div > ) }
14+ { props . problems ! . map ( ( p , index ) => < div key = { index } > { p } </ div > ) }
1515 </ NFlex >
1616 } }
1717 </ NPopover > ;
You can’t perform that action at this time.
0 commit comments